Skip to content

Conversation

@tanguyenvn
Copy link
Contributor

@tanguyenvn tanguyenvn commented Nov 28, 2025

Motivation and Context

Jira Link: https://consensyssoftware.atlassian.net/browse/W3APD-5197

Currently, when only Solana chain is used, MM connector (EVM-only) is always included
image
This is incorrect.

Description

  • MM connector which uses MM SDK doesn't support Solana atm.
  • Don't include MM connector if only Solana chain is used

How has this been tested?

Screenshots (if appropriate):

  • When only Solana chain is available
image image - When both EVM and Solana are available image - When only EMV chain is available image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

@vercel
Copy link

vercel bot commented Nov 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
web3auth-web Ready Ready Preview Comment Nov 28, 2025 8:27am

@tanguyenvn tanguyenvn self-assigned this Nov 28, 2025
if ((error as { code?: number })?.code === 4902) {
const chainConfig = this.coreOptions.chains.find(
(x) =>
x.chainId === params.chainId && ([CHAIN_NAMESPACES.EIP155, CHAIN_NAMESPACES.SOLANA] as ChainNamespaceType[]).includes(x.chainNamespace)
Copy link
Contributor Author

@tanguyenvn tanguyenvn Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MM connector doesn't support Solana atm, so excluding it

@tanguyenvn tanguyenvn force-pushed the fix/W3APD-5197-solana-mm-connector branch from bd2fbe4 to c4cbbe5 Compare November 28, 2025 08:25
// it's safe to add it here as if there is a MetaMask injected provider, this won't override it
// only set headless to true if modal SDK is used, otherwise just use the modal from native Metamask SDK
if (isBrowser() && (chainNamespaces.has(CHAIN_NAMESPACES.SOLANA) || chainNamespaces.has(CHAIN_NAMESPACES.EIP155))) {
connectorFns.push(metaMaskConnector(modalMode ? { headless: true } : undefined));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • we already prioritize MM connector at the line 697-699 when EVM chain is available
  • if only Solana chain namespace available, we should not add MM connector.

@chaitanyapotti chaitanyapotti merged commit 232b55f into master Nov 28, 2025
6 checks passed
@chaitanyapotti chaitanyapotti deleted the fix/W3APD-5197-solana-mm-connector branch November 28, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants