[bug] Disabling multiInjectedProviderDiscovery causes the same injected wallet to overtake other injected wallets.
Opened this issue · 0 comments
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.)
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.