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);
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);
};