rainbowkit icon indicating copy to clipboard operation
rainbowkit copied to clipboard

feat: chain modal v2

Open magiziz opened this issue 1 year ago • 10 comments

Changes

  • Now you can choose any chains even if your wallet is not connected.
  • Works with siwe.
  • During connection process, it automatically selects the chain you picked earlier. Or the one you set as your default initialChain instead.
  • If you've set initialChain, the option to change networks will be hidden to prevent accidental switches.
  • The current chain will show up only even if you have one chain unless you set chainStatus to none

Screen recordings / screenshots

https://github.com/rainbow-me/rainbowkit/assets/53529533/fab003eb-5526-45ca-976d-f8a8afc2e702

What to test

  1. Checkbox the chainModalOnConnect in the example app
  2. Try opening the chain modal and switch through your desired chain
  3. While connecting your wallet, confirm it connects to the chain you chose.
  4. Set initialChain and check if the chain button is no longer visible.
  5. Make sure everything works well with siwe. Test this connecting to your wallet first and then you should see chain button dissapear. This prevents users from switching chains with their connected wallet when they are not signed in yet.

magiziz avatar Feb 26 '24 11:02 magiziz