Skip to main content

Function Signature

Future<bool> isWalletBackedUp([String? chainId])

Description

Checks if the wallet has been backed up. Can optionally check for a specific chain.

Parameters

ParameterTypeRequiredDescription
chainIdStringNoOptional chain ID to check. If null, checks global backup status.

Returns

bool - true if the wallet is backed up, false otherwise.

Example

import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

final isBackedUp = await portal.isWalletBackedUp();

if (isBackedUp) {
  print('Wallet is backed up');
} else {
  print('Wallet needs backup');
}

Errors

CodeDescription
NOT_INITIALIZEDPortal was not initialized