[SOLVED] Metamask opens to sign transactions when using wallet connect

Hey guys,

I’ve currently set up both MM and WalletConnect for my dapp. I can connect to wallet connect successfully, however when I go to sign a transaction, MM pops up and expects me to complete it there, when it should all happen on wallet connect.

Any idea why this is happening? I am using the Moralis provider for transactions as follows:

    const ethers = Moralis.web3Library;
    const web3Provider = await Moralis.enableWeb3();
    const signer = web3Provider.getSigner();
    const contractWhoopy = new ethers.Contract(cloneAddress, whoopyABI, signer);

Thanks!

You may need to use wallet connect here as parameter for enable web3

Thanks! Did this and it worked!

Code:

const web3Provider = await Moralis.enableWeb3({provider: 'walletConnect' || 'metamask'})
1 Like