Using web3auth and try to connect to Metamask, wagmi only is available to get the chainId set in the web3auth

Current behavior

I use Web3auth and try to connect to the app with Metamask through Web3auth modal and my wallet is in Mumbai network and the web3auth is set to Goerli and I have this code to get the chainId

import { useAccount, useChainId, useSwitchNetwork } from 'wagmi'

const { address, isConnected, isConnecting, isReconnecting, connector } = useAccount()
const chainId = useChainId()

useEffect(() => {
    if (chainId && chainId !== acceptedChainId) {
  }, [chainId, isConnecting])

However when I connect to Metamask I get always the chainId set in the web3auth chain config but not the current one from Metamask then I don’t see how can I ask to the user to switch the network from the wallet

@francisco1 Welcome Aboard!

Your issue has been forwarded to our Dev team and we will get back with further updates.

1 Like

@vjgee , is there any update about this one?

Hey @aitor, whenever we connect MetaMask to a dapp that’s on a specific chain, MetaMask Wallet upon connection switches to the chain in the dapp and not the other way round.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.