Open sambacha opened 1 year ago
I update Frame recently, from v0.5.0-beta.22, and switching networks worked as expected in that version. Not sure if it's the app or the browser extension.
@nickadamson This is a feature request for dapps being able to request a switch of RPC provider - not related to switching chains, which is already covered by wallet_switchEthereumChain
.
@sambacha I'll discuss this with the team, I think the idea is a good one but the draft could be more complete.
Regarding the "solved" issues - I don't think these issues will be solved by wallet_switchNetworkRpcProvider
. #1501 is to do with an issue we fixed in Frame around a flaky Mainnet RPC connection causing extension connection issues (we have an extension release to make before this can be considered fully fixed), and #1536 is about splitting traffic between different RPCs.
wallet_switchNetworkRpcProvider
The
wallet_switchNetworkRpcProvider
RPC method allows Ethereum applications ("dapps") to request that the wallet switches its active RPC Provider backend if the wallet has a concept thereof.The caller MUST specify a chain ID. The caller MUST specify a valid URL for the RPC Endpoint
The wallet application may not arbitrarily refuse or accept the request. A status code of
200
is returned if the active RPC was successfully switched, A status code of[TODO]
otherwise.Motivation
The purpose
wallet_switchNetworkRpcProvider
is to provide dapps with a way of requesting to switch the wallet's active chain's RPC Provider, which they would otherwise have to ask the user to do manually.Existing EIP Specifications do not service this end
updatedEthereumChain
specifies that the "...Wallet should default therpcUrl
to any existing endpoints matching a chainId known previously to the wallet, otherwise it will use the provided rpcUrl as a fallback."wallet_switchNetworkRpcProvider
intentionally and explicitly is purely concerned with switching the active RPC endpoints, regardless of any other metadata associated therewith.solves https://github.com/floating/frame/issues/1536 & https://github.com/floating/frame/issues/1501
This would ensure that Omnichain support is guaranteed