Skip to content

Commit 2fb26f2

Browse files
minor fixes to add mm only if eip155 or solana
1 parent 7fcde1f commit 2fb26f2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/no-modal/src/base/wallet/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export const MULTI_CHAIN_CONNECTORS = {
22
AUTH: "auth",
33
WALLET_CONNECT_V2: "wallet-connect-v2",
4+
METAMASK: "metamask",
45
} as const;
56

67
export const SOLANA_CONNECTORS = {
@@ -9,7 +10,6 @@ export const SOLANA_CONNECTORS = {
910

1011
export const EVM_CONNECTORS = {
1112
COINBASE: "coinbase",
12-
METAMASK: "metamask",
1313
...MULTI_CHAIN_CONNECTORS,
1414
} as const;
1515

packages/no-modal/src/noModal.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ export class Web3AuthNoModal extends SafeEventEmitter<Web3AuthNoModalEvents> imp
434434

435435
// it's safe to add it here as if there is a MetaMask injected provider, this won't override it
436436
// only set headless to true if modal SDK is used, otherwise just use the modal from native Metamask SDK
437-
connectorFns.push(metaMaskConnector(modalMode ? { headless: true } : undefined));
437+
if (chainNamespaces.has(CHAIN_NAMESPACES.EIP155) || chainNamespaces.has(CHAIN_NAMESPACES.SOLANA)) {
438+
connectorFns.push(metaMaskConnector(modalMode ? { headless: true } : undefined));
439+
}
438440

439441
// add WalletConnectV2 connector if external wallets are enabled
440442
if (isExternalWalletEnabled && (chainNamespaces.has(CHAIN_NAMESPACES.SOLANA) || chainNamespaces.has(CHAIN_NAMESPACES.EIP155))) {

0 commit comments

Comments
 (0)