addWallet static method
Future<Wallet>
addWallet({
- required SecureStore secureStore,
- required String seedPhrase,
- String? walletId,
- int accountId = 0,
- String walletName = 'Wallet',
- WalletType walletType = WalletType.openZeppelin,
Implementation
static Future<Wallet> addWallet({
required SecureStore secureStore,
required String seedPhrase,
String? walletId,
int accountId = 0,
String walletName = 'Wallet',
WalletType walletType = WalletType.openZeppelin,
}) async {
walletId = walletId ?? WalletService.newWalletId();
await secureStore.storeSecret(
key: seedPhraseKey(walletId),
secret: seedPhrase,
);
return Wallet(
id: walletId,
name: walletName,
type: walletType,
secureStoreType: secureStore.type,
);
}