I'm trying to link BSC chain with wallet connect in my react DAPP.
const walletConnectProvider = await new WalletConnectProvider({
rpc: {
56: "https://bsc-dataseed.binance.org",
},
});
await walletConnectProvider.enable();
console.log("walletConnectProvider", walletConnectProvider);
if (walletConnectProvider.connected) {
setAddr(walletConnectProvider.accounts[0]);
}
After trying to get connection with trust wallet. I'm getting this error:
Unhandled Rejection (Error): unknown account #0 (operation="getAddress", code=UNSUPPORTED_OPERATION, version=providers/5.4.1)
While reviewing i identified that the chainid is still 1 and rpcurl is pointing to infura.
Please help me out in this issue. Thanks