Fix/metamask connect issue#2452
Draft
tanguyenvn wants to merge 9 commits intofeat/metamask-connectfrom
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bb6586e. Configure here.
tanguyenvn
commented
Apr 14, 2026
| // when having multiple namespaces, ask user to select one | ||
| if (wallet.chainNamespaces?.length > 1) { | ||
| const isCustomMetaMaskConnectorAndHasInjected = wallet.name === WALLET_CONNECTORS.METAMASK && wallet.isInstalled && wallet.hasInjectedWallet; | ||
| if (wallet.chainNamespaces?.length > 1 && !isCustomMetaMaskConnectorAndHasInjected) { |
Contributor
Author
There was a problem hiding this comment.
skip for MM as it already support multi chains, no need to manually select chain namespace
tanguyenvn
commented
Apr 14, 2026
| dapp, | ||
| api: { supportedNetworks: solanaSupportedNetworks }, | ||
| debug: this.connectorSettings?.debug, | ||
| skipAutoRegister: true, |
Contributor
Author
There was a problem hiding this comment.
don't register it to wallet standard registry
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.

Jira Link
Description
Fix issues when integrating with MM Connect SDK
How has this been tested?
Screenshots (if appropriate)
Types of changes
Checklist
Note
Medium Risk
Changes core connector behavior for
switchChain, Solana wallet initialization, and token auth selection across Auth/MetaMask/WC connectors, which could affect multichain login flows. Large dependency/lockfile churn (notably MetaMask/Solana packages) increases integration risk.Overview
Fixes multichain connection edge cases by updating connector chain-switching and Solana wallet behavior across Auth, MetaMask, and WalletConnect.
AuthConnector.switchChainnow switches via CAIP chain IDs and no longer blocks when multiple namespaces are configured; it also always sets upconnection.solanaWalletwhen Solana chains are present.AuthSolanaWalletis reworked to support multiple Solana chain configs and to lazily fetch accounts on first use, emitting Wallet Standard change events.Solana providers (
packages/modalandpackages/no-modal) now derive the Solana RPC config fromcoreOptions.chainsinstead of requiring the current chain to be Solana. The MetaMask connector’sgetAuthTokenInfoselects an EVM chain more robustly andswitchChainbecomes a no-op for Solana targets; WalletConnect V2 similarly removes the multi-namespace switchChain restriction. Demo UI updates remove thechainsprop fromAppDashboardand add a button/translation to print the current Solana chain.Reviewed by Cursor Bugbot for commit bb6586e. Bugbot is set up for automated code reviews on this repo. Configure here.