rainbowkit icon indicating copy to clipboard operation
rainbowkit copied to clipboard

[bug] "safeWallet" doesn't show up in the list of wallets

Open eragon512 opened this issue 1 year ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

RainbowKit Version

2.0.0

wagmi Version

2.6.4

Current Behavior

I added "safeWallet" in the list of wallets passed into the connectorsForWallets function. However, I don't see the Safe Wallet option in the list of wallets when using the RainbowKit Connect Wallet button

Expected Behavior

I expect to see the Safe Wallet option in the list of wallets when clicking on the RainbowKit Connect Wallet button

Steps To Reproduce

Step 1: use this code snippet to initialise the Wagmi config

const connectors = connectorsForWallets(
    [
      {
        groupName: 'Supported Wallets',
        wallets: [
         coinbaseWallet,
          rainbowWallet,
          metaMaskWallet,
          trustWallet,
          braveWallet,
          ledgerWallet,
          safeWallet,
          walletConnectWallet,
        ],
      },
    ],
    {
      appName: '...',
      projectId: '...',
    },
  );
  
const wagmiConfig = createConfig({
    connectors,
    ...
  });
  
...

<WagmiProvider config={wagmiConfig}>
    ...     
</WagmiProvider>  

Step 2: look through the list of wallets when prompted to connect a wallet

"Safe Wallet" is not visible as a listed option even though it's added to the list

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

No response

Anything else?

No response

eragon512 avatar Feb 16 '24 19:02 eragon512

@eragon512 Thanks for raising the issue. Unfortunately you won't be able to see the safeWallet in the modal unless you're using iframe context with safe wallet. Otherwise if the safe wallet is shown and you click to connect nothing won't happen.

Please have a look at this line of code. If installed is true then we would be able to show the safeWallet.

Please let me know if that helps 🙏

magiziz avatar Feb 17 '24 00:02 magiziz

Is there a way we can document such wallet-specific setup steps for all the wallets supported by RainbowKit? Either in RainbowKit's docs directly, or by linking to the wallet's docs site

It's not obvious from the RainbowKit docs that each wallet may need unique setup steps in order to be used properly

eragon512 avatar Feb 17 '24 13:02 eragon512

@eragon512 Good idea. We'll add something to the docs to showcase when wallet should be shown and when it shouldn't. If a wallet is not installed, but has download guide we will show it otherwise we won't.

Let me know if that makes sense.

magiziz avatar Feb 18 '24 00:02 magiziz

this makes sense :+1:

eragon512 avatar Feb 20 '24 16:02 eragon512