Skip to content

[Feature]: Allow overriding RPC used for walletconnect wallets #2383

@efstajas

Description

@efstajas

Is your request related to a problem?

I might be getting something wrong here since i'm not extremely familiar with the inner workings of WalletConnect, so all this is based on observation.

What I noticed is that when I connected certain wallets via the WalletConnect connector, they appear to bring their own RPC endpoint that should be used client-side. Others do not, and in this case the RPC passed to Onboard({ [...] chains: { [...] rpcUrl: "" } }) appears to be used.

For example, when I connected Trust Wallet via WalletConnect, it subsequently uses the RPC endpoint configured on Onboard. But when I connected MetaMask Android, also via WalletConnect, it uses the public cloudflare-eth.com RPC, which is very prone to rate-limiting. As a result, some of our users have reported our app breaking when connected to e.g. MetaMask Android via WalletConnect.

Feature Description

As I already said, I don't fully understand the mechanisms at play here, but based on the above described observations, I assume that somehow either 1) the wallet provides an RPC, or 2) Onboard's WalletConnect connector falls back to the Onboard configuration.

We have a custom RPC proxy for our application that automatically balances requests to a number of private paid ETH nodes. Ideally, we would want all ETH-RPC communication from our app to go through that.

Because of that, I'm looking for a way to "force" the WalletConnect adapter to use the RPC configured in Onboard, rather than going with whatever the wallet wants.

Alternative Solutions

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions