wslyvh / nexth

A Next.js + Ethereum starter kit with Viem, Wagmi, Web3Modal, SIWE, Tailwind, daisyUI and more to quickly ship production-ready Web3 Apps ⚡
https://nexth.vercel.app/
MIT License
671 stars 141 forks source link

Is there any possibility to fix disconnection issue after switch networks in metamask? #2

Closed ClusterH closed 1 year ago

ClusterH commented 1 year ago

It is known issue in MetaMask. For example, when switch to custom networks and/or test networks (Polygon, Mumbai, Arbitrum, BSC etc) from Ethereum, Metamask fire disconnect event, it cause Metamask disconnection issue.

Current version of nexth also have this issue, I confirmed it. (Just try Switch network from Ethereum to Polygon through dapp or metamask itself)

Is there any plan to fix this problem in the nexth? I will appreciate it if can share alternative solution to fix until MetaMask fix officially.

wslyvh commented 1 year ago

This is definitely annoying. In the current setup, I basically rely on other libs/Wagmi to handle this. So ideally should get solved there. I know they've tried to workaround this, but have been unsuccessful.

I'll try to do some more research on it tho.

wslyvh commented 1 year ago

Closing with #11

Big thanks to @marthendalnunes 🙏