【发布时间】:2021-09-18 11:41:45
【问题描述】:
我目前正在开发一个 dapp,我正在集成 walletconnect。
我使用此代码进行连接:
const chainId = ContractService.getPreferredChainId();
const rpc = ContractService.getRpcAddress();
provider = new WalletConnectProvider({
infuraId: undefined,
rpc: {
[chainId]: rpc,
},
});
await provider.enable();
chainId 是根据应用程序是否处于开发模式而动态选择的。在开发过程中,它在链 id 97 上运行。
RPC 也是如此,它只是获得了币安智能链 RPC JSON 提供者。
连接正常,但出现以下错误:
知道如何在不创建 infura 帐户的情况下解决此问题吗?或者是必须的..
【问题讨论】:
标签: wallet-connect dapp