wagmi
wagmi copied to clipboard
[Bug] switchChain is not working
Check existing issues
- [X] I checked there isn't already an issue for the bug I encountered.
Describe the bug
- To reproduce
- connect wallet to Ethereum main network (Any other network is possible but not Sepolia). You will see the popup to switch to Sepolia but DON'T switch.
- Refresh the page
- As soon as page is refreshed, you should see popup to switch to Sepolia. But it doesn't happen.
- List of related npm package versions
- wagmi: 2.12.7
- viem: 2.20.0
- @tanstack/react-query 5.52.0
Link to Minimal Reproducible Example
No response
Steps To Reproduce
Here is the link: https://codesandbox.io/p/sandbox/test-switchchain-hdn6hr
- connect wallet to Ethereum main network (Any other network is possible but not Sepolia). You will see the popup to switch to Sepolia but DON'T switch.
- Refresh the page
- As soon as page is refreshed, you should see popup to switch to Sepolia. But it doesn't happen.
What Wagmi package(s) are you using?
wagmi
Wagmi Package(s) Version(s)
2.12.7
Viem Version
2.20.0
TypeScript Version
No response
Anything else?
No response