Skip to content

Connect wallet button disconnects as soon as refresh #20

@MohakGupta2004

Description

@MohakGupta2004

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions