Function Signature
Description
Checks if the wallet signing shares are stored on the current device.Parameters
Returns
bool - true if the wallet is on device, false otherwise.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Check if the wallet is stored on the device.
Future<bool> isWalletOnDevice([String? chainId])
| Parameter | Type | Required | Description |
|---|---|---|---|
chainId | String | No | Optional chain ID to check. If null, checks for any wallet. |
bool - true if the wallet is on device, false otherwise.
import 'package:portal_flutter/portal_flutter.dart';
final portal = Portal();
final isOnDevice = await portal.isWalletOnDevice();
if (isOnDevice) {
print('Wallet is on this device');
} else {
print('Wallet needs to be recovered');
}
final exists = await portal.doesWalletExist();
final onDevice = await portal.isWalletOnDevice();
if (exists && !onDevice) {
// Wallet exists but needs to be recovered to this device
print('Please recover your wallet');
}
| Code | Description |
|---|---|
NOT_INITIALIZED | Portal was not initialized |
Was this page helpful?