fix: recognize MetaMask Flask (io.metamask.flask) as native MetaMask#336
Merged
Conversation
MetaMask Connect only recognized `io.metamask` and `io.metamask.mobile` as native MetaMask EIP-6963 providers, so MetaMask Flask (`io.metamask.flask`) was not detected as an installed extension. `hasExtension()` returned false with only Flask installed, causing connect() to fall through to the MWP/QR transport instead of using the local Flask extension — even though the browser postMessage transport works with Flask. The legacy `@metamask/sdk` recognized Flask, so this behaved like a regression. Add `io.metamask.flask` to the recognized native MetaMask RDNS values in: - connect-multichain extension detection (NATIVE_METAMASK_EIP6963_RDNS) - connect-evm EIP-6963 announce suppression (METAMASK_EIP6963_RDNS) - the wagmi metaMask() connector's rdns (+ playground copies) Also document Flask handling in the metamask-connect skill and update related doc comments / README.
jiexi
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
MetaMask Connect only treated
io.metamask(production extension) andio.metamask.mobileas native MetaMask EIP-6963 providers. MetaMask Flask announces itself withrdns: 'io.metamask.flask', which was missing from every allowlist. As a resulthasExtension()returnedfalsewhen only Flask was installed, soMetaMaskConnectMultichain.connect()fell through to the MWP transport (QR code / mobile deeplink) instead of using the locally-installed Flask extension — even though the browserpostMessagetransport (metamask-contentscript) works with Flask just fine. The legacy@metamask/sdkrecognized Flask (METAMASK_EIP_6369_PROVIDER_INFO.RDNS = ['io.metamask', 'io.metamask.flask']), so to consumers this looked like a regression.This surfaced during a live-stream dApp build that migrated to MetaMask Connect + wagmi while using Flask: the connection only worked after manually selecting wagmi's auto-discovered
io.metamask.flaskconnector, which bypasses the Connect SDK entirely.What changed
Primary fix — add
io.metamask.flaskto the recognized native MetaMask RDNS values in the three places that gate Flask:packages/connect-multichain/src/domain/platform/index.ts—NATIVE_METAMASK_EIP6963_RDNS(driveshasExtension(), which selects the extension vs MWP transport).packages/connect-evm/src/eip6963.ts—METAMASK_EIP6963_RDNS(announce-suppression so the SDK doesn't announce a duplicate MetaMask entry alongside Flask).integrations/wagmi/metamask-connector.ts— themetaMask()connector'srdns(plus the two playground copies for parity).Docs (nice-to-have) — the
metamask-connectskill never mentioned Flask. Added a troubleshooting entry, updated the wagmi setup/migration notes, and fixed related doc comments + the connect-evm README.Result
With only Flask installed on desktop web, the Connect connector now uses the browser extension transport (no QR/MWP fallback) and connects like the production extension.
References
@metamask/sdkpackages/sdk/src/constants.ts(METAMASK_EIP_6369_PROVIDER_INFO.RDNS)Checklist