EnableWeb3 WalletConnect after page Refreshing

Hi,
its me again. Since days i try to solve this problem… it would be AWESOME if someone could help me.

The problem is after connecting with walletconnect from for example chrome (pc or mobilephone doesnt make an difference) after a page-reload/refresh, this command is popping up the QR code again and again instead of “reconnecting” the user.

//alert(window.localStorage.walletconnect);

    if (window.localStorage.walletconnect) {
      await Moralis.enableWeb3({
        provider: "walletconnect",
        chainId: 56

      });
    }

as you can see i tried to alert the window.localStorage.walletconnect and it is showing me all the walletconnect information…so i know the walletconnect datas are stored … but stil the browser tells me the Web3 instance is missing and i need to be sure to call Moralis.enableWeb3() … wich i do … as you clearly can see.

What can i do to solve this problem? Thank you very much i advance

really? is nobody able to help?

bump because this is really needed xD

bump … does nobody face this problem? i mean this is annoying as hell

Same issue. Did you solve it?

1 Like

the team is currently working on it. see my other Post about it: WalletConnect Connection after Refresh

I solved my problem here: Is it possible to connect my wallet without having to sign the transaction?

My problem was that after I logged in with wallet connect, I called Moralis.enableWeb() without specifying the provider. This led to disable the connection with wallet connect and re-enable metamask.

My code:

const walletProvider = window.localStorage.walletconnect ? "walletconnect" : "Metamask";
await Moralis.enableWeb3({ provider: walletProvider, chainId: 56 });
1 Like

thats what i am already doing. and the problem i have is confirmed by the team so i have to wait for fix :slight_smile: