isWalletBackedUp
Checks whether a wallet has completed backups. This method verifies if backup shares have been successfully created and stored.
Function Signature
Parameters
forChainId
: Optional chain identifier (e.g., "eip155:1" for Ethereum mainnet, "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" for Solana mainnet). If nil, checks backup status across all chains.
Returns
A boolean value indicating whether the wallet is backed up:
When forChainId is provided:
Returns
true
if a wallet exists for the specified chain and has at least one completed backup shareReturns
false
if no wallet exists or if no backup shares are completed
When forChainId is
nil
:Returns
true
if any wallet exists and has at least one completed backup shareReturns
false
if no wallets exist or if no backup shares are completed
Throws
PortalClassError.clientNotAvailable
if the client is not initialized
Example Usage
Implementation Notes
The method only considers backup shares with a status of
.completed
Incomplete or pending backups are not considered when determining backup status
Useful for ensuring wallet security and prompting users to complete backup
Should be checked before performing critical operations
Usage in App Flow
After Wallet Creation:
Security Checks:
Related Documentation
For more information about wallet backups, see:
Back up a wallet
Last updated
Was this helpful?