Skip to main content
After initializing Portal for your user, it’s crucial to determine their wallet’s lifecycle state to ensure a healthy wallet state. We provide several helper methods to easily derive the state of your users’ wallets:
These methods can be used together to understand the user’s wallet state and determine the next steps. For example:
Each method also accepts an optional chainId parameter (e.g., "eip155:1") to check the state for a specific chain instead of globally.
The user’s wallet share is stored in the browser’s localStorage, which the browser can clear. For example, Safari’s ITP can clear it after periods of inactivity, and isWalletOnDevice() then returns false. See Handle storage loss to detect this with onWalletNotOnDevice.
And that’s it! You’re now helping your users maintain a safe and secure experience with their wallets while using your apps. Related Documentation