Describe the Issue
MetaMask disconnects automatically upon page refresh, requiring the user to reconnect every time.
Possible Cause
The application is currently handling wallet connection state manually. Since the connection state is not being persisted properly, MetaMask resets the session on refresh.
Suggested Fix
Instead of managing the wallet connection state manually, integrate Wagmi to handle wallet connection and persistence across reloads. Wagmi provides reliable React hooks and built-in session management for MetaMask and other EVM wallets.
Environment
- OS: Arch Linux
- Node.js version: v24.7.0
- npm version: 11.6.0
- Browser: Chrome
Additional Context
Describe the Issue
MetaMask disconnects automatically upon page refresh, requiring the user to reconnect every time.
Possible Cause
The application is currently handling wallet connection state manually. Since the connection state is not being persisted properly, MetaMask resets the session on refresh.
Suggested Fix
Instead of managing the wallet connection state manually, integrate Wagmi to handle wallet connection and persistence across reloads. Wagmi provides reliable React hooks and built-in session management for MetaMask and other EVM wallets.
Environment
Additional Context