我正在使用walletconnect/web3提供商来尝试连接到信任钱包ios应用程序。下面列出了我在walletconnect上的配置:
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")
} 它通常与钱包相连,但工作不正常。因此,我检查提供者和发现链ID是指向"1“,而不是平衡计分卡chainID "56”。见下文:

我做了什么不对的事吗?
发布于 2021-06-14 23:51:09
我在github上找到了解决方案,请查看下面的讨论:https://github.com/WalletConnect/walletconnect-monorepo/issues/522#issuecomment-860773569
https://ethereum.stackexchange.com/questions/101786
复制相似问题