Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Disabling multiInjectedProviderDiscovery causes the same injected wallet to overtake other injected wallets. #2163

Open
1 task done
einaralex opened this issue Aug 28, 2024 · 0 comments

Comments

@einaralex
Copy link

einaralex commented Aug 28, 2024

Is there an existing issue for this?

  • I have searched the existing issues

RainbowKit Version

2.1.5

wagmi Version

2.12.0

Current Behavior

When setting multiInjectedProviderDiscovery: false and using multiple injected wallets, one of the injected wallets will completely take over.

For example, in Brave browser I have Rabby, Metamask and the Brave Wallet.
In my dapp config I have those wallets enable injectedWallet, rabbyWallet, metaMaskWallet, braveWallet and when I disable the
multiInjectedProviderDiscovery, Rabby is triggered for all of the injected wallets.

Screen.Recording.2024-08-28.at.21.49.34.mov

Expected Behavior

I was expecting I could still toggle between wallets AND skip the discovery of other installed wallets.

Steps To Reproduce

Have more then one injected wallet. Metamask vs. Rabby or Brave Wallet vs Metamask should do.

Use the rainbowkit-create:
pnpm create @rainbow-me/rainbowkit@latest

Update config:

import {
  braveWallet,
  injectedWallet,
  metaMaskWallet,
  rabbyWallet,
} from "@rainbow-me/rainbowkit/wallets";

export const config = getDefaultConfig({
 ...
  wallets: [
    {
      groupName: "Recommended",
      wallets: [rabbyWallet, metaMaskWallet, braveWallet, injectedWallet],
    },
  ],
  multiInjectedProviderDiscovery: false,
});

Try connecting wallet, if using Rabby vs. Metamask, Rabby will likely open even if you click Metamask.

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

Stackblitz

Preview: https://stackblitzstartersnjcqse-yijm--3000--9569b1ab.local-credentialless.webcontainer.io/

Anything else?

This seems to be an issue in Rainbowkit, possibly some connector settings. I tried using the Wagmi playground and set multiInjectedProviderDiscovery: false, that did not cause the same issue to occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant