I am making a DAPP on BSC which allows users to access through browser and mobile. So I would like to integrate the WalletConnect into my DAPP.
I simply install the npm package "@walletconnectusing walletconnect/web3-provider"provider to try to connect to trustwallet ios APP. with the following codeMy config on walletconnect is listed below:
try {
console.log("Log in with connect wallet")
const provider = await new WalletConnectProvider({
rpc: {
56: "https://bsc-dataseed1.binance.org",
},
});
// provider.networkId = 56;
await provider.enable();
const web3 = await new Web3(provider);
console.log(web3)
resolve(web3)
} catch {
console.log("Install metamask or use wallet connect")
}
It is working normally if I useconnected to the wallet, but it with my metamask ios APPis not working right. As long asSo I select trust wallet, it shows "no available network" likecheck the provider and find out that the chain ID is pointing to "1" instead of the BSC chainID "56". see below:
Does anybody know what is wrong with my settingAm I doing anything not correct? It will be very appreciated if somebody can help me out.