family / connectkit

Connecting a wallet, made simple.
https://docs.family.co/connectkit
BSD 2-Clause "Simplified" License
855 stars 185 forks source link

[BUG] Switching to not set up chain #367

Closed alagunoff closed 6 months ago

alagunoff commented 6 months ago

Describe the bug

Switching to the chain doesn't work if it is not set up in the wallet

To reproduce

  1. Have DefiChain EVM Testnet set up in wagmi config but not in the wallet
  2. Visit the app using another chain not set up in the wagmi config and wallet
  3. Try to switch to DefiChain EVM Testnet

Expected behavior

Prompt to add DefiChain EVM Testnet network to the wallet first and then switch to it

Screenshots

image image

Environment details

lochie commented 6 months ago

This would either be an issue with the wallet not implementing eth_addEthereumChain, or wagmi's handling of this RPC method. Going to close this issue as it's not relating to the ConnectKit library.