metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

Allow users to select between RPC providers for the same chainId (they have added) when prompted to `switchEthereumChain`

Open adonesky1 opened this issue 2 years ago • 3 comments

When users have multiple networks added with the same chainId and they are prompted with the switchEthereumChain API call, they are either switched to the preloaded (Infura) RPC provider (in the case of default networks) or the first one added in the case of non-default networks.

The wallet_SwitchEthereumChain should provide users the ability to decide which RPC provider they want to be switched to. Perhaps we should even require the user select which of the multiple they have added they want to use before being allowed to proceed.

adonesky1 avatar Dec 05 '22 15:12 adonesky1

cc @bschorchit

adonesky1 avatar Dec 05 '22 15:12 adonesky1

For the initial version, the UX flow and design considerations would be:

  • Allow users to choose which RPC they want to proceed with (when multiple are configured) on the switchEthereumChain prompt itself

For subsequent iterations,

  • Have a settings screen where users can preconfigure their preferred ranking of RPC providers
  • On the switchEthereumChain pop up, auto-switch to the user's choice of RPC based on settings
  • OR let users select one of the RPC provider if they have multiple configured
  • OR direct them to the RPC settings screen

kevinghim avatar Dec 07 '22 22:12 kevinghim

Please note that label:team-dapp-api has been replaced by label:team-devex . Thanks.

xinnanyemm avatar Sep 15 '23 09:09 xinnanyemm