rainbow-me / rainbowkit

The best way to connect a wallet 🌈 🧰
https://rainbowkit.com
MIT License
2.44k stars 665 forks source link

[bug] Rabby wallet disconnects on page refresh #2092

Closed Sayuki0x closed 4 months ago

Sayuki0x commented 4 months ago

Is there an existing issue for this?

RainbowKit Version

2.1.3

wagmi Version

2.9.2

Current Behavior

When using Rabby as the connected wallet, if the refresh button is pressed on the browser, the wallet will not always automatically reconnect. This seems to only happen in production- currently my app is deployed to vercel. In the dev environment, the autoreconnect does seem to function as expected. This behavior does not occur with metamask.

Expected Behavior

The wallet will remember the connection and automatically reconnect each time the page is refreshed.

Steps To Reproduce

  1. Create a new repo using rainbowkit with npm init @rainbow-me/rainbowkit@latest
  2. Deploy to vercel
  3. Load the production environment in chrome browser and connect rabby wallet
  4. Press the refresh button.

For me, the autoreconnect fails around ~50% of the time. Here's a fresh repo inited with rainbowkit@latest on vercel to demonstrate: https://rainbowkit-connect-bug.vercel.app/

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

https://github.com/Sayuki0x/rainbowkit-connect-bug

Anything else?

Thank you guys for all your work on rainbowkit! It is very nice to use

magiziz commented 4 months ago

@Sayuki0x This seems to be a Rabby wallet issue rather than a RainbowKit issue. Wagmi automatically reconnects during page refresh. We've had several issues with Rabby wallet, so the best thing i would suggest doing is reaching out to their support team.