WalletConnect working fine when I scan QR code on desktop but doesn't when clicked on connect button on mobile

Hi! I’m using walletconnect to connect trust wallet, metamask etc to my dapp. When the walletconnect is called on desktop the QR code appears, I scan it using any wallet (trust or metamask) from mobile and my wallet is connected which is perfectly fine, but when I run the dapp on mobile I get the Connect button and when I click on the connect button I get the option to select the wallet I want to connect when I select any wallet nothing happens, it doesn’t ask me to sign or allow the dapp to connect wallet.

I’m testing on localhost right now. I heard trust wallet doesn’t work on localhost but metamask does. Here’s my code:

const provider = new WalletConnect({
      rpc: {
        56: "https://bsc-dataseed1.defibit.io/",
      },
      chainId: 56
});

const onConnect = async () => {
      await provider.enable();
      // const web3 = initWeb3(provider);![WhatsApp Image 2022-06-07 at 12.22.16 PM|225x500](upload://zT302UjLUx5SJf89dcZXez9C0Wb.jpeg) 
      const accounts = await web3.eth.getAccounts();
      const address = accounts[0];
      const networkId = await web3.eth.net.getId();
      const chainId = await web3.eth.chainId();
      console.log(address);
 };

@Yomoo @cryptokid

As you’re using WalletConnect directly, have you tried following their current docs for web3.js? Web3 Provider | WalletConnect Docs

Hello! I want do this!! HOw can I do it??