2

I am trying to create a Dapp which works on Binance Smart Chain only. I have used walletConnect CDN:

<script src="https://cdn.jsdelivr.net/npm/@walletconnect/web3-provider@1.7.8/dist/umd/index.min.js"></script> 

In the RPC section I have only used the rpc for binance smart chain like the following:

 function getProvider() {
    // const provider = new WalletConnectProvider.default({
    //   infuraId: "27e484dcd9e3efcfd25a83a78777cdf1",
    // });

    var provider = new WalletConnectProvider.default({
      rpc: {
        56: "https://bsc-dataseed.binance.org",
      },
      // bridge: "https://bridge.walletconnect.org",
    });

    return provider;
  }

I am trying to connect Trust Wallet to my dapp but it shows Ethereum Mainnet only. I can provide the complete code as well (it's a very simple site at this moment).

Can someone please tell me how do I limit it to only BSC?

TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

0

It is funny that in 4 years no one answered this question and probably you may have found your solution already, still if i can find this question with this query anyone can find it. So here is the answer. Wallet connect does not allow all the networks implementation. BSC (Binance smart chain) is also one of the unlucky one. If you go to https://example.walletconnect.org/ and try to connect your website. You will get the error that bsc is the wrong network please switch.