localStorage after periods of inactivity. Because Portal stores the user’s signing share in localStorage, the share may be missing the next time a user opens your app.
The SDK invokes any onWalletNotOnDevice listeners during initialization when it detects this has happened.
Detecting storage loss
Register your listener as early as possible. If the event already fired before you subscribed, the callback is replayed automatically.WalletNotOnDevicePayload:
isBackedUp: true— direct the user to recover their wallet.isBackedUp: false— callclearLocalWallet()and restart the wallet creation flow.
Next steps
- Recover a wallet — step-by-step recovery flow to direct users to when
isBackedUpistrue. - Create a wallet — restart onboarding when no backup exists.