Managing Sessions

WalletConnect includes built-in session persistence, enabling automatic reconnection to the previously connected wallet when the page is refreshed.

Connection Persistence

The connected wallet is stored in the browser LocalStorage and automatically reconnects on page refresh. This value is set on successful connection and cleared on disconnection.

Connection Flow

The following diagram illustrates the wallet connection flow and how the auto connect feature is triggered:
Wallet Connection Flow Page Displayed Window Loaded Event? Wait NO YES Check Installed Wallets Wallet Saved in Storage? YES Can Auto Connect? YES Auto Connect Wallet Connection Succeed? YES Save Wallet into Storage Main Page Wallet Connected Main Page Wallet Disconnected NO NO NO Connect Called? NO YES Try to Connect Wallet Disconnect Called? NO YES Clear Storage Disconnect Wallet Connect Called? NO YES Try To Connect Wallet Connection Succeed? NO YES Clear Storage Disconnect Old Wallet