isWalletBackedUp

suspend fun isWalletBackedUp(chainId: String? = null): Boolean

Checks if the wallet is backed up for a specific chain or globally.

This function attempts to determine if the wallet's cryptographic keys are backed up securely. It leverages the keychain object to query the backup status. If the backup check operation fails for any reason, it defaults to returning false.

Return

true if the wallet is backed up (either globally or for the specified chain), false otherwise, or if an error occurs during the backup check.

Parameters

chainId

Optional. The ID of the chain for which to check the backup status. If null, it checks the global backup status (across all chains).


suspend fun isWalletBackedUp(namespace: PortalNamespace): Boolean

Checks if the wallet associated with the given namespace is backed up.

This function attempts to retrieve the backup status of a wallet from the keychain. If the operation is successful, it returns true if the wallet is backed up, and false otherwise. If any error occurs during the process (e.g., keychain access failure), it will catch the exception and return false, indicating that the backup status could not be reliably determined or the wallet is not backed up.

Return

true if the wallet is backed up, false otherwise (including cases of failure to determine the status).

Parameters

namespace

The PortalNamespace representing the namespace of the wallet.