[bug] Wallet connection disconnected after switching chain
Link to minimal reproducible example
https://github.com/jasonaviandres/reown-appkit-simple-demo
Summary
I followed the documentation for have a simple implementation of connecting wallet and switching chain (https://docs.reown.com/appkit/react-native/core/installation#expo). I can connect successfully to Metamask Wallet. And then I tried to implement switch chain from my app. I tried both from <AppkitButton/> and useSwitchChain hook from wagmi, it went to Metamask and change the chain. but when it went back to my app, somehow:
- result of
connectorfromuseAccountisundefined - result of
statusfromuseAccountisdisconnected
I tried this on IOS.
https://github.com/user-attachments/assets/d7204cf1-4034-4e67-8795-1e8a5f59f460
List of related npm package versions
- "viem": "^2.28.0"
- "wagmi": "^2.15.0"
- "@walletconnect/react-native-compat": "^2.20.0"
- "@reown/appkit-wagmi-react-native": "^1.2.3"
- "react-native-modal": "^13.0.1"
- "expo": "~52.0.46"
- "expo-application": "~6.0.2"
- "@react-native-community/netinfo": "11.4.1"
- "react-native-get-random-values": "~1.11.0"
Node.js Version
v22.11.00
Package Manager
cc @ignaciosantise
hey @jasonaviandres 👋 which version of Metamask are you using?
@ignaciosantise hey, my Metamask version currently is v7.45.1
hey @jasonaviandres we noticed Metamask was having some issues in their previous versions. Does the error happen with other wallets? Also, can you update to v7.45.2 ? I cannot reproduce the issue on my side
hey @ignaciosantise I just updated my Metamask to version 7.45.2. it seems to work ok now, thank you so much