rainbow-me / rainbowkit

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

[bug] <title> Gate wallet Io connect is not found errror #2114

Closed yashsisodiya closed 3 months ago

yashsisodiya commented 4 months ago

Is there an existing issue for this?

RainbowKit Version

2.0.1

wagmi Version

2.5.7

Current Behavior

Getting below issue while trying to add an wallet button for gateWallet using below code

Error: Uncaught runtime errors: × ERROR Connector not found at WalletButtonRenderer (http://localhost:3000/static/js/bundle.js:514033:11) at renderWithHooks (http://localhost:3000/static/js/bundle.js:278692:22) at updateFunctionComponent (http://localhost:3000/static/js/bundle.js:282259:24) at beginWork (http://localhost:3000/static/js/bundle.js:283978:20) at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:268948:18) at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:268992:20) at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:269049:35) at beginWork$1 (http://localhost:3000/static/js/bundle.js:288947:11) at performUnitOfWork (http://localhost:3000/static/js/bundle.js:288195:16) at workLoopSync (http://localhost:3000/static/js/bundle.js:

Expected Behavior

It should give button for gate wallet io just like it gives for other wallet like https://www.gate.io/web3/dapps and so more

Steps To Reproduce

import { WalletButton } from '@rainbow-me/rainbowkit';

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

No response

Anything else?

No response

yashsisodiya commented 4 months ago

@magiziz can you please look this

magiziz commented 4 months ago

@yashsisodiya Can you try the following ?

  1. If you use getDefaultConfig you'd need to import gateWallet to one of your wallet group list like this.
import { getDefaultConfig } from "@rainbow-me/rainbowkit";
import { mainnet } from "wagmi/chains";
import { gateWallet } from "@rainbow-me/rainbowkit/wallets";

export const config = getDefaultConfig({
  appName: "RainbowKit demo",
  projectId: "YOUR_PROJECT_ID",
  chains: [mainnet],
  wallets: [{ groupName: "Popular", wallets: [gateWallet] }],
  ssr: true,
});
  1. Import WalletButton component and add "gate" as wallet.
    
    import { WalletButton } from "@rainbow-me/rainbowkit";
yashsisodiya commented 4 months ago

Thanks @magiziz it worked but it is creating issues with metamask connector https://codesandbox.io/p/sandbox/rainbowkit-sign-887fq3

magiziz commented 4 months ago

@yashsisodiya I see. Gate wallet is marking their wallet as "MetaMask". We can't do anything on our end since it's the Gate wallet problem that they mark their wallet as MetaMask.

image
yashsisodiya commented 3 months ago

Ok, Also the connection is quite unstable. Sometimes it connects, but we never get redirected to the application. Other times, we never receive a connection and sign request on the wallet, and so on.

magiziz commented 3 months ago

but we never get redirected to the application

@yashsisodiya Can you describe what you mean by that ?

we never receive a connection and sign request on the wallet, and so on.

Is this a metamask issue or Gate wallet issue ?

yashsisodiya commented 3 months ago

It is gate wallet issue. Basically sometimes it gets connected but sometimes it behaves weird like on wallet it shows connected message but on our application no connection established , And also on mobile if connection established it always returns error for chain not found

magiziz commented 3 months ago

@yashsisodiya I see what you mean. Gate wallet also behaves weird on connect modal. I think the best thing to do for now is to reach out to their support team and see what's going on since this is out of our control. We've had a few wallets that didn't behave the way that they should've behaved and it's usually their fault.

yashsisodiya commented 3 months ago

@magiziz On disconnect it is giving issues like showing disconnected at that time but the wallet is still connected to our application if I see it from the wallet connection list.

yashsisodiya commented 3 months ago

Alright, here are the details:

If I don't modify my default config to add the Gate wallet connector, everything works fine. However, if I add the Gate wallet connector to my default config, the button for the Gate wallet behaves in a buggy manner. It doesn't disconnect properly, and after connecting, it doesn't show the signer.

magiziz commented 3 months ago

@yashsisodiya Yes i'm also able to reproduce those weird behaviours. As mentioned this is a Gate wallet issue rather than RainbowKit issue since every wallet works fine.

magiziz commented 3 months ago

I'm going to close this issue for now since it seems to be a Gate wallet extension issue rather than RainbowKit issue.