From 5b5ee30e41651e655038fb84683f8e2013f987ca Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 3 Feb 2023 16:34:06 -0600 Subject: [PATCH] centralized and cleaned up bip32 utils, and added mnemonic password functionality --- lib/models/stack_restoring_ui_state.dart | 3 + lib/models/wallet_restore_state.dart | 3 + .../restore_wallet_view.dart | 1 + .../helpers/restore_create_backup.dart | 5 +- .../sub_widgets/restoring_wallet_card.dart | 4 + .../coins/bitcoin/bitcoin_wallet.dart | 173 +-- .../coins/bitcoincash/bitcoincash_wallet.dart | 167 ++- lib/services/coins/coin_service.dart | 3 + .../coins/dogecoin/dogecoin_wallet.dart | 159 +-- .../coins/epiccash/epiccash_wallet.dart | 37 +- lib/services/coins/firo/firo_wallet.dart | 340 +++-- .../coins/litecoin/litecoin_wallet.dart | 173 ++- lib/services/coins/manager.dart | 3 + lib/services/coins/monero/monero_wallet.dart | 30 +- .../coins/namecoin/namecoin_wallet.dart | 175 ++- .../coins/particl/particl_wallet.dart | 169 +-- .../coins/wownero/wownero_wallet.dart | 30 +- .../mixins/paynym_wallet_interface.dart | 90 +- lib/utilities/bip32_utils.dart | 118 +- .../pages/send_view/send_view_test.mocks.dart | 1235 +++++++++-------- ...d_address_book_view_screen_test.mocks.dart | 7 + ..._entry_details_view_screen_test.mocks.dart | 7 + ...ess_book_entry_view_screen_test.mocks.dart | 7 + .../lockscreen_view_screen_test.mocks.dart | 7 + .../main_view_screen_testA_test.mocks.dart | 7 + .../main_view_screen_testB_test.mocks.dart | 7 + .../main_view_screen_testC_test.mocks.dart | 7 + .../backup_key_view_screen_test.mocks.dart | 7 + ...up_key_warning_view_screen_test.mocks.dart | 7 + .../create_pin_view_screen_test.mocks.dart | 7 + ...restore_wallet_view_screen_test.mocks.dart | 7 + ...ify_backup_key_view_screen_test.mocks.dart | 7 + .../currency_view_screen_test.mocks.dart | 7 + ...dd_custom_node_view_screen_test.mocks.dart | 7 + .../node_details_view_screen_test.mocks.dart | 7 + .../wallet_backup_view_screen_test.mocks.dart | 7 + ...rescan_warning_view_screen_test.mocks.dart | 7 + ...elete_mnemonic_view_screen_test.mocks.dart | 7 + ...allet_settings_view_screen_test.mocks.dart | 7 + .../settings_view_screen_test.mocks.dart | 7 + ...search_results_view_screen_test.mocks.dart | 7 + .../confirm_send_view_screen_test.mocks.dart | 7 + .../receive_view_screen_test.mocks.dart | 7 + .../send_view_screen_test.mocks.dart | 7 + .../wallet_view_screen_test.mocks.dart | 7 + test/services/coins/manager_test.mocks.dart | 20 +- .../managed_favorite_test.mocks.dart | 1177 ++++++++-------- .../table_view/table_view_row_test.mocks.dart | 1047 +++++++------- .../transaction_card_test.mocks.dart | 39 +- test/widget_tests/wallet_card_test.mocks.dart | 648 +++++---- ...et_info_row_balance_future_test.mocks.dart | 1161 ++++++++-------- .../wallet_info_row_test.mocks.dart | 1161 ++++++++-------- 52 files changed, 4388 insertions(+), 3958 deletions(-) diff --git a/lib/models/stack_restoring_ui_state.dart b/lib/models/stack_restoring_ui_state.dart index 21760b95a..312b0989f 100644 --- a/lib/models/stack_restoring_ui_state.dart +++ b/lib/models/stack_restoring_ui_state.dart @@ -125,6 +125,7 @@ class StackRestoringUIState extends ChangeNotifier { Manager? manager, String? address, String? mnemonic, + String? mnemonicPassphrase, int? height, }) { _walletStates[walletId]!.restoringState = restoringStatus; @@ -134,6 +135,8 @@ class StackRestoringUIState extends ChangeNotifier { address ?? _walletStates[walletId]!.address; _walletStates[walletId]!.mnemonic = mnemonic ?? _walletStates[walletId]!.mnemonic; + _walletStates[walletId]!.mnemonicPassphrase = + mnemonicPassphrase ?? _walletStates[walletId]!.mnemonicPassphrase; _walletStates[walletId]!.height = height ?? _walletStates[walletId]!.height; notifyListeners(); } diff --git a/lib/models/wallet_restore_state.dart b/lib/models/wallet_restore_state.dart index c8b96e1c3..a92753617 100644 --- a/lib/models/wallet_restore_state.dart +++ b/lib/models/wallet_restore_state.dart @@ -11,6 +11,7 @@ class WalletRestoreState extends ChangeNotifier { Manager? manager; String? address; String? mnemonic; + String? mnemonicPassphrase; int? height; StackRestoringStatus get restoringState => _restoringStatus; @@ -27,6 +28,7 @@ class WalletRestoreState extends ChangeNotifier { this.manager, this.address, this.mnemonic, + this.mnemonicPassphrase, this.height, }) { _restoringStatus = restoringStatus; @@ -45,6 +47,7 @@ class WalletRestoreState extends ChangeNotifier { manager: manager, address: this.address, mnemonic: mnemonic, + mnemonicPassphrase: mnemonicPassphrase, height: this.height, ); } diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart index 44a00083f..883af77e6 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart @@ -290,6 +290,7 @@ class _RestoreWalletViewState extends ConsumerState { // without using them await manager.recoverFromMnemonic( mnemonic: mnemonic, + mnemonicPassphrase: "", // TODO add ui for certain coins maxUnusedAddressGap: widget.coin == Coin.firo ? 50 : 20, maxNumberOfIndexesToCheck: 1000, height: height, diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart index 39bd4ac94..c517e5851 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart @@ -357,7 +357,9 @@ abstract class SWB { List mnemonicList = (walletbackup['mnemonic'] as List) .map((e) => e as String) .toList(); - String mnemonic = mnemonicList.join(" ").trim(); + final String mnemonic = mnemonicList.join(" ").trim(); + final String mnemonicPassphrase = + walletbackup['mnemonicPassphrase'] as String? ?? ""; uiState?.update( walletId: manager.walletId, @@ -403,6 +405,7 @@ abstract class SWB { // without using them await manager.recoverFromMnemonic( mnemonic: mnemonic, + mnemonicPassphrase: mnemonicPassphrase, maxUnusedAddressGap: manager.coin == Coin.firo ? 50 : 20, maxNumberOfIndexesToCheck: 1000, height: restoreHeight, diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_widgets/restoring_wallet_card.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_widgets/restoring_wallet_card.dart index 2239eee71..fc1b92d6c 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_widgets/restoring_wallet_card.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/sub_widgets/restoring_wallet_card.dart @@ -109,6 +109,8 @@ class _RestoringWalletCardState extends ConsumerState { if (mnemonicList.isEmpty) { await manager.recoverFromMnemonic( mnemonic: ref.read(provider).mnemonic!, + mnemonicPassphrase: + ref.read(provider).mnemonicPassphrase!, maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, height: ref.read(provider).height ?? 0, @@ -250,6 +252,8 @@ class _RestoringWalletCardState extends ConsumerState { if (mnemonicList.isEmpty) { await manager.recoverFromMnemonic( mnemonic: ref.read(provider).mnemonic!, + mnemonicPassphrase: + ref.read(provider).mnemonicPassphrase!, maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, diff --git a/lib/services/coins/bitcoin/bitcoin_wallet.dart b/lib/services/coins/bitcoin/bitcoin_wallet.dart index 06a590168..a9b6620b0 100644 --- a/lib/services/coins/bitcoin/bitcoin_wallet.dart +++ b/lib/services/coins/bitcoin/bitcoin_wallet.dart @@ -33,6 +33,7 @@ import 'package:stackwallet/services/notifications_api.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/address_utils.dart'; import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/bip32_utils.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/default_nodes.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -55,40 +56,15 @@ const String GENESIS_HASH_MAINNET = const String GENESIS_HASH_TESTNET = "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"; -bip32.BIP32 getBip32Node( - int chain, - int index, - String mnemonic, - NetworkType network, - DerivePathType derivePathType, -) { - final root = getBip32Root(mnemonic, network); - - final node = getBip32NodeFromRoot(chain, index, root, derivePathType); - return node; -} - -/// wrapper for compute() -bip32.BIP32 getBip32NodeWrapper( - Tuple5 args, -) { - return getBip32Node( - args.item1, - args.item2, - args.item3, - args.item4, - args.item5, - ); -} - -bip32.BIP32 getBip32NodeFromRoot( - int chain, - int index, - bip32.BIP32 root, - DerivePathType derivePathType, -) { +String constructDerivePath({ + required DerivePathType derivePathType, + required int networkWIF, + int account = 0, + required int chain, + required int index, +}) { String coinType; - switch (root.network.wif) { + switch (networkWIF) { case 0x80: // btc mainnet wif coinType = "0"; // btc mainnet break; @@ -96,49 +72,25 @@ bip32.BIP32 getBip32NodeFromRoot( coinType = "1"; // btc testnet break; default: - throw Exception("Invalid Bitcoin network type used!"); + throw Exception("Invalid Bitcoin network wif used!"); } + + int purpose; switch (derivePathType) { case DerivePathType.bip44: - return root.derivePath("m/44'/$coinType'/0'/$chain/$index"); + purpose = 44; + break; case DerivePathType.bip49: - return root.derivePath("m/49'/$coinType'/0'/$chain/$index"); + purpose = 49; + break; case DerivePathType.bip84: - return root.derivePath("m/84'/$coinType'/0'/$chain/$index"); + purpose = 84; + break; default: throw Exception("DerivePathType $derivePathType not supported"); } -} -/// wrapper for compute() -bip32.BIP32 getBip32NodeFromRootWrapper( - Tuple4 args, -) { - return getBip32NodeFromRoot( - args.item1, - args.item2, - args.item3, - args.item4, - ); -} - -bip32.BIP32 getBip32Root(String mnemonic, NetworkType network) { - final seed = bip39.mnemonicToSeed(mnemonic); - final networkType = bip32.NetworkType( - wif: network.wif, - bip32: bip32.Bip32Type( - public: network.bip32.public, - private: network.bip32.private, - ), - ); - - final root = bip32.BIP32.fromSeed(seed, networkType); - return root; -} - -/// wrapper for compute() -bip32.BIP32 getBip32RootWrapper(Tuple2 args) { - return getBip32Root(args.item1, args.item2); + return "m/$purpose'/$coinType'/$account'/$chain/$index"; } class BitcoinWallet extends CoinServiceAPI @@ -261,6 +213,15 @@ class BitcoinWallet extends CoinServiceAPI @override Future> get mnemonic => _getMnemonicList(); + @override + Future get mnemonicString => + _secureStore.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStore.read( + key: '${_walletId}_mnemonicPassphrase', + ); + Future get chainHeight async { try { final result = await _electrumXClient.getBlockHeadTip(); @@ -325,6 +286,7 @@ class BitcoinWallet extends CoinServiceAPI @override Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -355,14 +317,21 @@ class BitcoinWallet extends CoinServiceAPI } // check to make sure we aren't overwriting a mnemonic // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || + (await this.mnemonicPassphrase) != null) { longMutex = false; throw Exception("Attempted to overwrite mnemonic on restore!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: mnemonic.trim()); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: mnemonicPassphrase ?? "", + ); + await _recoverWalletFromBIP32SeedPhrase( mnemonic: mnemonic.trim(), + mnemonicPassphrase: mnemonicPassphrase ?? "", maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, ); @@ -405,15 +374,14 @@ class BitcoinWallet extends CoinServiceAPI final Map receivingNodes = {}; for (int j = 0; j < txCountBatchSize; j++) { - final node = await compute( - getBip32NodeFromRootWrapper, - Tuple4( - chain, - index + j, - root, - type, - ), + final derivePath = constructDerivePath( + derivePathType: type, + networkWIF: root.network.wif, + chain: chain, + index: index + j, ); + final node = await Bip32Utils.getBip32NodeFromRoot(root, derivePath); + String addressString; final data = PaymentData(pubkey: node.publicKey); isar_models.AddressType addrType; @@ -522,6 +490,7 @@ class BitcoinWallet extends CoinServiceAPI Future _recoverWalletFromBIP32SeedPhrase({ required String mnemonic, + required String mnemonicPassphrase, int maxUnusedAddressGap = 20, int maxNumberOfIndexesToCheck = 1000, bool isRescan = false, @@ -535,7 +504,11 @@ class BitcoinWallet extends CoinServiceAPI Map> p2shChangeDerivations = {}; Map> p2wpkhChangeDerivations = {}; - final root = await compute(getBip32RootWrapper, Tuple2(mnemonic, _network)); + final root = await Bip32Utils.getBip32Root( + mnemonic, + mnemonicPassphrase, + _network, + ); List p2pkhReceiveAddressArray = []; List p2shReceiveAddressArray = []; @@ -1350,7 +1323,8 @@ class BitcoinWallet extends CoinServiceAPI db: db, electrumXClient: electrumXClient, secureStorage: secureStore, - getMnemonic: () => mnemonic, + getMnemonicString: () => mnemonicString, + getMnemonicPassphrase: () => mnemonicPassphrase, getChainHeight: () => chainHeight, getCurrentChangeAddress: () => currentChangeAddressP2PKH, estimateTxFee: estimateTxFee, @@ -1361,7 +1335,6 @@ class BitcoinWallet extends CoinServiceAPI checkChangeAddressForTransactions: _checkP2PKHChangeAddressForTransactions, addDerivation: addDerivation, - addDerivations: addDerivations, dustLimitP2PKH: DUST_LIMIT_P2PKH, minConfirms: MINIMUM_CONFIRMATIONS, ); @@ -1397,12 +1370,11 @@ class BitcoinWallet extends CoinServiceAPI } Future> _getMnemonicList() async { - final mnemonicString = - await _secureStore.read(key: '${_walletId}_mnemonic'); - if (mnemonicString == null) { + final _mnemonicString = await mnemonicString; + if (_mnemonicString == null) { return []; } - final List data = mnemonicString.split(' '); + final List data = _mnemonicString.split(' '); return data; } @@ -1490,13 +1462,14 @@ class BitcoinWallet extends CoinServiceAPI } // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || (await mnemonicPassphrase) != null) { throw Exception( "Attempted to overwrite mnemonic on generate new wallet!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: bip39.generateMnemonic(strength: 256)); + await _secureStore.write(key: '${_walletId}_mnemonicPassphrase', value: ""); // Generate and add addresses to relevant arrays final initialAddresses = await Future.wait([ @@ -1526,17 +1499,22 @@ class BitcoinWallet extends CoinServiceAPI int index, DerivePathType derivePathType, ) async { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); - final node = await compute( - getBip32NodeWrapper, - Tuple5( - chain, - index, - mnemonic!, - _network, - derivePathType, - ), + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + + final derivePath = constructDerivePath( + derivePathType: derivePathType, + networkWIF: _network.wif, + chain: chain, + index: index, ); + final node = await Bip32Utils.getBip32Node( + _mnemonic!, + _mnemonicPassphrase!, + _network, + derivePath, + ); + final data = PaymentData(pubkey: node.publicKey); String address; isar_models.AddressType addrType; @@ -2925,9 +2903,12 @@ class BitcoinWallet extends CoinServiceAPI await _deleteDerivations(); try { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + await _recoverWalletFromBIP32SeedPhrase( - mnemonic: mnemonic!, + mnemonic: _mnemonic!, + mnemonicPassphrase: _mnemonicPassphrase!, maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, isRescan: true, diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index addc5dd68..e56511732 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -31,6 +31,7 @@ import 'package:stackwallet/services/notifications_api.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/address_utils.dart'; import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/bip32_utils.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/default_nodes.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -51,31 +52,15 @@ const String GENESIS_HASH_MAINNET = const String GENESIS_HASH_TESTNET = "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"; -bip32.BIP32 getBip32Node(int chain, int index, String mnemonic, - NetworkType network, DerivePathType derivePathType) { - final root = getBip32Root(mnemonic, network); - - final node = getBip32NodeFromRoot(chain, index, root, derivePathType); - return node; -} - -/// wrapper for compute() -bip32.BIP32 getBip32NodeWrapper( - Tuple5 args, -) { - return getBip32Node( - args.item1, - args.item2, - args.item3, - args.item4, - args.item5, - ); -} - -bip32.BIP32 getBip32NodeFromRoot( - int chain, int index, bip32.BIP32 root, DerivePathType derivePathType) { +String constructDerivePath({ + required DerivePathType derivePathType, + required int networkWIF, + int account = 0, + required int chain, + required int index, +}) { String coinType; - switch (root.network.wif) { + switch (networkWIF) { case 0x80: // bch mainnet wif coinType = derivePathType == DerivePathType.bch44 ? "145" : "0"; // bch mainnet @@ -84,48 +69,23 @@ bip32.BIP32 getBip32NodeFromRoot( coinType = "1"; // bch testnet break; default: - throw Exception("Invalid Bitcoincash network type used!"); + throw Exception("Invalid Bitcoincash network wif used!"); } + + int purpose; switch (derivePathType) { case DerivePathType.bip44: case DerivePathType.bch44: - return root.derivePath("m/44'/$coinType'/0'/$chain/$index"); - case DerivePathType.bip49: - return root.derivePath("m/49'/$coinType'/0'/$chain/$index"); + purpose = 44; + break; + case DerivePathType.bip84: + purpose = 84; + break; default: - throw Exception("DerivePathType must not be null."); + throw Exception("DerivePathType $derivePathType not supported"); } -} -/// wrapper for compute() -bip32.BIP32 getBip32NodeFromRootWrapper( - Tuple4 args, -) { - return getBip32NodeFromRoot( - args.item1, - args.item2, - args.item3, - args.item4, - ); -} - -bip32.BIP32 getBip32Root(String mnemonic, NetworkType network) { - final seed = bip39.mnemonicToSeed(mnemonic); - final networkType = bip32.NetworkType( - wif: network.wif, - bip32: bip32.Bip32Type( - public: network.bip32.public, - private: network.bip32.private, - ), - ); - - final root = bip32.BIP32.fromSeed(seed, networkType); - return root; -} - -/// wrapper for compute() -bip32.BIP32 getBip32RootWrapper(Tuple2 args) { - return getBip32Root(args.item1, args.item2); + return "m/$purpose'/$coinType'/$account'/$chain/$index"; } class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { @@ -214,6 +174,15 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { @override Future> get mnemonic => _getMnemonicList(); + @override + Future get mnemonicString => + _secureStore.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStore.read( + key: '${_walletId}_mnemonicPassphrase', + ); + Future get chainHeight async { try { final result = await _electrumXClient.getBlockHeadTip(); @@ -250,7 +219,9 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { throw ArgumentError('$address is not currently supported'); } } - } catch (e, s) {} + } catch (_) { + // invalid cash addr format + } try { decodeBase58 = bs58check.decode(address); } catch (err) { @@ -291,6 +262,7 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { @override Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -321,14 +293,21 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { } // check to make sure we aren't overwriting a mnemonic // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || + (await this.mnemonicPassphrase) != null) { longMutex = false; throw Exception("Attempted to overwrite mnemonic on restore!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: mnemonic.trim()); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: mnemonicPassphrase ?? "", + ); + await _recoverWalletFromBIP32SeedPhrase( mnemonic: mnemonic.trim(), + mnemonicPassphrase: mnemonicPassphrase ?? "", maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, coin: coin, @@ -372,15 +351,14 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { final Map receivingNodes = {}; for (int j = 0; j < txCountBatchSize; j++) { - final node = await compute( - getBip32NodeFromRootWrapper, - Tuple4( - chain, - index + j, - root, - type, - ), + final derivePath = constructDerivePath( + derivePathType: type, + networkWIF: root.network.wif, + chain: chain, + index: index + j, ); + final node = await Bip32Utils.getBip32NodeFromRoot(root, derivePath); + String addressString; final data = PaymentData(pubkey: node.publicKey); isar_models.AddressType addrType; @@ -493,6 +471,7 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { Future _recoverWalletFromBIP32SeedPhrase({ required String mnemonic, + required String mnemonicPassphrase, int maxUnusedAddressGap = 20, int maxNumberOfIndexesToCheck = 1000, bool isRescan = false, @@ -507,7 +486,11 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { Map> bch44P2pkhChangeDerivations = {}; Map> p2shChangeDerivations = {}; - final root = await compute(getBip32RootWrapper, Tuple2(mnemonic, _network)); + final root = await Bip32Utils.getBip32Root( + mnemonic, + mnemonicPassphrase, + _network, + ); List bip44P2pkhReceiveAddressArray = []; List bch44P2pkhReceiveAddressArray = []; @@ -531,7 +514,7 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { const txCountBatchSize = 12; try { - bool testnet = ((coin ?? null) == Coin.bitcoincashTestnet) ? true : false; + bool testnet = ((coin) == Coin.bitcoincashTestnet) ? true : false; // receiving addresses Logging.instance .log("checking receiving addresses...", level: LogLevel.Info); @@ -1334,12 +1317,11 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { } Future> _getMnemonicList() async { - final mnemonicString = - await _secureStore.read(key: '${_walletId}_mnemonic'); - if (mnemonicString == null) { + final _mnemonicString = await mnemonicString; + if (_mnemonicString == null) { return []; } - final List data = mnemonicString.split(' '); + final List data = _mnemonicString.split(' '); return data; } @@ -1440,13 +1422,14 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { } // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || (await mnemonicPassphrase) != null) { throw Exception( "Attempted to overwrite mnemonic on generate new wallet!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: bip39.generateMnemonic(strength: 256)); + await _secureStore.write(key: '${_walletId}_mnemonicPassphrase', value: ""); // Generate and add addresses to relevant arrays final initialAddresses = await Future.wait([ @@ -1472,17 +1455,22 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { int index, DerivePathType derivePathType, ) async { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); - final node = await compute( - getBip32NodeWrapper, - Tuple5( - chain, - index, - mnemonic!, - _network, - derivePathType, - ), + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + + final derivePath = constructDerivePath( + derivePathType: derivePathType, + networkWIF: _network.wif, + chain: chain, + index: index, ); + final node = await Bip32Utils.getBip32Node( + _mnemonic!, + _mnemonicPassphrase!, + _network, + derivePath, + ); + final data = PaymentData(pubkey: node.publicKey); String address; @@ -2970,9 +2958,12 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB { await _deleteDerivations(); try { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + await _recoverWalletFromBIP32SeedPhrase( - mnemonic: mnemonic!, + mnemonic: _mnemonic!, + mnemonicPassphrase: _mnemonicPassphrase!, maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, isRescan: true, diff --git a/lib/services/coins/coin_service.dart b/lib/services/coins/coin_service.dart index 87169609e..556245b3f 100644 --- a/lib/services/coins/coin_service.dart +++ b/lib/services/coins/coin_service.dart @@ -263,11 +263,14 @@ abstract class CoinServiceAPI { bool validateAddress(String address); Future> get mnemonic; + Future get mnemonicString; + Future get mnemonicPassphrase; Future testNetworkConnection(); Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, diff --git a/lib/services/coins/dogecoin/dogecoin_wallet.dart b/lib/services/coins/dogecoin/dogecoin_wallet.dart index 405f4652a..a262efc4d 100644 --- a/lib/services/coins/dogecoin/dogecoin_wallet.dart +++ b/lib/services/coins/dogecoin/dogecoin_wallet.dart @@ -32,6 +32,7 @@ import 'package:stackwallet/services/notifications_api.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/address_utils.dart'; import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/bip32_utils.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/default_nodes.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -52,31 +53,15 @@ const String GENESIS_HASH_MAINNET = const String GENESIS_HASH_TESTNET = "bb0a78264637406b6360aad926284d544d7049f45189db5664f3c4d07350559e"; -bip32.BIP32 getBip32Node(int chain, int index, String mnemonic, - NetworkType network, DerivePathType derivePathType) { - final root = getBip32Root(mnemonic, network); - - final node = getBip32NodeFromRoot(chain, index, root, derivePathType); - return node; -} - -/// wrapper for compute() -bip32.BIP32 getBip32NodeWrapper( - Tuple5 args, -) { - return getBip32Node( - args.item1, - args.item2, - args.item3, - args.item4, - args.item5, - ); -} - -bip32.BIP32 getBip32NodeFromRoot( - int chain, int index, bip32.BIP32 root, DerivePathType derivePathType) { +String constructDerivePath({ + required DerivePathType derivePathType, + required int networkWIF, + int account = 0, + required int chain, + required int index, +}) { String coinType; - switch (root.network.wif) { + switch (networkWIF) { case 0x9e: // doge mainnet wif coinType = "3"; // doge mainnet break; @@ -84,46 +69,19 @@ bip32.BIP32 getBip32NodeFromRoot( coinType = "1"; // doge testnet break; default: - throw Exception("Invalid Dogecoin network type used!"); + throw Exception("Invalid Dogecoin network wif used!"); } + + int purpose; switch (derivePathType) { case DerivePathType.bip44: - return root.derivePath("m/44'/$coinType'/0'/$chain/$index"); + purpose = 44; + break; default: - throw Exception( - "DerivePathType null or unsupported (${DerivePathType.bip44})"); + throw Exception("DerivePathType $derivePathType not supported"); } -} -/// wrapper for compute() -bip32.BIP32 getBip32NodeFromRootWrapper( - Tuple4 args, -) { - return getBip32NodeFromRoot( - args.item1, - args.item2, - args.item3, - args.item4, - ); -} - -bip32.BIP32 getBip32Root(String mnemonic, NetworkType network) { - final seed = bip39.mnemonicToSeed(mnemonic); - final networkType = bip32.NetworkType( - wif: network.wif, - bip32: bip32.Bip32Type( - public: network.bip32.public, - private: network.bip32.private, - ), - ); - - final root = bip32.BIP32.fromSeed(seed, networkType); - return root; -} - -/// wrapper for compute() -bip32.BIP32 getBip32RootWrapper(Tuple2 args) { - return getBip32Root(args.item1, args.item2); + return "m/$purpose'/$coinType'/$account'/$chain/$index"; } class DogecoinWallet extends CoinServiceAPI @@ -222,6 +180,15 @@ class DogecoinWallet extends CoinServiceAPI @override Future> get mnemonic => _getMnemonicList(); + @override + Future get mnemonicString => + _secureStore.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStore.read( + key: '${_walletId}_mnemonicPassphrase', + ); + Future get chainHeight async { try { final result = await _electrumXClient.getBlockHeadTip(); @@ -281,6 +248,7 @@ class DogecoinWallet extends CoinServiceAPI @override Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -311,14 +279,20 @@ class DogecoinWallet extends CoinServiceAPI } // check to make sure we aren't overwriting a mnemonic // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || + (await this.mnemonicPassphrase) != null) { longMutex = false; throw Exception("Attempted to overwrite mnemonic on restore!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: mnemonic.trim()); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: mnemonicPassphrase ?? "", + ); await _recoverWalletFromBIP32SeedPhrase( mnemonic: mnemonic.trim(), + mnemonicPassphrase: mnemonicPassphrase ?? "", maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, ); @@ -361,15 +335,14 @@ class DogecoinWallet extends CoinServiceAPI final Map receivingNodes = {}; for (int j = 0; j < txCountBatchSize; j++) { - final node = await compute( - getBip32NodeFromRootWrapper, - Tuple4( - chain, - index + j, - root, - type, - ), + final derivePath = constructDerivePath( + derivePathType: type, + networkWIF: root.network.wif, + chain: chain, + index: index + j, ); + final node = await Bip32Utils.getBip32NodeFromRoot(root, derivePath); + isar_models.Address address; switch (type) { case DerivePathType.bip44: @@ -463,6 +436,7 @@ class DogecoinWallet extends CoinServiceAPI Future _recoverWalletFromBIP32SeedPhrase({ required String mnemonic, + required String mnemonicPassphrase, int maxUnusedAddressGap = 20, int maxNumberOfIndexesToCheck = 1000, bool isRescan = false, @@ -472,7 +446,11 @@ class DogecoinWallet extends CoinServiceAPI Map> p2pkhReceiveDerivations = {}; Map> p2pkhChangeDerivations = {}; - final root = await compute(getBip32RootWrapper, Tuple2(mnemonic, network)); + final root = await Bip32Utils.getBip32Root( + mnemonic, + mnemonicPassphrase, + network, + ); List p2pkhReceiveAddressArray = []; int p2pkhReceiveIndex = -1; @@ -1187,12 +1165,11 @@ class DogecoinWallet extends CoinServiceAPI } Future> _getMnemonicList() async { - final mnemonicString = - await _secureStore.read(key: '${_walletId}_mnemonic'); - if (mnemonicString == null) { + final _mnemonicString = await mnemonicString; + if (_mnemonicString == null) { return []; } - final List data = mnemonicString.split(' '); + final List data = _mnemonicString.split(' '); return data; } @@ -1280,13 +1257,17 @@ class DogecoinWallet extends CoinServiceAPI } // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || (await mnemonicPassphrase) != null) { throw Exception( "Attempted to overwrite mnemonic on generate new wallet!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: bip39.generateMnemonic(strength: 256)); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: "", + ); // Generate and add addresses final initialReceivingAddressP2PKH = @@ -1310,17 +1291,22 @@ class DogecoinWallet extends CoinServiceAPI int index, DerivePathType derivePathType, ) async { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); - final node = await compute( - getBip32NodeWrapper, - Tuple5( - chain, - index, - mnemonic!, - network, - derivePathType, - ), + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + + final derivePath = constructDerivePath( + derivePathType: derivePathType, + networkWIF: network.wif, + chain: chain, + index: index, ); + final node = await Bip32Utils.getBip32Node( + _mnemonic!, + _mnemonicPassphrase!, + network, + derivePath, + ); + final data = PaymentData(pubkey: node.publicKey); String address; @@ -2561,9 +2547,12 @@ class DogecoinWallet extends CoinServiceAPI await _deleteDerivations(); try { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + await _recoverWalletFromBIP32SeedPhrase( - mnemonic: mnemonic!, + mnemonic: _mnemonic!, + mnemonicPassphrase: _mnemonicPassphrase!, maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, isRescan: true, diff --git a/lib/services/coins/epiccash/epiccash_wallet.dart b/lib/services/coins/epiccash/epiccash_wallet.dart index f5ef0f4b5..c788bc597 100644 --- a/lib/services/coins/epiccash/epiccash_wallet.dart +++ b/lib/services/coins/epiccash/epiccash_wallet.dart @@ -1103,26 +1103,24 @@ class EpicCashWallet extends CoinServiceAPI bool get isRefreshing => refreshMutex; @override - // TODO: implement maxFee + // unused for epic Future get maxFee => throw UnimplementedError(); Future> _getMnemonicList() async { - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { - final mnemonicString = - await _secureStore.read(key: '${_walletId}_mnemonic'); - final List data = mnemonicString!.split(' '); + String? _mnemonicString = await mnemonicString; + if (_mnemonicString != null) { + final List data = _mnemonicString.split(' '); return data; } else { - String? mnemonicString; await m.protect(() async { - mnemonicString = await compute( + _mnemonicString = await compute( _walletMnemonicWrapper, 0, ); }); await _secureStore.write( - key: '${_walletId}_mnemonic', value: mnemonicString); - final List data = mnemonicString!.split(' '); + key: '${_walletId}_mnemonic', value: _mnemonicString); + final List data = _mnemonicString!.split(' '); return data; } } @@ -1130,6 +1128,15 @@ class EpicCashWallet extends CoinServiceAPI @override Future> get mnemonic => _getMnemonicList(); + @override + Future get mnemonicString => + _secureStore.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStore.read( + key: '${_walletId}_mnemonicPassphrase', + ); + @override Future> prepareSend( {required String address, @@ -1359,11 +1366,13 @@ class EpicCashWallet extends CoinServiceAPI double highestPercent = 0; @override - Future recoverFromMnemonic( - {required String mnemonic, - required int maxUnusedAddressGap, - required int maxNumberOfIndexesToCheck, - required int height}) async { + Future recoverFromMnemonic({ + required String mnemonic, + required String mnemonicPassphrase, // unused in epic + required int maxUnusedAddressGap, + required int maxNumberOfIndexesToCheck, + required int height, + }) async { try { await _prefs.init(); await updateNode(false); diff --git a/lib/services/coins/firo/firo_wallet.dart b/lib/services/coins/firo/firo_wallet.dart index da8c2e1d0..d2a01b27f 100644 --- a/lib/services/coins/firo/firo_wallet.dart +++ b/lib/services/coins/firo/firo_wallet.dart @@ -4,7 +4,6 @@ import 'dart:io'; import 'dart:isolate'; import 'dart:math'; -import 'package:bip32/bip32.dart' as bip32; import 'package:bip39/bip39.dart' as bip39; import 'package:bitcoindart/bitcoindart.dart'; import 'package:decimal/decimal.dart'; @@ -25,6 +24,7 @@ import 'package:stackwallet/services/event_bus/events/global/refresh_percent_cha import 'package:stackwallet/services/event_bus/events/global/updated_in_background_event.dart'; import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart'; import 'package:stackwallet/services/event_bus/global_event_bus.dart'; +import 'package:stackwallet/services/mixins/firo_hive.dart'; import 'package:stackwallet/services/mixins/wallet_cache.dart'; import 'package:stackwallet/services/mixins/wallet_db.dart'; import 'package:stackwallet/services/node_service.dart'; @@ -32,6 +32,7 @@ import 'package:stackwallet/services/notifications_api.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/address_utils.dart'; import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/bip32_utils.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/default_nodes.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -43,8 +44,6 @@ import 'package:stackwallet/utilities/prefs.dart'; import 'package:tuple/tuple.dart'; import 'package:uuid/uuid.dart'; -import '../../mixins/firo_hive.dart'; - const DUST_LIMIT = 1000; const MINIMUM_CONFIRMATIONS = 1; const MINT_LIMIT = 100100000000; @@ -102,6 +101,7 @@ Future executeNative(Map arguments) async { final address = arguments['address'] as String; final subtractFeeFromAmount = arguments['subtractFeeFromAmount'] as bool; final mnemonic = arguments['mnemonic'] as String; + final mnemonicPassphrase = arguments['mnemonicPassphrase'] as String; final index = arguments['index'] as int; final lelantusEntries = arguments['lelantusEntries'] as List; @@ -115,6 +115,7 @@ Future executeNative(Map arguments) async { address, subtractFeeFromAmount, mnemonic, + mnemonicPassphrase, index, lelantusEntries, locktime, @@ -143,11 +144,13 @@ Future executeNative(Map arguments) async { final setDataMap = arguments['setDataMap'] as Map; final usedSerialNumbers = arguments['usedSerialNumbers'] as List?; final mnemonic = arguments['mnemonic'] as String; + final mnemonicPassphrase = arguments['mnemonicPassphrase'] as String; final coin = arguments['coin'] as Coin; final network = arguments['network'] as NetworkType?; if (!(usedSerialNumbers == null || network == null)) { var restoreData = await isolateRestore( mnemonic, + mnemonicPassphrase, coin, latestSetId, setDataMap, @@ -159,11 +162,13 @@ Future executeNative(Map arguments) async { } } else if (function == "isolateDerive") { final mnemonic = arguments['mnemonic'] as String; + final mnemonicPassphrase = arguments['mnemonicPassphrase'] as String; final from = arguments['from'] as int; final to = arguments['to'] as int; final network = arguments['network'] as NetworkType?; if (!(network == null)) { - var derived = await isolateDerive(mnemonic, from, to, network); + var derived = await isolateDerive( + mnemonic, mnemonicPassphrase, from, to, network); sendPort.send(derived); return; } @@ -192,13 +197,31 @@ void stop(ReceivePort port) { } Future> isolateDerive( - String mnemonic, int from, int to, NetworkType _network) async { + String mnemonic, + String mnemonicPassphrase, + int from, + int to, + NetworkType _network, +) async { Map result = {}; Map allReceive = {}; Map allChange = {}; - final root = getBip32Root(mnemonic, _network); + final root = await Bip32Utils.getBip32Root( + mnemonic, + mnemonicPassphrase, + _network, + ); + for (int i = from; i < to; i++) { - var currentNode = getBip32NodeFromRoot(0, i, root); + final derivePathReceiving = constructDerivePath( + networkWIF: _network.wif, + chain: 0, + index: i, + ); + var currentNode = await Bip32Utils.getBip32NodeFromRoot( + root, + derivePathReceiving, + ); var address = P2PKH( network: _network, data: PaymentData(pubkey: currentNode.publicKey)) .data @@ -209,7 +232,15 @@ Future> isolateDerive( "address": address, }; - currentNode = getBip32NodeFromRoot(1, i, root); + final derivePathChange = constructDerivePath( + networkWIF: _network.wif, + chain: 0, + index: i, + ); + currentNode = await Bip32Utils.getBip32NodeFromRoot( + root, + derivePathChange, + ); address = P2PKH( network: _network, data: PaymentData(pubkey: currentNode.publicKey)) .data @@ -230,6 +261,7 @@ Future> isolateDerive( Future> isolateRestore( String mnemonic, + String mnemonicPassphrase, Coin coin, int _latestSetId, Map _setDataMap, @@ -250,9 +282,19 @@ Future> isolateRestore( usedSerialNumbersSet.add(usedSerialNumbers[ind]); } - final root = getBip32Root(mnemonic, network); + final root = await Bip32Utils.getBip32Root( + mnemonic, + mnemonicPassphrase, + network, + ); while (currentIndex < lastFoundIndex + 50) { - final mintKeyPair = getBip32NodeFromRoot(MINT_INDEX, currentIndex, root); + final _derivePath = constructDerivePath( + networkWIF: network.wif, + chain: MINT_INDEX, + index: currentIndex, + ); + final mintKeyPair = + await Bip32Utils.getBip32NodeFromRoot(root, _derivePath); final mintTag = CreateTag( Format.uint8listToString(mintKeyPair.privateKey!), currentIndex, @@ -300,7 +342,14 @@ Future> isolateRestore( .log("amount $amount used $isUsed", level: LogLevel.Info); } else { final keyPath = GetAesKeyPath(foundCoin[0] as String); - final aesKeyPair = getBip32NodeFromRoot(JMINT_INDEX, keyPath, root); + final derivePath = constructDerivePath( + networkWIF: network.wif, + chain: JMINT_INDEX, + index: keyPath, + ); + final aesKeyPair = + await Bip32Utils.getBip32NodeFromRoot(root, derivePath); + if (aesKeyPair.privateKey != null) { final aesPrivateKey = Format.uint8listToString(aesKeyPair.privateKey!); @@ -491,6 +540,7 @@ Future isolateCreateJoinSplitTransaction( String address, bool subtractFeeFromAmount, String mnemonic, + String mnemonicPassphrase, int index, List lelantusEntries, int locktime, @@ -521,8 +571,17 @@ Future isolateCreateJoinSplitTransaction( 4294967295, Uint8List(0), ); - - final jmintKeyPair = getBip32Node(MINT_INDEX, index, mnemonic, _network); + final derivePath = constructDerivePath( + networkWIF: _network.wif, + chain: MINT_INDEX, + index: index, + ); + final jmintKeyPair = await Bip32Utils.getBip32Node( + mnemonic, + mnemonicPassphrase, + _network, + derivePath, + ); final String jmintprivatekey = Format.uint8listToString(jmintKeyPair.privateKey!); @@ -530,7 +589,17 @@ Future isolateCreateJoinSplitTransaction( final keyPath = getMintKeyPath(changeToMint, jmintprivatekey, index, isTestnet: coin == Coin.firoTestNet); - final aesKeyPair = getBip32Node(JMINT_INDEX, keyPath, mnemonic, _network); + final _derivePath = constructDerivePath( + networkWIF: _network.wif, + chain: JMINT_INDEX, + index: keyPath, + ); + final aesKeyPair = await Bip32Utils.getBip32Node( + mnemonic, + mnemonicPassphrase, + _network, + _derivePath, + ); final aesPrivateKey = Format.uint8listToString(aesKeyPair.privateKey!); final jmintData = createJMintScript( @@ -659,29 +728,15 @@ Future getBlockHead(ElectrumX client) async { } // end of isolates -bip32.BIP32 getBip32Node( - int chain, int index, String mnemonic, NetworkType network) { - final root = getBip32Root(mnemonic, network); - - final node = getBip32NodeFromRoot(chain, index, root); - return node; -} - -/// wrapper for compute() -bip32.BIP32 getBip32NodeWrapper( - Tuple4 args, -) { - return getBip32Node( - args.item1, - args.item2, - args.item3, - args.item4, - ); -} - -bip32.BIP32 getBip32NodeFromRoot(int chain, int index, bip32.BIP32 root) { +String constructDerivePath({ + // required DerivePathType derivePathType, + required int networkWIF, + int account = 0, + required int chain, + required int index, +}) { String coinType; - switch (root.network.wif) { + switch (networkWIF) { case 0xd2: // firo mainnet wif coinType = "136"; // firo mainnet break; @@ -689,41 +744,19 @@ bip32.BIP32 getBip32NodeFromRoot(int chain, int index, bip32.BIP32 root) { coinType = "1"; // firo testnet break; default: - throw Exception("Invalid Bitcoin network type used!"); + throw Exception("Invalid Firo network wif used!"); } - final node = root.derivePath("m/44'/$coinType'/0'/$chain/$index"); - return node; -} + int purpose; + // switch (derivePathType) { + // case DerivePathType.bip44: + purpose = 44; + // break; + // default: + // throw Exception("DerivePathType $derivePathType not supported"); + // } -/// wrapper for compute() -bip32.BIP32 getBip32NodeFromRootWrapper( - Tuple3 args, -) { - return getBip32NodeFromRoot( - args.item1, - args.item2, - args.item3, - ); -} - -bip32.BIP32 getBip32Root(String mnemonic, NetworkType network) { - final seed = bip39.mnemonicToSeed(mnemonic); - final firoNetworkType = bip32.NetworkType( - wif: network.wif, - bip32: bip32.Bip32Type( - public: network.bip32.public, - private: network.bip32.private, - ), - ); - - final root = bip32.BIP32.fromSeed(seed, firoNetworkType); - return root; -} - -/// wrapper for compute() -bip32.BIP32 getBip32RootWrapper(Tuple2 args) { - return getBip32Root(args.item1, args.item2); + return "m/$purpose'/$coinType'/$account'/$chain/$index"; } Future _getMintScriptWrapper( @@ -795,6 +828,15 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { @override Future> get mnemonic => _getMnemonicList(); + @override + Future get mnemonicString => + _secureStore.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStore.read( + key: '${_walletId}_mnemonicPassphrase', + ); + @override bool validateAddress(String address) { return Address.validateAddress(address, _network); @@ -1178,12 +1220,11 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { // } Future> _getMnemonicList() async { - final mnemonicString = - await _secureStore.read(key: '${_walletId}_mnemonic'); - if (mnemonicString == null) { + final _mnemonicString = await mnemonicString; + if (_mnemonicString == null) { return []; } - final List data = mnemonicString.split(' '); + final List data = _mnemonicString.split(' '); return data; } @@ -2085,10 +2126,17 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { } // this should never fail as overwriting a mnemonic is big bad - assert((await _secureStore.read(key: '${_walletId}_mnemonic')) == null); + if ((await mnemonicString) != null || (await mnemonicPassphrase) != null) { + longMutex = false; + throw Exception("Attempted to overwrite mnemonic on initialize new!"); + } await _secureStore.write( key: '${_walletId}_mnemonic', value: bip39.generateMnemonic(strength: 256)); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: "", + ); await firoUpdateJIndex([]); // Generate and add addresses to relevant arrays @@ -2134,9 +2182,14 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { receiveDerivationsString == "{}") { GlobalEventBus.instance .fire(RefreshPercentChangedEvent(0.05, walletId)); - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); - await fillAddresses(mnemonic!, - numberOfThreads: Platform.numberOfProcessors - isolates.length - 1); + final mnemonic = await mnemonicString; + final mnemonicPassphrase = + await _secureStore.read(key: '${_walletId}_mnemonicPassphrase'); + await fillAddresses( + mnemonic!, + mnemonicPassphrase!, + numberOfThreads: Platform.numberOfProcessors - isolates.length - 1, + ); } await checkReceivingAddressForTransactions(); @@ -2226,24 +2279,25 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { } Future> _getLelantusEntry() async { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + final List lelantusCoins = await _getUnspentCoins(); - final root = await compute( - getBip32RootWrapper, - Tuple2( - mnemonic!, - _network, - ), + + final root = await Bip32Utils.getBip32Root( + _mnemonic!, + _mnemonicPassphrase!, + _network, ); + final waitLelantusEntries = lelantusCoins.map((coin) async { - final keyPair = await compute( - getBip32NodeFromRootWrapper, - Tuple3( - MINT_INDEX, - coin.index, - root, - ), + final derivePath = constructDerivePath( + networkWIF: _network.wif, + chain: MINT_INDEX, + index: coin.index, ); + final keyPair = await Bip32Utils.getBip32NodeFromRoot(root, derivePath); + if (keyPair.privateKey == null) { Logging.instance.log("error bad key", level: LogLevel.Error); return DartLelantusEntry(1, 0, 0, 0, 0, ''); @@ -2887,16 +2941,21 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { } Future _getMintHex(int amount, int index) async { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); - final mintKeyPair = await compute( - getBip32NodeWrapper, - Tuple4( - MINT_INDEX, - index, - mnemonic!, - _network, - ), + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + + final derivePath = constructDerivePath( + networkWIF: _network.wif, + chain: MINT_INDEX, + index: index, ); + final mintKeyPair = await Bip32Utils.getBip32Node( + _mnemonic!, + _mnemonicPassphrase!, + _network, + derivePath, + ); + String keydata = Format.uint8listToString(mintKeyPair.privateKey!); String seedID = Format.uint8listToString(mintKeyPair.identifier); @@ -3691,8 +3750,12 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { return address!.value; } - Future fillAddresses(String suppliedMnemonic, - {int perBatch = 50, int numberOfThreads = 4}) async { + Future fillAddresses( + String suppliedMnemonic, + String mnemonicPassphrase, { + int perBatch = 50, + int numberOfThreads = 4, + }) async { if (numberOfThreads <= 0) { numberOfThreads = 1; } @@ -3718,6 +3781,7 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { ReceivePort receivePort = await getIsolate({ "function": "isolateDerive", "mnemonic": suppliedMnemonic, + "mnemonicPassphrase": mnemonicPassphrase, "from": start + i * perBatch, "to": start + (i + 1) * perBatch, "network": _network, @@ -3757,8 +3821,8 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { /// [index] - This can be any integer >= 0 Future _generateAddressForChain( int chain, int index) async { - // final wallet = await Hive.openBox(this._walletId); - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; Map? derivations; if (chain == 0) { final receiveDerivationsString = @@ -3774,8 +3838,11 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { if (derivations!.isNotEmpty) { if (derivations["$index"] == null) { - await fillAddresses(mnemonic!, - numberOfThreads: Platform.numberOfProcessors - isolates.length - 1); + await fillAddresses( + _mnemonic!, + _mnemonicPassphrase!, + numberOfThreads: Platform.numberOfProcessors - isolates.length - 1, + ); Logging.instance.log("calling _generateAddressForChain recursively", level: LogLevel.Info); return _generateAddressForChain(chain, index); @@ -3792,8 +3859,18 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { : isar_models.AddressSubType.change, ); } else { - final node = await compute( - getBip32NodeWrapper, Tuple4(chain, index, mnemonic!, _network)); + final derivePath = constructDerivePath( + networkWIF: _network.wif, + chain: chain, + index: index, + ); + final node = await Bip32Utils.getBip32Node( + _mnemonic!, + _mnemonicPassphrase!, + _network, + derivePath, + ); + final address = P2PKH(network: _network, data: PaymentData(pubkey: node.publicKey)) .data @@ -3882,8 +3959,13 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { await _deleteDerivations(); try { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); - await _recoverWalletFromBIP32SeedPhrase(mnemonic!, maxUnusedAddressGap); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + await _recoverWalletFromBIP32SeedPhrase( + _mnemonic!, + _mnemonicPassphrase!, + maxUnusedAddressGap, + ); longMutex = false; await refresh(); @@ -4069,6 +4151,7 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { @override Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -4109,13 +4192,22 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { // } } // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || + (await this.mnemonicPassphrase) != null) { + longMutex = false; throw Exception("Attempted to overwrite mnemonic on restore!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: mnemonic.trim()); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: mnemonicPassphrase ?? "", + ); await _recoverWalletFromBIP32SeedPhrase( - mnemonic.trim(), maxUnusedAddressGap); + mnemonic.trim(), + mnemonicPassphrase ?? "", + maxUnusedAddressGap, + ); await compute( _setTestnetWrapper, @@ -4151,6 +4243,7 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { Future _makeDerivations( String suppliedMnemonic, + String mnemonicPassphrase, int maxUnusedAddressGap, ) async { List receivingAddressArray = []; @@ -4163,7 +4256,7 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { int receivingGapCounter = 0; int changeGapCounter = 0; - await fillAddresses(suppliedMnemonic, + await fillAddresses(suppliedMnemonic, mnemonicPassphrase, numberOfThreads: Platform.numberOfProcessors - isolates.length - 1); final receiveDerivationsString = @@ -4276,7 +4369,10 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { /// Recovers wallet from [suppliedMnemonic]. Expects a valid mnemonic. Future _recoverWalletFromBIP32SeedPhrase( - String suppliedMnemonic, int maxUnusedAddressGap) async { + String suppliedMnemonic, + String mnemonicPassphrase, + int maxUnusedAddressGap, + ) async { longMutex = true; Logging.instance .log("PROCESSORS ${Platform.numberOfProcessors}", level: LogLevel.Info); @@ -4284,8 +4380,8 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { final latestSetId = await getLatestSetId(); final setDataMap = getSetDataMap(latestSetId); final usedSerialNumbers = getUsedCoinSerials(); - final makeDerivations = - _makeDerivations(suppliedMnemonic, maxUnusedAddressGap); + final makeDerivations = _makeDerivations( + suppliedMnemonic, mnemonicPassphrase, maxUnusedAddressGap); await Future.wait([ updateCachedId(walletId), @@ -4307,12 +4403,15 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { Future _restore(int latestSetId, Map setDataMap, dynamic usedSerialNumbers) async { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + final dataFuture = _refreshTransactions(); ReceivePort receivePort = await getIsolate({ "function": "restore", - "mnemonic": mnemonic, + "mnemonic": _mnemonic, + "mnemonicPassphrase": _mnemonicPassphrase, "coin": coin, "latestSetId": latestSetId, "setDataMap": setDataMap, @@ -4422,8 +4521,8 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { Future _createJoinSplitTransaction( int spendAmount, String address, bool subtractFeeFromAmount) async { - // final price = await firoPrice; - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; final index = firoGetMintIndex(); final lelantusEntry = await _getLelantusEntry(); final anonymitySets = await fetchAnonymitySets(); @@ -4436,7 +4535,8 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive { "spendAmount": spendAmount, "address": address, "subtractFeeFromAmount": subtractFeeFromAmount, - "mnemonic": mnemonic, + "mnemonic": _mnemonic, + "mnemonicPassphrase": _mnemonicPassphrase, "index": index, // "price": price, "lelantusEntries": lelantusEntry, diff --git a/lib/services/coins/litecoin/litecoin_wallet.dart b/lib/services/coins/litecoin/litecoin_wallet.dart index 54de6e053..3e8d90879 100644 --- a/lib/services/coins/litecoin/litecoin_wallet.dart +++ b/lib/services/coins/litecoin/litecoin_wallet.dart @@ -30,6 +30,7 @@ import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/notifications_api.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/bip32_utils.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/default_nodes.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -51,40 +52,15 @@ const String GENESIS_HASH_MAINNET = const String GENESIS_HASH_TESTNET = "4966625a4b2851d9fdee139e56211a0d88575f59ed816ff5e6a63deb4e3e29a0"; -bip32.BIP32 getBip32Node( - int chain, - int index, - String mnemonic, - NetworkType network, - DerivePathType derivePathType, -) { - final root = getBip32Root(mnemonic, network); - - final node = getBip32NodeFromRoot(chain, index, root, derivePathType); - return node; -} - -/// wrapper for compute() -bip32.BIP32 getBip32NodeWrapper( - Tuple5 args, -) { - return getBip32Node( - args.item1, - args.item2, - args.item3, - args.item4, - args.item5, - ); -} - -bip32.BIP32 getBip32NodeFromRoot( - int chain, - int index, - bip32.BIP32 root, - DerivePathType derivePathType, -) { +String constructDerivePath({ + required DerivePathType derivePathType, + required int networkWIF, + int account = 0, + required int chain, + required int index, +}) { String coinType; - switch (root.network.wif) { + switch (networkWIF) { case 0xb0: // ltc mainnet wif coinType = "2"; // ltc mainnet break; @@ -92,49 +68,25 @@ bip32.BIP32 getBip32NodeFromRoot( coinType = "1"; // ltc testnet break; default: - throw Exception("Invalid Litecoin network type used!"); + throw Exception("Invalid Litecoin network wif used!"); } + + int purpose; switch (derivePathType) { case DerivePathType.bip44: - return root.derivePath("m/44'/$coinType'/0'/$chain/$index"); + purpose = 44; + break; case DerivePathType.bip49: - return root.derivePath("m/49'/$coinType'/0'/$chain/$index"); + purpose = 49; + break; case DerivePathType.bip84: - return root.derivePath("m/84'/$coinType'/0'/$chain/$index"); + purpose = 84; + break; default: - throw Exception("DerivePathType unsupported"); + throw Exception("DerivePathType $derivePathType not supported"); } -} -/// wrapper for compute() -bip32.BIP32 getBip32NodeFromRootWrapper( - Tuple4 args, -) { - return getBip32NodeFromRoot( - args.item1, - args.item2, - args.item3, - args.item4, - ); -} - -bip32.BIP32 getBip32Root(String mnemonic, NetworkType network) { - final seed = bip39.mnemonicToSeed(mnemonic); - final networkType = bip32.NetworkType( - wif: network.wif, - bip32: bip32.Bip32Type( - public: network.bip32.public, - private: network.bip32.private, - ), - ); - - final root = bip32.BIP32.fromSeed(seed, networkType); - return root; -} - -/// wrapper for compute() -bip32.BIP32 getBip32RootWrapper(Tuple2 args) { - return getBip32Root(args.item1, args.item2); + return "m/$purpose'/$coinType'/$account'/$chain/$index"; } class LitecoinWallet extends CoinServiceAPI @@ -236,6 +188,15 @@ class LitecoinWallet extends CoinServiceAPI @override Future> get mnemonic => _getMnemonicList(); + @override + Future get mnemonicString => + _secureStore.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStore.read( + key: '${_walletId}_mnemonicPassphrase', + ); + Future get chainHeight async { try { final result = await _electrumXClient.getBlockHeadTip(); @@ -300,6 +261,7 @@ class LitecoinWallet extends CoinServiceAPI @override Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -339,14 +301,20 @@ class LitecoinWallet extends CoinServiceAPI } // check to make sure we aren't overwriting a mnemonic // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || + (await this.mnemonicPassphrase) != null) { longMutex = false; throw Exception("Attempted to overwrite mnemonic on restore!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: mnemonic.trim()); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: mnemonicPassphrase ?? "", + ); await _recoverWalletFromBIP32SeedPhrase( mnemonic: mnemonic.trim(), + mnemonicPassphrase: mnemonicPassphrase ?? "", maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, ); @@ -389,15 +357,14 @@ class LitecoinWallet extends CoinServiceAPI final Map receivingNodes = {}; for (int j = 0; j < txCountBatchSize; j++) { - final node = await compute( - getBip32NodeFromRootWrapper, - Tuple4( - chain, - index + j, - root, - type, - ), + final derivePath = constructDerivePath( + derivePathType: type, + networkWIF: root.network.wif, + chain: chain, + index: index + j, ); + final node = await Bip32Utils.getBip32NodeFromRoot(root, derivePath); + String addressString; final data = PaymentData(pubkey: node.publicKey); isar_models.AddressType addrType; @@ -515,6 +482,7 @@ class LitecoinWallet extends CoinServiceAPI Future _recoverWalletFromBIP32SeedPhrase({ required String mnemonic, + required String mnemonicPassphrase, int maxUnusedAddressGap = 20, int maxNumberOfIndexesToCheck = 1000, bool isRescan = false, @@ -528,7 +496,11 @@ class LitecoinWallet extends CoinServiceAPI Map> p2shChangeDerivations = {}; Map> p2wpkhChangeDerivations = {}; - final root = await compute(getBip32RootWrapper, Tuple2(mnemonic, _network)); + final root = await Bip32Utils.getBip32Root( + mnemonic, + mnemonicPassphrase, + _network, + ); List p2pkhReceiveAddressArray = []; List p2shReceiveAddressArray = []; @@ -1321,12 +1293,11 @@ class LitecoinWallet extends CoinServiceAPI } Future> _getMnemonicList() async { - final mnemonicString = - await _secureStore.read(key: '${_walletId}_mnemonic'); - if (mnemonicString == null) { + final _mnemonicString = await mnemonicString; + if (_mnemonicString == null) { return []; } - final List data = mnemonicString.split(' '); + final List data = _mnemonicString.split(' '); return data; } @@ -1463,13 +1434,17 @@ class LitecoinWallet extends CoinServiceAPI } // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || (await mnemonicPassphrase) != null) { throw Exception( "Attempted to overwrite mnemonic on generate new wallet!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: bip39.generateMnemonic(strength: 256)); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: "", + ); // Generate and add addresses to relevant arrays final initialAddresses = await Future.wait([ @@ -1499,17 +1474,22 @@ class LitecoinWallet extends CoinServiceAPI int index, DerivePathType derivePathType, ) async { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); - final node = await compute( - getBip32NodeWrapper, - Tuple5( - chain, - index, - mnemonic!, - _network, - derivePathType, - ), + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + + final derivePath = constructDerivePath( + derivePathType: derivePathType, + networkWIF: _network.wif, + chain: chain, + index: index, ); + final node = await Bip32Utils.getBip32Node( + _mnemonic!, + _mnemonicPassphrase!, + _network, + derivePath, + ); + final data = PaymentData(pubkey: node.publicKey); String address; isar_models.AddressType addrType; @@ -2888,9 +2868,12 @@ class LitecoinWallet extends CoinServiceAPI await _deleteDerivations(); try { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + await _recoverWalletFromBIP32SeedPhrase( - mnemonic: mnemonic!, + mnemonic: _mnemonic!, + mnemonicPassphrase: _mnemonicPassphrase!, maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, isRescan: true, diff --git a/lib/services/coins/manager.dart b/lib/services/coins/manager.dart index 203c2d05f..1ddf4499d 100644 --- a/lib/services/coins/manager.dart +++ b/lib/services/coins/manager.dart @@ -160,6 +160,7 @@ class Manager with ChangeNotifier { _currentWallet.validateAddress(address); Future> get mnemonic => _currentWallet.mnemonic; + Future get mnemonicPassphrase => _currentWallet.mnemonicPassphrase; Future testNetworkConnection() => _currentWallet.testNetworkConnection(); @@ -168,6 +169,7 @@ class Manager with ChangeNotifier { Future initializeExisting() => _currentWallet.initializeExisting(); Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -175,6 +177,7 @@ class Manager with ChangeNotifier { try { await _currentWallet.recoverFromMnemonic( mnemonic: mnemonic, + mnemonicPassphrase: mnemonicPassphrase, maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, height: height, diff --git a/lib/services/coins/monero/monero_wallet.dart b/lib/services/coins/monero/monero_wallet.dart index 63c1e431d..29e456b62 100644 --- a/lib/services/coins/monero/monero_wallet.dart +++ b/lib/services/coins/monero/monero_wallet.dart @@ -314,7 +314,7 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { await _prefs.init(); // this should never fail - if ((await _secureStorage.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || (await mnemonicPassphrase) != null) { throw Exception( "Attempted to overwrite mnemonic on generate new wallet!"); } @@ -365,6 +365,10 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { await _secureStorage.write( key: '${_walletId}_mnemonic', value: wallet?.seed.trim()); + await _secureStorage.write( + key: '${_walletId}_mnemonicPassphrase', + value: "", + ); walletInfo.address = wallet?.walletAddresses.address; await DB.instance .add(boxName: WalletInfo.boxName, value: walletInfo); @@ -419,15 +423,23 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { @override Future> get mnemonic async { - final mnemonicString = - await _secureStorage.read(key: '${_walletId}_mnemonic'); - if (mnemonicString == null) { + final _mnemonicString = await mnemonicString; + if (_mnemonicString == null) { return []; } - final List data = mnemonicString.split(' '); + final List data = _mnemonicString.split(' '); return data; } + @override + Future get mnemonicString => + _secureStorage.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStorage.read( + key: '${_walletId}_mnemonicPassphrase', + ); + @override Future> prepareSend({ required String address, @@ -519,6 +531,7 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { @override Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, // not used at the moment required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -543,12 +556,17 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { // } // check to make sure we aren't overwriting a mnemonic // this should never fail - if ((await _secureStorage.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || + (await this.mnemonicPassphrase) != null) { longMutex = false; throw Exception("Attempted to overwrite mnemonic on restore!"); } await _secureStorage.write( key: '${_walletId}_mnemonic', value: mnemonic.trim()); + await _secureStorage.write( + key: '${_walletId}_mnemonicPassphrase', + value: mnemonicPassphrase ?? "", + ); await DB.instance .put(boxName: walletId, key: "restoreHeight", value: height); diff --git a/lib/services/coins/namecoin/namecoin_wallet.dart b/lib/services/coins/namecoin/namecoin_wallet.dart index 23323b7fa..91862e165 100644 --- a/lib/services/coins/namecoin/namecoin_wallet.dart +++ b/lib/services/coins/namecoin/namecoin_wallet.dart @@ -30,6 +30,7 @@ import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/notifications_api.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/bip32_utils.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/default_nodes.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -51,87 +52,38 @@ const String GENESIS_HASH_MAINNET = const String GENESIS_HASH_TESTNET = "00000007199508e34a9ff81e6ec0c477a4cccff2a4767a8eee39c11db367b008"; -bip32.BIP32 getBip32Node( - int chain, - int index, - String mnemonic, - NetworkType network, - DerivePathType derivePathType, -) { - final root = getBip32Root(mnemonic, network); - - final node = getBip32NodeFromRoot(chain, index, root, derivePathType); - return node; -} - -/// wrapper for compute() -bip32.BIP32 getBip32NodeWrapper( - Tuple5 args, -) { - return getBip32Node( - args.item1, - args.item2, - args.item3, - args.item4, - args.item5, - ); -} - -bip32.BIP32 getBip32NodeFromRoot( - int chain, - int index, - bip32.BIP32 root, - DerivePathType derivePathType, -) { +String constructDerivePath({ + required DerivePathType derivePathType, + required int networkWIF, + int account = 0, + required int chain, + required int index, +}) { String coinType; - switch (root.network.wif) { + switch (networkWIF) { case 0xb4: // nmc mainnet wif coinType = "7"; // nmc mainnet break; default: - throw Exception("Invalid Namecoin network type used!"); + throw Exception("Invalid Namecoin network wif used!"); } + + int purpose; switch (derivePathType) { case DerivePathType.bip44: - return root.derivePath("m/44'/$coinType'/0'/$chain/$index"); + purpose = 44; + break; case DerivePathType.bip49: - return root.derivePath("m/49'/$coinType'/0'/$chain/$index"); + purpose = 49; + break; case DerivePathType.bip84: - return root.derivePath("m/84'/$coinType'/0'/$chain/$index"); + purpose = 84; + break; default: - throw Exception("DerivePathType must not be null."); + throw Exception("DerivePathType $derivePathType not supported"); } -} -/// wrapper for compute() -bip32.BIP32 getBip32NodeFromRootWrapper( - Tuple4 args, -) { - return getBip32NodeFromRoot( - args.item1, - args.item2, - args.item3, - args.item4, - ); -} - -bip32.BIP32 getBip32Root(String mnemonic, NetworkType network) { - final seed = bip39.mnemonicToSeed(mnemonic); - final networkType = bip32.NetworkType( - wif: network.wif, - bip32: bip32.Bip32Type( - public: network.bip32.public, - private: network.bip32.private, - ), - ); - - final root = bip32.BIP32.fromSeed(seed, networkType); - return root; -} - -/// wrapper for compute() -bip32.BIP32 getBip32RootWrapper(Tuple2 args) { - return getBip32Root(args.item1, args.item2); + return "m/$purpose'/$coinType'/$account'/$chain/$index"; } class NamecoinWallet extends CoinServiceAPI @@ -231,6 +183,15 @@ class NamecoinWallet extends CoinServiceAPI @override Future> get mnemonic => _getMnemonicList(); + @override + Future get mnemonicString => + _secureStore.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStore.read( + key: '${_walletId}_mnemonicPassphrase', + ); + Future get chainHeight async { try { final result = await _electrumXClient.getBlockHeadTip(); @@ -295,6 +256,7 @@ class NamecoinWallet extends CoinServiceAPI @override Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -326,14 +288,21 @@ class NamecoinWallet extends CoinServiceAPI } // check to make sure we aren't overwriting a mnemonic // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || + (await this.mnemonicPassphrase) != null) { longMutex = false; throw Exception("Attempted to overwrite mnemonic on restore!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: mnemonic.trim()); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: mnemonicPassphrase ?? "", + ); + await _recoverWalletFromBIP32SeedPhrase( mnemonic: mnemonic.trim(), + mnemonicPassphrase: mnemonicPassphrase ?? "", maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, ); @@ -376,15 +345,14 @@ class NamecoinWallet extends CoinServiceAPI final Map receivingNodes = {}; for (int j = 0; j < txCountBatchSize; j++) { - final node = await compute( - getBip32NodeFromRootWrapper, - Tuple4( - chain, - index + j, - root, - type, - ), + final derivePath = constructDerivePath( + derivePathType: type, + networkWIF: root.network.wif, + chain: chain, + index: index + j, ); + final node = await Bip32Utils.getBip32NodeFromRoot(root, derivePath); + String addressString; isar_models.AddressType addrType; switch (type) { @@ -505,6 +473,7 @@ class NamecoinWallet extends CoinServiceAPI Future _recoverWalletFromBIP32SeedPhrase({ required String mnemonic, + required String mnemonicPassphrase, int maxUnusedAddressGap = 20, int maxNumberOfIndexesToCheck = 1000, bool isRescan = false, @@ -518,7 +487,11 @@ class NamecoinWallet extends CoinServiceAPI Map> p2shChangeDerivations = {}; Map> p2wpkhChangeDerivations = {}; - final root = await compute(getBip32RootWrapper, Tuple2(mnemonic, _network)); + final root = await Bip32Utils.getBip32Root( + mnemonic, + mnemonicPassphrase, + _network, + ); List p2pkhReceiveAddressArray = []; List p2shReceiveAddressArray = []; @@ -1310,12 +1283,11 @@ class NamecoinWallet extends CoinServiceAPI } Future> _getMnemonicList() async { - final mnemonicString = - await _secureStore.read(key: '${_walletId}_mnemonic'); - if (mnemonicString == null) { + final _mnemonicString = await mnemonicString; + if (_mnemonicString == null) { return []; } - final List data = mnemonicString.split(' '); + final List data = _mnemonicString.split(' '); return data; } @@ -1444,13 +1416,17 @@ class NamecoinWallet extends CoinServiceAPI } // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || (await mnemonicPassphrase) != null) { throw Exception( "Attempted to overwrite mnemonic on generate new wallet!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: bip39.generateMnemonic(strength: 256)); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: "", + ); // Generate and add addresses to relevant arrays final initialAddresses = await Future.wait([ @@ -1480,17 +1456,22 @@ class NamecoinWallet extends CoinServiceAPI int index, DerivePathType derivePathType, ) async { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); - final node = await compute( - getBip32NodeWrapper, - Tuple5( - chain, - index, - mnemonic!, - _network, - derivePathType, - ), + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + + final derivePath = constructDerivePath( + derivePathType: derivePathType, + networkWIF: _network.wif, + chain: chain, + index: index, ); + final node = await Bip32Utils.getBip32Node( + _mnemonic!, + _mnemonicPassphrase!, + _network, + derivePath, + ); + final data = PaymentData(pubkey: node.publicKey); String address; isar_models.AddressType addrType; @@ -2602,6 +2583,8 @@ class NamecoinWallet extends CoinServiceAPI case DerivePathType.bip84: addressesP2WPKH.add(address); break; + default: + throw Exception("DerivePathType unsupported"); } } } @@ -2881,9 +2864,11 @@ class NamecoinWallet extends CoinServiceAPI await _deleteDerivations(); try { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; await _recoverWalletFromBIP32SeedPhrase( - mnemonic: mnemonic!, + mnemonic: _mnemonic!, + mnemonicPassphrase: _mnemonicPassphrase!, maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, isRescan: true, diff --git a/lib/services/coins/particl/particl_wallet.dart b/lib/services/coins/particl/particl_wallet.dart index 4aafc916f..75e029ea4 100644 --- a/lib/services/coins/particl/particl_wallet.dart +++ b/lib/services/coins/particl/particl_wallet.dart @@ -29,6 +29,7 @@ import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/notifications_api.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/bip32_utils.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/default_nodes.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -49,85 +50,35 @@ const String GENESIS_HASH_MAINNET = const String GENESIS_HASH_TESTNET = "0000594ada5310b367443ee0afd4fa3d0bbd5850ea4e33cdc7d6a904a7ec7c90"; -bip32.BIP32 getBip32Node( - int chain, - int index, - String mnemonic, - NetworkType network, - DerivePathType derivePathType, -) { - final root = getBip32Root(mnemonic, network); - - final node = getBip32NodeFromRoot(chain, index, root, derivePathType); - return node; -} - -/// wrapper for compute() -bip32.BIP32 getBip32NodeWrapper( - Tuple5 args, -) { - return getBip32Node( - args.item1, - args.item2, - args.item3, - args.item4, - args.item5, - ); -} - -bip32.BIP32 getBip32NodeFromRoot( - int chain, - int index, - bip32.BIP32 root, - DerivePathType derivePathType, -) { +String constructDerivePath({ + required DerivePathType derivePathType, + required int networkWIF, + int account = 0, + required int chain, + required int index, +}) { String coinType; - switch (root.network.wif) { + switch (networkWIF) { case 0x6c: // PART mainnet wif coinType = "44"; // PART mainnet break; default: - throw Exception("Invalid Particl network type used!"); + throw Exception("Invalid Particl network wif used!"); } + + int purpose; switch (derivePathType) { case DerivePathType.bip44: - return root.derivePath("m/44'/$coinType'/0'/$chain/$index"); + purpose = 44; + break; case DerivePathType.bip84: - return root.derivePath("m/84'/$coinType'/0'/$chain/$index"); + purpose = 84; + break; default: throw Exception("DerivePathType $derivePathType not supported"); } -} -/// wrapper for compute() -bip32.BIP32 getBip32NodeFromRootWrapper( - Tuple4 args, -) { - return getBip32NodeFromRoot( - args.item1, - args.item2, - args.item3, - args.item4, - ); -} - -bip32.BIP32 getBip32Root(String mnemonic, NetworkType network) { - final seed = bip39.mnemonicToSeed(mnemonic); - final networkType = bip32.NetworkType( - wif: network.wif, - bip32: bip32.Bip32Type( - public: network.bip32.public, - private: network.bip32.private, - ), - ); - - final root = bip32.BIP32.fromSeed(seed, networkType); - return root; -} - -/// wrapper for compute() -bip32.BIP32 getBip32RootWrapper(Tuple2 args) { - return getBip32Root(args.item1, args.item2); + return "m/$purpose'/$coinType'/$account'/$chain/$index"; } class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { @@ -226,6 +177,15 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { @override Future> get mnemonic => _getMnemonicList(); + @override + Future get mnemonicString => + _secureStore.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStore.read( + key: '${_walletId}_mnemonicPassphrase', + ); + Future get chainHeight async { try { final result = await _electrumXClient.getBlockHeadTip(); @@ -288,6 +248,7 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { @override Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -322,14 +283,21 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { } // check to make sure we aren't overwriting a mnemonic // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || + (await this.mnemonicPassphrase) != null) { longMutex = false; throw Exception("Attempted to overwrite mnemonic on restore!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: mnemonic.trim()); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: mnemonicPassphrase ?? "", + ); + await _recoverWalletFromBIP32SeedPhrase( mnemonic: mnemonic.trim(), + mnemonicPassphrase: mnemonicPassphrase ?? "", maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, ); @@ -372,15 +340,14 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { final Map receivingNodes = {}; for (int j = 0; j < txCountBatchSize; j++) { - final node = await compute( - getBip32NodeFromRootWrapper, - Tuple4( - chain, - index + j, - root, - type, - ), + final derivePath = constructDerivePath( + derivePathType: type, + networkWIF: root.network.wif, + chain: chain, + index: index + j, ); + final node = await Bip32Utils.getBip32NodeFromRoot(root, derivePath); + String addressString; isar_models.AddressType addrType; switch (type) { @@ -487,6 +454,7 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { Future _recoverWalletFromBIP32SeedPhrase({ required String mnemonic, + required String mnemonicPassphrase, int maxUnusedAddressGap = 20, int maxNumberOfIndexesToCheck = 1000, bool isRescan = false, @@ -498,7 +466,11 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { Map> p2pkhChangeDerivations = {}; Map> p2wpkhChangeDerivations = {}; - final root = await compute(getBip32RootWrapper, Tuple2(mnemonic, _network)); + final root = await Bip32Utils.getBip32Root( + mnemonic, + mnemonicPassphrase, + _network, + ); List p2pkhReceiveAddressArray = []; List p2wpkhReceiveAddressArray = []; @@ -1238,12 +1210,11 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { } Future> _getMnemonicList() async { - final mnemonicString = - await _secureStore.read(key: '${_walletId}_mnemonic'); - if (mnemonicString == null) { + final _mnemonicString = await mnemonicString; + if (_mnemonicString == null) { return []; } - final List data = mnemonicString.split(' '); + final List data = _mnemonicString.split(' '); return data; } @@ -1359,13 +1330,17 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { } // this should never fail - if ((await _secureStore.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || (await mnemonicPassphrase) != null) { throw Exception( "Attempted to overwrite mnemonic on generate new wallet!"); } await _secureStore.write( key: '${_walletId}_mnemonic', value: bip39.generateMnemonic(strength: 256)); + await _secureStore.write( + key: '${_walletId}_mnemonicPassphrase', + value: "", + ); // Generate and add addresses to relevant arrays final initialAddresses = await Future.wait([ @@ -1391,17 +1366,22 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { int index, DerivePathType derivePathType, ) async { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); - final node = await compute( - getBip32NodeWrapper, - Tuple5( - chain, - index, - mnemonic!, - _network, - derivePathType, - ), + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + + final derivePath = constructDerivePath( + derivePathType: derivePathType, + networkWIF: _network.wif, + chain: chain, + index: index, ); + final node = await Bip32Utils.getBip32Node( + _mnemonic!, + _mnemonicPassphrase!, + _network, + derivePath, + ); + final data = PaymentData(pubkey: node.publicKey); String address; isar_models.AddressType addrType; @@ -2976,9 +2956,12 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB { await _deleteDerivations(); try { - final mnemonic = await _secureStore.read(key: '${_walletId}_mnemonic'); + final _mnemonic = await mnemonicString; + final _mnemonicPassphrase = await mnemonicPassphrase; + await _recoverWalletFromBIP32SeedPhrase( - mnemonic: mnemonic!, + mnemonic: _mnemonic!, + mnemonicPassphrase: _mnemonicPassphrase!, maxUnusedAddressGap: maxUnusedAddressGap, maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, isRescan: true, diff --git a/lib/services/coins/wownero/wownero_wallet.dart b/lib/services/coins/wownero/wownero_wallet.dart index 004e22534..9a326c881 100644 --- a/lib/services/coins/wownero/wownero_wallet.dart +++ b/lib/services/coins/wownero/wownero_wallet.dart @@ -319,7 +319,7 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { await _prefs.init(); // this should never fail - if ((await _secureStorage.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || (await mnemonicPassphrase) != null) { throw Exception( "Attempted to overwrite mnemonic on generate new wallet!"); } @@ -377,6 +377,10 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { await _secureStorage.write( key: '${_walletId}_mnemonic', value: wallet?.seed.trim()); + await _secureStorage.write( + key: '${_walletId}_mnemonicPassphrase', + value: "", + ); walletInfo.address = wallet?.walletAddresses.address; await DB.instance @@ -427,15 +431,23 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { @override Future> get mnemonic async { - final mnemonicString = - await _secureStorage.read(key: '${_walletId}_mnemonic'); - if (mnemonicString == null) { + final _mnemonicString = await mnemonicString; + if (_mnemonicString == null) { return []; } - final List data = mnemonicString.split(' '); + final List data = _mnemonicString.split(' '); return data; } + @override + Future get mnemonicString => + _secureStorage.read(key: '${_walletId}_mnemonic'); + + @override + Future get mnemonicPassphrase => _secureStorage.read( + key: '${_walletId}_mnemonicPassphrase', + ); + @override Future> prepareSend({ required String address, @@ -528,6 +540,7 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { @override Future recoverFromMnemonic({ required String mnemonic, + String? mnemonicPassphrase, // not used at the moment required int maxUnusedAddressGap, required int maxNumberOfIndexesToCheck, required int height, @@ -543,12 +556,17 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { try { // check to make sure we aren't overwriting a mnemonic // this should never fail - if ((await _secureStorage.read(key: '${_walletId}_mnemonic')) != null) { + if ((await mnemonicString) != null || + (await this.mnemonicPassphrase) != null) { longMutex = false; throw Exception("Attempted to overwrite mnemonic on restore!"); } await _secureStorage.write( key: '${_walletId}_mnemonic', value: mnemonic.trim()); + await _secureStorage.write( + key: '${_walletId}_mnemonicPassphrase', + value: mnemonicPassphrase ?? "", + ); // extract seed height from 14 word seed if (seedLength == 14) { diff --git a/lib/services/mixins/paynym_wallet_interface.dart b/lib/services/mixins/paynym_wallet_interface.dart index 87ef97df5..5944f69cf 100644 --- a/lib/services/mixins/paynym_wallet_interface.dart +++ b/lib/services/mixins/paynym_wallet_interface.dart @@ -39,7 +39,8 @@ mixin PaynymWalletInterface { late final int _minConfirms; // passed in wallet functions - late final Future> Function() _getMnemonic; + late final Future Function() _getMnemonicString; + late final Future Function() _getMnemonicPassphrase; late final Future Function() _getChainHeight; late final Future Function() _getCurrentChangeAddress; late final int Function({ @@ -66,11 +67,6 @@ mixin PaynymWalletInterface { required String wif, required DerivePathType derivePathType, }) _addDerivation; - late final Future Function({ - required int chain, - required DerivePathType derivePathType, - required Map derivationsToAdd, - }) _addDerivations; // initializer void initPaynymWalletInterface({ @@ -83,7 +79,8 @@ mixin PaynymWalletInterface { required SecureStorageInterface secureStorage, required int dustLimitP2PKH, required int minConfirms, - required Future> Function() getMnemonic, + required Future Function() getMnemonicString, + required Future Function() getMnemonicPassphrase, required Future Function() getChainHeight, required Future Function() getCurrentChangeAddress, required int Function({ @@ -115,12 +112,6 @@ mixin PaynymWalletInterface { required DerivePathType derivePathType, }) addDerivation, - required Future Function({ - required int chain, - required DerivePathType derivePathType, - required Map derivationsToAdd, - }) - addDerivations, }) { _walletId = walletId; _walletName = walletName; @@ -131,7 +122,8 @@ mixin PaynymWalletInterface { _secureStorage = secureStorage; _dustLimitP2PKH = dustLimitP2PKH; _minConfirms = minConfirms; - _getMnemonic = getMnemonic; + _getMnemonicString = getMnemonicString; + _getMnemonicPassphrase = getMnemonicPassphrase; _getChainHeight = getChainHeight; _getCurrentChangeAddress = getCurrentChangeAddress; _estimateTxFee = estimateTxFee; @@ -141,7 +133,6 @@ mixin PaynymWalletInterface { _refresh = refresh; _checkChangeAddressForTransactions = checkChangeAddressForTransactions; _addDerivation = addDerivation; - _addDerivations = addDerivations; } // convenience getter @@ -186,7 +177,8 @@ mixin PaynymWalletInterface { int index, ) async { final myPrivateKey = await deriveReceivingPrivateKey( - mnemonic: await _getMnemonic(), + mnemonic: (await _getMnemonicString())!, + mnemonicPassphrase: (await _getMnemonicPassphrase())!, index: index, ); @@ -244,26 +236,39 @@ mixin PaynymWalletInterface { } // generate bip32 payment code root - Future getRootNode({ - required List mnemonic, + Future _getRootNode({ + required String mnemonic, + required String mnemonicPassphrase, }) async { - final root = await Bip32Utils.getBip32Root(mnemonic.join(" "), _network); + final root = await Bip32Utils.getBip32Root( + mnemonic, + mnemonicPassphrase, + _network, + ); return root; } Future deriveNotificationPrivateKey({ - required List mnemonic, + required String mnemonic, + required String mnemonicPassphrase, }) async { - final root = await getRootNode(mnemonic: mnemonic); + final root = await _getRootNode( + mnemonic: mnemonic, + mnemonicPassphrase: mnemonicPassphrase, + ); final node = root.derivePath(kPaynymDerivePath).derive(0); return node.privateKey!; } Future deriveReceivingPrivateKey({ - required List mnemonic, + required String mnemonic, + required String mnemonicPassphrase, required int index, }) async { - final root = await getRootNode(mnemonic: mnemonic); + final root = await _getRootNode( + mnemonic: mnemonic, + mnemonicPassphrase: mnemonicPassphrase, + ); final node = root.derivePath(kPaynymDerivePath).derive(index); return node.privateKey!; } @@ -282,8 +287,10 @@ mixin PaynymWalletInterface { } Future signWithNotificationKey(Uint8List data) async { - final privateKey = - await deriveNotificationPrivateKey(mnemonic: await _getMnemonic()); + final privateKey = await deriveNotificationPrivateKey( + mnemonic: (await _getMnemonicString())!, + mnemonicPassphrase: (await _getMnemonicPassphrase())!, + ); final pair = btc_dart.ECPair.fromPrivateKey(privateKey, network: _network); final signed = pair.sign(SHA256Digest().process(data)); return signed; @@ -303,8 +310,10 @@ mixin PaynymWalletInterface { throw PaynymSendException( "No notification transaction sent to $paymentCode"); } else { - final myPrivateKey = - await deriveNotificationPrivateKey(mnemonic: await _getMnemonic()); + final myPrivateKey = await deriveNotificationPrivateKey( + mnemonic: (await _getMnemonicString())!, + mnemonicPassphrase: (await _getMnemonicPassphrase())!, + ); final sendToAddress = await nextUnusedSendAddressFrom( pCode: paymentCode, privateKey: myPrivateKey, @@ -749,8 +758,10 @@ mixin PaynymWalletInterface { final pubKey = designatedInput.scriptSigAsm!.split(" ")[1].fromHex; - final myPrivateKey = - await deriveNotificationPrivateKey(mnemonic: await _getMnemonic()); + final myPrivateKey = await deriveNotificationPrivateKey( + mnemonic: (await _getMnemonicString())!, + mnemonicPassphrase: (await _getMnemonicPassphrase())!, + ); final S = SecretPoint(myPrivateKey, pubKey); @@ -888,12 +899,18 @@ mixin PaynymWalletInterface { const maxCount = 2147483647; assert(maxNumberOfIndexesToCheck < maxCount); - final mnemonic = await _getMnemonic(); + final mnemonic = (await _getMnemonicString())!; + final mnemonicPassphrase = (await _getMnemonicPassphrase())!; - final mySendPrivateKey = - await deriveNotificationPrivateKey(mnemonic: mnemonic); - final receivingNode = - (await getRootNode(mnemonic: mnemonic)).derivePath(kPaynymDerivePath); + final mySendPrivateKey = await deriveNotificationPrivateKey( + mnemonic: mnemonic, + mnemonicPassphrase: mnemonicPassphrase, + ); + final receivingNode = (await _getRootNode( + mnemonic: mnemonic, + mnemonicPassphrase: mnemonicPassphrase, + )) + .derivePath(kPaynymDerivePath); List
addresses = []; int receivingGapCounter = 0; @@ -1140,7 +1157,10 @@ mixin PaynymWalletInterface { if (storedAddress != null) { return storedAddress; } else { - final root = await getRootNode(mnemonic: await _getMnemonic()); + final root = await _getRootNode( + mnemonic: (await _getMnemonicString())!, + mnemonicPassphrase: (await _getMnemonicPassphrase())!, + ); final node = root.derivePath(kPaynymDerivePath); final paymentCode = PaymentCode.initFromPubKey( node.publicKey, diff --git a/lib/utilities/bip32_utils.dart b/lib/utilities/bip32_utils.dart index 50549938f..71dcf7fcb 100644 --- a/lib/utilities/bip32_utils.dart +++ b/lib/utilities/bip32_utils.dart @@ -5,28 +5,124 @@ import 'package:flutter/foundation.dart'; import 'package:tuple/tuple.dart'; abstract class Bip32Utils { - static bip32.BIP32 getBip32RootSync(String mnemonic, NetworkType network) { - final seed = bip39.mnemonicToSeed(mnemonic); - final networkType = bip32.NetworkType( - wif: network.wif, + // =============================== get root ================================== + static bip32.BIP32 getBip32RootSync( + String mnemonic, + String mnemonicPassphrase, + NetworkType networkType, + ) { + final seed = bip39.mnemonicToSeed(mnemonic, passphrase: mnemonicPassphrase); + final _networkType = bip32.NetworkType( + wif: networkType.wif, bip32: bip32.Bip32Type( - public: network.bip32.public, - private: network.bip32.private, + public: networkType.bip32.public, + private: networkType.bip32.private, ), ); - final root = bip32.BIP32.fromSeed(seed, networkType); + final root = bip32.BIP32.fromSeed(seed, _networkType); return root; } static Future getBip32Root( - String mnemonic, NetworkType network) async { - final root = await compute(_getBip32RootWrapper, Tuple2(mnemonic, network)); + String mnemonic, + String mnemonicPassphrase, + NetworkType networkType, + ) async { + final root = await compute( + _getBip32RootWrapper, + Tuple3( + mnemonic, + mnemonicPassphrase, + networkType, + ), + ); return root; } /// wrapper for compute() - static bip32.BIP32 _getBip32RootWrapper(Tuple2 args) { - return getBip32RootSync(args.item1, args.item2); + static bip32.BIP32 _getBip32RootWrapper( + Tuple3 args, + ) { + return getBip32RootSync( + args.item1, + args.item2, + args.item3, + ); + } + + // =========================== get node from root ============================ + static bip32.BIP32 getBip32NodeFromRootSync( + bip32.BIP32 root, + String derivePath, + ) { + return root.derivePath(derivePath); + } + + static Future getBip32NodeFromRoot( + bip32.BIP32 root, + String derivePath, + ) async { + final node = await compute( + _getBip32NodeFromRootWrapper, + Tuple2( + root, + derivePath, + ), + ); + return node; + } + + /// wrapper for compute() + static bip32.BIP32 _getBip32NodeFromRootWrapper( + Tuple2 args, + ) { + return getBip32NodeFromRootSync( + args.item1, + args.item2, + ); + } + + // =============================== get node ================================== + static bip32.BIP32 getBip32NodeSync( + String mnemonic, + String mnemonicPassphrase, + NetworkType network, + String derivePath, + ) { + final root = getBip32RootSync(mnemonic, mnemonicPassphrase, network); + + final node = getBip32NodeFromRootSync(root, derivePath); + return node; + } + + static Future getBip32Node( + String mnemonic, + String mnemonicPassphrase, + NetworkType networkType, + String derivePath, + ) async { + final node = await compute( + _getBip32NodeWrapper, + Tuple4( + mnemonic, + mnemonicPassphrase, + networkType, + derivePath, + ), + ); + return node; + } + + /// wrapper for compute() + static bip32.BIP32 _getBip32NodeWrapper( + Tuple4 args, + ) { + return getBip32NodeSync( + args.item1, + args.item2, + args.item3, + args.item4, + ); } } diff --git a/test/pages/send_view/send_view_test.mocks.dart b/test/pages/send_view/send_view_test.mocks.dart index dbc0287c6..032983189 100644 --- a/test/pages/send_view/send_view_test.mocks.dart +++ b/test/pages/send_view/send_view_test.mocks.dart @@ -3,12 +3,11 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i22; -import 'dart:typed_data' as _i28; -import 'dart:ui' as _i24; +import 'dart:async' as _i21; +import 'dart:typed_data' as _i27; +import 'dart:ui' as _i23; -import 'package:bip32/bip32.dart' as _i17; -import 'package:bip47/bip47.dart' as _i18; +import 'package:bip47/bip47.dart' as _i17; import 'package:bitcoindart/bitcoindart.dart' as _i14; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -18,26 +17,26 @@ import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i11; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i10; import 'package:stackwallet/models/balance.dart' as _i12; import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16; -import 'package:stackwallet/models/node_model.dart' as _i25; +import 'package:stackwallet/models/node_model.dart' as _i24; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i9; import 'package:stackwallet/pages/exchange_view/sub_widgets/exchange_rate_sheet.dart' - as _i31; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i26; -import 'package:stackwallet/services/coins/coin_service.dart' as _i19; + as _i30; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i25; +import 'package:stackwallet/services/coins/coin_service.dart' as _i18; import 'package:stackwallet/services/coins/manager.dart' as _i6; -import 'package:stackwallet/services/locale_service.dart' as _i29; +import 'package:stackwallet/services/locale_service.dart' as _i28; import 'package:stackwallet/services/node_service.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' as _i8; -import 'package:stackwallet/services/wallets.dart' as _i20; +import 'package:stackwallet/services/wallets.dart' as _i19; import 'package:stackwallet/services/wallets_service.dart' as _i2; -import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i32; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i21; -import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i27; -import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i30; +import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i31; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i20; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i26; +import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i29; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i7; -import 'package:stackwallet/utilities/prefs.dart' as _i23; +import 'package:stackwallet/utilities/prefs.dart' as _i22; import 'package:tuple/tuple.dart' as _i15; // ignore_for_file: type=lint @@ -208,8 +207,8 @@ class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address { ); } -class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 { - _FakeBIP32_15( +class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { + _FakePaymentCode_15( Object parent, Invocation parentInvocation, ) : super( @@ -218,19 +217,9 @@ class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 { ); } -class _FakePaymentCode_16 extends _i1.SmartFake implements _i18.PaymentCode { - _FakePaymentCode_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeCoinServiceAPI_17 extends _i1.SmartFake - implements _i19.CoinServiceAPI { - _FakeCoinServiceAPI_17( +class _FakeCoinServiceAPI_16 extends _i1.SmartFake + implements _i18.CoinServiceAPI { + _FakeCoinServiceAPI_16( Object parent, Invocation parentInvocation, ) : super( @@ -242,7 +231,7 @@ class _FakeCoinServiceAPI_17 extends _i1.SmartFake /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i20.Wallets { +class MockWallets extends _i1.Mock implements _i19.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -309,7 +298,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i21.Coin? coin}) => + List getWalletIdsFor({required _i20.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -319,18 +308,18 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValue: [], ) as List); @override - Map<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), - returnValue: <_i21.Coin, + returnValue: <_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, - ) as Map<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + ) as Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i21.Coin? coin) => + _i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -394,17 +383,17 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - _i22.Future load(_i23.Prefs? prefs) => (super.noSuchMethod( + _i21.Future load(_i22.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future loadAfterStackRestore( - _i23.Prefs? prefs, + _i21.Future loadAfterStackRestore( + _i22.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -415,11 +404,11 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { managers, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -427,7 +416,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -453,19 +442,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i22.Future> get walletNames => + _i21.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i22.Future>.value( + returnValue: _i21.Future>.value( {}), - ) as _i22.Future>); + ) as _i21.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future renameWallet({ + _i21.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -480,13 +469,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future addExistingStackWallet({ + _i21.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i21.Coin? coin, + required _i20.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -500,13 +489,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addNewWallet({ + _i21.Future addNewWallet({ required String? name, - required _i21.Coin? coin, + required _i20.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -519,46 +508,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i21.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future saveFavoriteWalletIds(List? walletIds) => + _i21.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i21.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i21.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future moveFavorite({ + _i21.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -571,48 +560,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i21.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i21.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future isMnemonicVerified({required String? walletId}) => + _i21.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future setMnemonicVerified({required String? walletId}) => + _i21.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future deleteWallet( + _i21.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -624,20 +613,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future refreshWallets(bool? shouldNotifyListeners) => + _i21.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -645,7 +634,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -687,33 +676,33 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { ), ) as _i7.SecureStorageInterface); @override - List<_i25.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i24.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i25.NodeModel>[], - ) as List<_i25.NodeModel>); + returnValue: <_i24.NodeModel>[], + ) as List<_i24.NodeModel>); @override - List<_i25.NodeModel> get nodes => (super.noSuchMethod( + List<_i24.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i25.NodeModel>[], - ) as List<_i25.NodeModel>); + returnValue: <_i24.NodeModel>[], + ) as List<_i24.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateDefaults() => (super.noSuchMethod( + _i21.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future setPrimaryNodeFor({ - required _i21.Coin? coin, - required _i25.NodeModel? node, + _i21.Future setPrimaryNodeFor({ + required _i20.Coin? coin, + required _i24.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -726,44 +715,44 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i25.NodeModel? getPrimaryNodeFor({required _i21.Coin? coin}) => + _i24.NodeModel? getPrimaryNodeFor({required _i20.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i25.NodeModel?); + )) as _i24.NodeModel?); @override - List<_i25.NodeModel> getNodesFor(_i21.Coin? coin) => (super.noSuchMethod( + List<_i24.NodeModel> getNodesFor(_i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i25.NodeModel>[], - ) as List<_i25.NodeModel>); + returnValue: <_i24.NodeModel>[], + ) as List<_i24.NodeModel>); @override - _i25.NodeModel? getNodeById({required String? id}) => + _i24.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i25.NodeModel?); + )) as _i24.NodeModel?); @override - List<_i25.NodeModel> failoverNodesFor({required _i21.Coin? coin}) => + List<_i24.NodeModel> failoverNodesFor({required _i20.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i25.NodeModel>[], - ) as List<_i25.NodeModel>); + returnValue: <_i24.NodeModel>[], + ) as List<_i24.NodeModel>); @override - _i22.Future add( - _i25.NodeModel? node, + _i21.Future add( + _i24.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -776,11 +765,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future delete( + _i21.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -792,11 +781,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future setEnabledState( + _i21.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -810,12 +799,12 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future edit( - _i25.NodeModel? editedNode, + _i21.Future edit( + _i24.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -828,20 +817,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateCommunityNodes() => (super.noSuchMethod( + _i21.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -849,7 +838,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -877,13 +866,13 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { /// A class which mocks [BitcoinWallet]. /// /// See the documentation for Mockito's code generation for more information. -class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { +class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i22.Timer? _timer) => super.noSuchMethod( + set timer(_i21.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -960,64 +949,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i16.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i16.UTXO>[]), + ) as _i21.Future>); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i16.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i16.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future get currentChangeAddress => (super.noSuchMethod( + _i21.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i21.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i22.Future<_i9.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i9.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i9.FeeObject>.value(_FakeFeeObject_6( + returnValue: _i21.Future<_i9.FeeObject>.value(_FakeFeeObject_6( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i9.FeeObject>); + ) as _i21.Future<_i9.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future get chainHeight => (super.noSuchMethod( + _i21.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -1114,27 +1113,28 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ), ) as _i14.NetworkType); @override - _i22.Future exit() => (super.noSuchMethod( + _i21.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i27.DerivePathType addressType({required String? address}) => + _i26.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i27.DerivePathType.bip44, - ) as _i27.DerivePathType); + returnValue: _i26.DerivePathType.bip44, + ) as _i26.DerivePathType); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -1145,52 +1145,53 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future getTransactionCacheEarly(List? allAddresses) => + _i21.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i21.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future getAllTxsToWatch() => (super.noSuchMethod( + _i21.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -1206,26 +1207,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1243,33 +1244,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i21.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1279,36 +1280,36 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i10.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i21.Future<_i10.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), returnValue: - _i22.Future<_i10.ElectrumXNode>.value(_FakeElectrumXNode_12( + _i21.Future<_i10.ElectrumXNode>.value(_FakeElectrumXNode_12( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i22.Future<_i10.ElectrumXNode>); + ) as _i21.Future<_i10.ElectrumXNode>); @override - _i22.Future addDerivation({ + _i21.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i27.DerivePathType? derivePathType, + required _i26.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1322,13 +1323,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addDerivations({ + _i21.Future addDerivations({ required int? chain, - required _i27.DerivePathType? derivePathType, + required _i26.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1341,50 +1342,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future>> fastFetch( + _i21.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i22.Future>>.value( + returnValue: _i21.Future>>.value( >[]), - ) as _i22.Future>>); + ) as _i21.Future>>); @override - _i22.Future getTxCount({required String? address}) => + _i21.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future checkCurrentReceivingAddressesForTransactions() => + _i21.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkCurrentChangeAddressesForTransactions() => + _i21.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int estimateTxFee({ required int? vSize, @@ -1424,7 +1425,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, )); @override - _i22.Future> fetchBuildTxData( + _i21.Future> fetchBuildTxData( List<_i16.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( @@ -1432,10 +1433,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { [utxosToUse], ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future> buildTransaction({ + _i21.Future> buildTransaction({ required List<_i16.UTXO>? utxosToUse, required Map? utxoSigningData, required List? recipients, @@ -1453,10 +1454,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1468,11 +1469,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -1484,8 +1485,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override int roughFeeEstimate( int? inputCount, @@ -1504,25 +1505,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i21.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void initCache( String? walletId, - _i21.Coin? coin, + _i20.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1535,14 +1536,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future updateCachedId(String? id) => (super.noSuchMethod( + _i21.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1552,14 +1553,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i21.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1569,15 +1570,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateCachedIsFavorite(bool? isFavorite) => + _i21.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i12.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1593,15 +1594,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ), ) as _i12.Balance); @override - _i22.Future updateCachedBalance(_i12.Balance? balance) => + _i21.Future updateCachedBalance(_i12.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i12.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1617,15 +1618,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ), ) as _i12.Balance); @override - _i22.Future updateCachedBalanceSecondary(_i12.Balance? balance) => + _i21.Future updateCachedBalanceSecondary(_i12.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override void initWalletDB({_i13.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1636,11 +1637,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction( + _i21.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction( Map? txData, dynamic electrumxClient, List<_i16.Address>? myAddresses, - _i21.Coin? coin, + _i20.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1657,7 +1658,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ], ), returnValue: - _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value( + _i21.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value( _FakeTuple2_13<_i16.Transaction, _i16.Address>( this, Invocation.method( @@ -1672,51 +1673,46 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ], ), )), - ) as _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>); + ) as _i21.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i14.NetworkType? network, - required _i21.Coin? coin, + required _i20.Coin? coin, required _i13.MainDB? db, required _i10.ElectrumX? electrumXClient, required _i7.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i22.Future> Function()? getMnemonic, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function()? getCurrentChangeAddress, + required _i21.Future Function()? getMnemonicString, + required _i21.Future Function()? getMnemonicPassphrase, + required _i21.Future Function()? getChainHeight, + required _i21.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i22.Future> Function({ + required _i21.Future> Function({ required String address, required int satoshiAmount, Map? args, })? prepareSend, - required _i22.Future Function({required String address})? getTxCount, - required _i22.Future> Function(List<_i16.UTXO>)? + required _i21.Future Function({required String address})? getTxCount, + required _i21.Future> Function(List<_i16.UTXO>)? fetchBuildTxData, - required _i22.Future Function()? refresh, - required _i22.Future Function()? checkChangeAddressForTransactions, - required _i22.Future Function({ + required _i21.Future Function()? refresh, + required _i21.Future Function()? checkChangeAddressForTransactions, + required _i21.Future Function({ required String address, required int chain, - required _i27.DerivePathType derivePathType, + required _i26.DerivePathType derivePathType, required String pubKey, required String wif, })? addDerivation, - required _i22.Future Function({ - required int chain, - required Map derivationsToAdd, - required _i27.DerivePathType derivePathType, - })? - addDerivations, }) => super.noSuchMethod( Invocation.method( @@ -1732,7 +1728,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #secureStorage: secureStorage, #dustLimitP2PKH: dustLimitP2PKH, #minConfirms: minConfirms, - #getMnemonic: getMnemonic, + #getMnemonicString: getMnemonicString, + #getMnemonicPassphrase: getMnemonicPassphrase, #getChainHeight: getChainHeight, #getCurrentChangeAddress: getCurrentChangeAddress, #estimateTxFee: estimateTxFee, @@ -1743,79 +1740,67 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #checkChangeAddressForTransactions: checkChangeAddressForTransactions, #addDerivation: addDerivation, - #addDerivations: addDerivations, }, ), returnValueForMissingStub: null, ); @override - _i22.Future<_i16.Address> currentReceivingPaynymAddress( - _i18.PaymentCode? sender) => + _i21.Future<_i16.Address> currentReceivingPaynymAddress( + _i17.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i22.Future<_i16.Address>); + ) as _i21.Future<_i16.Address>); @override - _i22.Future checkCurrentPaynymReceivingAddressForTransactions( - _i18.PaymentCode? sender) => + _i21.Future checkCurrentPaynymReceivingAddressForTransactions( + _i17.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i21.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i17.BIP32> getRootNode({required List? mnemonic}) => - (super.noSuchMethod( - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - returnValue: _i22.Future<_i17.BIP32>.value(_FakeBIP32_15( - this, - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - )), - ) as _i22.Future<_i17.BIP32>); - @override - _i22.Future<_i28.Uint8List> deriveNotificationPrivateKey( - {required List? mnemonic}) => + _i21.Future<_i27.Uint8List> deriveNotificationPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, + }) => (super.noSuchMethod( Invocation.method( #deriveNotificationPrivateKey, [], - {#mnemonic: mnemonic}, + { + #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, + }, ), - returnValue: _i22.Future<_i28.Uint8List>.value(_i28.Uint8List(0)), - ) as _i22.Future<_i28.Uint8List>); + returnValue: _i21.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), + ) as _i21.Future<_i27.Uint8List>); @override - _i22.Future<_i28.Uint8List> deriveReceivingPrivateKey({ - required List? mnemonic, + _i21.Future<_i27.Uint8List> deriveReceivingPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, required int? index, }) => (super.noSuchMethod( @@ -1824,48 +1809,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #index: index, }, ), - returnValue: _i22.Future<_i28.Uint8List>.value(_i28.Uint8List(0)), - ) as _i22.Future<_i28.Uint8List>); + returnValue: _i21.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), + ) as _i21.Future<_i27.Uint8List>); @override - _i22.Future<_i18.PaymentCode> getPaymentCode( - _i27.DerivePathType? derivePathType) => + _i21.Future<_i17.PaymentCode> getPaymentCode( + _i26.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i22.Future<_i18.PaymentCode>.value(_FakePaymentCode_16( + returnValue: _i21.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i22.Future<_i18.PaymentCode>); + ) as _i21.Future<_i17.PaymentCode>); @override - _i22.Future<_i28.Uint8List> signWithNotificationKey(_i28.Uint8List? data) => + _i21.Future<_i27.Uint8List> signWithNotificationKey(_i27.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i22.Future<_i28.Uint8List>.value(_i28.Uint8List(0)), - ) as _i22.Future<_i28.Uint8List>); + returnValue: _i21.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), + ) as _i21.Future<_i27.Uint8List>); @override - _i22.Future signStringWithNotificationKey(String? data) => + _i21.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future> preparePaymentCodeSend({ - required _i18.PaymentCode? paymentCode, + _i21.Future> preparePaymentCodeSend({ + required _i17.PaymentCode? paymentCode, required int? satoshiAmount, Map? args, }) => @@ -1880,12 +1866,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future<_i16.Address> nextUnusedSendAddressFrom({ - required _i18.PaymentCode? pCode, - required _i28.Uint8List? privateKey, + _i21.Future<_i16.Address> nextUnusedSendAddressFrom({ + required _i17.PaymentCode? pCode, + required _i27.Uint8List? privateKey, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1898,7 +1884,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1910,9 +1896,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.Address>); + ) as _i21.Future<_i16.Address>); @override - _i22.Future> prepareNotificationTx({ + _i21.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, @@ -1930,10 +1916,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future broadcastNotificationTx( + _i21.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1941,19 +1927,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future hasConnected(String? paymentCodeString) => + _i21.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + _i21.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ required _i16.Transaction? transaction, required _i16.Address? myNotificationAddress, }) => @@ -1966,31 +1952,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i18.PaymentCode?>.value(), - ) as _i22.Future<_i18.PaymentCode?>); + returnValue: _i21.Future<_i17.PaymentCode?>.value(), + ) as _i21.Future<_i17.PaymentCode?>); @override - _i22.Future> + _i21.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i22.Future>.value(<_i18.PaymentCode>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i17.PaymentCode>[]), + ) as _i21.Future>); @override - _i22.Future checkForNotificationTransactionsTo( + _i21.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future restoreAllHistory({ + _i21.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -2005,12 +1991,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future restoreHistoryWith( - _i18.PaymentCode? other, + _i21.Future restoreHistoryWith( + _i17.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2023,15 +2009,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({ + _i21.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({ required _i14.ECPair? pair, required int? derivationIndex, - required _i27.DerivePathType? derivePathType, - required _i18.PaymentCode? toPaymentCode, + required _i26.DerivePathType? derivePathType, + required _i17.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -2044,7 +2030,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -2057,13 +2043,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.Address>); + ) as _i21.Future<_i16.Address>); @override - _i22.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({ + _i21.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({ required _i14.ECPair? pair, required int? derivationIndex, - required _i27.DerivePathType? derivePathType, - required _i18.PaymentCode? fromPaymentCode, + required _i26.DerivePathType? derivePathType, + required _i17.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -2076,7 +2062,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -2089,56 +2075,56 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.Address>); + ) as _i21.Future<_i16.Address>); @override - _i22.Future<_i16.Address> getMyNotificationAddress( - _i27.DerivePathType? derivePathType) => + _i21.Future<_i16.Address> getMyNotificationAddress( + _i26.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i22.Future<_i16.Address>); + ) as _i21.Future<_i16.Address>); @override - _i22.Future> lookupKey(String? paymentCodeString) => + _i21.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future paymentCodeStringByKey(String? key) => + _i21.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future storeCode(String? paymentCodeString) => + _i21.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); } /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i29.LocaleService { +class MockLocaleService extends _i1.Mock implements _i28.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -2154,17 +2140,17 @@ class MockLocaleService extends _i1.Mock implements _i29.LocaleService { returnValue: false, ) as bool); @override - _i22.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i21.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2172,7 +2158,7 @@ class MockLocaleService extends _i1.Mock implements _i29.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2200,7 +2186,7 @@ class MockLocaleService extends _i1.Mock implements _i29.LocaleService { /// A class which mocks [Prefs]. /// /// See the documentation for Mockito's code generation for more information. -class MockPrefs extends _i1.Mock implements _i23.Prefs { +class MockPrefs extends _i1.Mock implements _i22.Prefs { MockPrefs() { _i1.throwOnMissingStub(this); } @@ -2256,12 +2242,12 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - _i30.SyncingType get syncType => (super.noSuchMethod( + _i29.SyncingType get syncType => (super.noSuchMethod( Invocation.getter(#syncType), - returnValue: _i30.SyncingType.currentWalletOnly, - ) as _i30.SyncingType); + returnValue: _i29.SyncingType.currentWalletOnly, + ) as _i29.SyncingType); @override - set syncType(_i30.SyncingType? syncType) => super.noSuchMethod( + set syncType(_i29.SyncingType? syncType) => super.noSuchMethod( Invocation.setter( #syncType, syncType, @@ -2321,12 +2307,12 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - _i31.ExchangeRateType get exchangeRateType => (super.noSuchMethod( + _i30.ExchangeRateType get exchangeRateType => (super.noSuchMethod( Invocation.getter(#exchangeRateType), - returnValue: _i31.ExchangeRateType.estimated, - ) as _i31.ExchangeRateType); + returnValue: _i30.ExchangeRateType.estimated, + ) as _i30.ExchangeRateType); @override - set exchangeRateType(_i31.ExchangeRateType? exchangeRateType) => + set exchangeRateType(_i30.ExchangeRateType? exchangeRateType) => super.noSuchMethod( Invocation.setter( #exchangeRateType, @@ -2408,12 +2394,12 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - _i32.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + _i31.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( Invocation.getter(#backupFrequencyType), - returnValue: _i32.BackupFrequencyType.everyTenMinutes, - ) as _i32.BackupFrequencyType); + returnValue: _i31.BackupFrequencyType.everyTenMinutes, + ) as _i31.BackupFrequencyType); @override - set backupFrequencyType(_i32.BackupFrequencyType? backupFrequencyType) => + set backupFrequencyType(_i31.BackupFrequencyType? backupFrequencyType) => super.noSuchMethod( Invocation.setter( #backupFrequencyType, @@ -2483,51 +2469,51 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValue: false, ) as bool); @override - _i22.Future init() => (super.noSuchMethod( + _i21.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( + _i21.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( Invocation.method( #incrementCurrentNotificationIndex, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future isExternalCallsSet() => (super.noSuchMethod( + _i21.Future isExternalCallsSet() => (super.noSuchMethod( Invocation.method( #isExternalCallsSet, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future saveUserID(String? userId) => (super.noSuchMethod( + _i21.Future saveUserID(String? userId) => (super.noSuchMethod( Invocation.method( #saveUserID, [userId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( + _i21.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( Invocation.method( #saveSignupEpoch, [signupEpoch], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2535,7 +2521,7 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2578,23 +2564,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i19.CoinServiceAPI get wallet => (super.noSuchMethod( + _i18.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_17( + returnValue: _FakeCoinServiceAPI_16( this, Invocation.getter(#wallet), ), - ) as _i19.CoinServiceAPI); + ) as _i18.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2627,23 +2613,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future<_i9.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i9.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i9.FeeObject>.value(_FakeFeeObject_6( + returnValue: _i21.Future<_i9.FeeObject>.value(_FakeFeeObject_6( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i9.FeeObject>); + ) as _i21.Future<_i9.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override _i12.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2653,16 +2639,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i12.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i16.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i16.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i16.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i16.UTXO>[]), + ) as _i21.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2682,10 +2668,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2707,14 +2698,14 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2724,7 +2715,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -2740,27 +2731,27 @@ class MockManager extends _i1.Mock implements _i6.Manager { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2770,34 +2761,35 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -2808,25 +2800,26 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future exitCurrentWallet() => (super.noSuchMethod( + _i21.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2838,11 +2831,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -2854,18 +2847,18 @@ class MockManager extends _i1.Mock implements _i6.Manager { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2873,7 +2866,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2893,7 +2886,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { /// A class which mocks [CoinServiceAPI]. /// /// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { +class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -2904,10 +2897,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2940,23 +2933,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i22.Future<_i9.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i9.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i9.FeeObject>.value(_FakeFeeObject_6( + returnValue: _i21.Future<_i9.FeeObject>.value(_FakeFeeObject_6( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i9.FeeObject>); + ) as _i21.Future<_i9.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override _i12.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2966,16 +2959,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { ), ) as _i12.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i16.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i16.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i16.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i16.UTXO>[]), + ) as _i21.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2995,10 +2988,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); + @override + _i21.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -3015,7 +3018,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: 0, ) as int); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -3031,36 +3034,36 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -3070,16 +3073,17 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -3090,43 +3094,44 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future exit() => (super.noSuchMethod( + _i21.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -3138,11 +3143,11 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -3154,24 +3159,24 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i21.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); } diff --git a/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart index 54ade45c2..313bff98a 100644 --- a/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart @@ -353,6 +353,11 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: _i8.Future>.value([]), ) as _i8.Future>); @override + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -464,6 +469,7 @@ class MockManager extends _i1.Mock implements _i11.Manager { @override _i8.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -474,6 +480,7 @@ class MockManager extends _i1.Mock implements _i11.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart index 84fc1bf4e..b5178f2a0 100644 --- a/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart @@ -314,6 +314,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -425,6 +430,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -435,6 +441,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart index 7d23a2dd7..cc6e3fe1e 100644 --- a/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart @@ -312,6 +312,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -423,6 +428,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -433,6 +439,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/lockscreen_view_screen_test.mocks.dart b/test/screen_tests/lockscreen_view_screen_test.mocks.dart index 92518048b..a7f124337 100644 --- a/test/screen_tests/lockscreen_view_screen_test.mocks.dart +++ b/test/screen_tests/lockscreen_view_screen_test.mocks.dart @@ -621,6 +621,11 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -732,6 +737,7 @@ class MockManager extends _i1.Mock implements _i12.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -742,6 +748,7 @@ class MockManager extends _i1.Mock implements _i12.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart index 01f47579b..e7c4658a6 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart @@ -408,6 +408,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override + _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -519,6 +524,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { @override _i6.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -529,6 +535,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart index 106485fdb..920ebc0f7 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart @@ -408,6 +408,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override + _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -519,6 +524,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { @override _i6.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -529,6 +535,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart index 419b72e3f..4b4f63225 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart @@ -408,6 +408,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override + _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -519,6 +524,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { @override _i6.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -529,6 +535,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart b/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart index 50cd7afd8..ceb07514a 100644 --- a/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart @@ -183,6 +183,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -294,6 +299,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -304,6 +310,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart b/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart index ba5f52688..9c75c178d 100644 --- a/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart @@ -406,6 +406,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override + _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -517,6 +522,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { @override _i6.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -527,6 +533,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart index 7a1afa588..fed2fe069 100644 --- a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart @@ -621,6 +621,11 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -732,6 +737,7 @@ class MockManager extends _i1.Mock implements _i12.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -742,6 +748,7 @@ class MockManager extends _i1.Mock implements _i12.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart index 31fb8546c..9b169bad2 100644 --- a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart @@ -462,6 +462,11 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: _i8.Future>.value([]), ) as _i8.Future>); @override + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -573,6 +578,7 @@ class MockManager extends _i1.Mock implements _i12.Manager { @override _i8.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -583,6 +589,7 @@ class MockManager extends _i1.Mock implements _i12.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart b/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart index 742498415..924a72df8 100644 --- a/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart @@ -183,6 +183,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -294,6 +299,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -304,6 +310,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart index b4c96f70c..db22ecacc 100644 --- a/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart @@ -183,6 +183,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -294,6 +299,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -304,6 +310,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart index 9fe30a1cb..8a9fd0935 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart @@ -398,6 +398,11 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: _i8.Future>.value([]), ) as _i8.Future>); @override + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -509,6 +514,7 @@ class MockManager extends _i1.Mock implements _i11.Manager { @override _i8.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -519,6 +525,7 @@ class MockManager extends _i1.Mock implements _i11.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart index f0b37d032..db88f6067 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart @@ -398,6 +398,11 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: _i8.Future>.value([]), ) as _i8.Future>); @override + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -509,6 +514,7 @@ class MockManager extends _i1.Mock implements _i11.Manager { @override _i8.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -519,6 +525,7 @@ class MockManager extends _i1.Mock implements _i11.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart index 3711513b4..3d6b30b2d 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart @@ -183,6 +183,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -294,6 +299,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -304,6 +310,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart index fc733ad66..ce44e5fd8 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart @@ -183,6 +183,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -294,6 +299,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -304,6 +310,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart index b36f289d8..94633d738 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart @@ -406,6 +406,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override + _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -517,6 +522,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { @override _i6.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -527,6 +533,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart index dc382ee73..824ffe3af 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart @@ -663,6 +663,11 @@ class MockManager extends _i1.Mock implements _i15.Manager { returnValue: _i8.Future>.value([]), ) as _i8.Future>); @override + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -774,6 +779,7 @@ class MockManager extends _i1.Mock implements _i15.Manager { @override _i8.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -784,6 +790,7 @@ class MockManager extends _i1.Mock implements _i15.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart index e469b8be4..c4ffca6b5 100644 --- a/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart @@ -406,6 +406,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: _i6.Future>.value([]), ) as _i6.Future>); @override + _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -517,6 +522,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { @override _i6.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -527,6 +533,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart index bd3520e44..5c7a23188 100644 --- a/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart @@ -185,6 +185,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -296,6 +301,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -306,6 +312,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart index cbfc6644f..9a9c1aabf 100644 --- a/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart @@ -184,6 +184,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -295,6 +300,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -305,6 +311,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart index a4936c793..dd59e74bf 100644 --- a/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart @@ -183,6 +183,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -294,6 +299,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -304,6 +310,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart index 3126e4580..cbd3c0795 100644 --- a/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart @@ -225,6 +225,11 @@ class MockManager extends _i1.Mock implements _i8.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -336,6 +341,7 @@ class MockManager extends _i1.Mock implements _i8.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -346,6 +352,7 @@ class MockManager extends _i1.Mock implements _i8.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart index 135802891..892ec66ec 100644 --- a/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart @@ -185,6 +185,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: _i7.Future>.value([]), ) as _i7.Future>); @override + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -296,6 +301,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { @override _i7.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -306,6 +312,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/services/coins/manager_test.mocks.dart b/test/services/coins/manager_test.mocks.dart index af988ae76..273b4a01c 100644 --- a/test/services/coins/manager_test.mocks.dart +++ b/test/services/coins/manager_test.mocks.dart @@ -211,6 +211,16 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValue: _i10.Future>.value([]), ) as _i10.Future>); @override + _i10.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i10.Future.value(), + ) as _i10.Future); + @override + _i10.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i10.Future.value(), + ) as _i10.Future); + @override _i10.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), returnValue: _i10.Future.value(0), @@ -634,14 +644,18 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { ) as _i10.Future); @override _i10.Future fillAddresses( - String? suppliedMnemonic, { + String? suppliedMnemonic, + String? mnemonicPassphrase, { int? perBatch = 50, int? numberOfThreads = 4, }) => (super.noSuchMethod( Invocation.method( #fillAddresses, - [suppliedMnemonic], + [ + suppliedMnemonic, + mnemonicPassphrase, + ], { #perBatch: perBatch, #numberOfThreads: numberOfThreads, @@ -669,6 +683,7 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { @override _i10.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -679,6 +694,7 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/widget_tests/managed_favorite_test.mocks.dart b/test/widget_tests/managed_favorite_test.mocks.dart index da30d6016..89d6ae344 100644 --- a/test/widget_tests/managed_favorite_test.mocks.dart +++ b/test/widget_tests/managed_favorite_test.mocks.dart @@ -3,12 +3,11 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i22; -import 'dart:typed_data' as _i27; -import 'dart:ui' as _i24; +import 'dart:async' as _i21; +import 'dart:typed_data' as _i26; +import 'dart:ui' as _i23; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip47/bip47.dart' as _i16; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -18,22 +17,22 @@ import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9; import 'package:stackwallet/models/balance.dart' as _i11; import 'package:stackwallet/models/isar/models/isar_models.dart' as _i15; -import 'package:stackwallet/models/node_model.dart' as _i29; +import 'package:stackwallet/models/node_model.dart' as _i28; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i25; -import 'package:stackwallet/services/coins/coin_service.dart' as _i19; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i24; +import 'package:stackwallet/services/coins/coin_service.dart' as _i18; import 'package:stackwallet/services/coins/manager.dart' as _i6; -import 'package:stackwallet/services/locale_service.dart' as _i28; +import 'package:stackwallet/services/locale_service.dart' as _i27; import 'package:stackwallet/services/node_service.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' as _i7; -import 'package:stackwallet/services/wallets.dart' as _i20; +import 'package:stackwallet/services/wallets.dart' as _i19; import 'package:stackwallet/services/wallets_service.dart' as _i2; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i21; -import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i26; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i20; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i25; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i18; -import 'package:stackwallet/utilities/prefs.dart' as _i23; + as _i17; +import 'package:stackwallet/utilities/prefs.dart' as _i22; import 'package:tuple/tuple.dart' as _i14; // ignore_for_file: type=lint @@ -192,8 +191,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( +class _FakePaymentCode_14 extends _i1.SmartFake implements _i16.PaymentCode { + _FakePaymentCode_14( Object parent, Invocation parentInvocation, ) : super( @@ -202,8 +201,9 @@ class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { ); } -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( +class _FakeSecureStorageInterface_15 extends _i1.SmartFake + implements _i17.SecureStorageInterface { + _FakeSecureStorageInterface_15( Object parent, Invocation parentInvocation, ) : super( @@ -212,20 +212,9 @@ class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { ); } -class _FakeSecureStorageInterface_16 extends _i1.SmartFake - implements _i18.SecureStorageInterface { - _FakeSecureStorageInterface_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeCoinServiceAPI_17 extends _i1.SmartFake - implements _i19.CoinServiceAPI { - _FakeCoinServiceAPI_17( +class _FakeCoinServiceAPI_16 extends _i1.SmartFake + implements _i18.CoinServiceAPI { + _FakeCoinServiceAPI_16( Object parent, Invocation parentInvocation, ) : super( @@ -237,7 +226,7 @@ class _FakeCoinServiceAPI_17 extends _i1.SmartFake /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i20.Wallets { +class MockWallets extends _i1.Mock implements _i19.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -304,7 +293,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i21.Coin? coin}) => + List getWalletIdsFor({required _i20.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -314,18 +303,18 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValue: [], ) as List); @override - Map<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), - returnValue: <_i21.Coin, + returnValue: <_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, - ) as Map<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + ) as Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i21.Coin? coin) => + _i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -389,17 +378,17 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - _i22.Future load(_i23.Prefs? prefs) => (super.noSuchMethod( + _i21.Future load(_i22.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future loadAfterStackRestore( - _i23.Prefs? prefs, + _i21.Future loadAfterStackRestore( + _i22.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -410,11 +399,11 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { managers, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -422,7 +411,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -448,19 +437,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i22.Future> get walletNames => + _i21.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i22.Future>.value( + returnValue: _i21.Future>.value( {}), - ) as _i22.Future>); + ) as _i21.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future renameWallet({ + _i21.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -475,13 +464,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future addExistingStackWallet({ + _i21.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i21.Coin? coin, + required _i20.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -495,13 +484,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addNewWallet({ + _i21.Future addNewWallet({ required String? name, - required _i21.Coin? coin, + required _i20.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -514,46 +503,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i21.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future saveFavoriteWalletIds(List? walletIds) => + _i21.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i21.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i21.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future moveFavorite({ + _i21.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -566,48 +555,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i21.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i21.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future isMnemonicVerified({required String? walletId}) => + _i21.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future setMnemonicVerified({required String? walletId}) => + _i21.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future deleteWallet( + _i21.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -619,20 +608,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future refreshWallets(bool? shouldNotifyListeners) => + _i21.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -640,7 +629,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -668,13 +657,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { /// A class which mocks [BitcoinWallet]. /// /// See the documentation for Mockito's code generation for more information. -class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { +class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i22.Timer? _timer) => super.noSuchMethod( + set timer(_i21.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -751,64 +740,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i15.UTXO>[]), + ) as _i21.Future>); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i15.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future get currentChangeAddress => (super.noSuchMethod( + _i21.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i21.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future get chainHeight => (super.noSuchMethod( + _i21.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -905,27 +904,28 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i22.Future exit() => (super.noSuchMethod( + _i21.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i26.DerivePathType addressType({required String? address}) => + _i25.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i26.DerivePathType.bip44, - ) as _i26.DerivePathType); + returnValue: _i25.DerivePathType.bip44, + ) as _i25.DerivePathType); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -936,52 +936,53 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future getTransactionCacheEarly(List? allAddresses) => + _i21.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i21.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future getAllTxsToWatch() => (super.noSuchMethod( + _i21.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -997,26 +998,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1034,33 +1035,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i21.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1070,35 +1071,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i21.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i22.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i21.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i22.Future<_i9.ElectrumXNode>); + ) as _i21.Future<_i9.ElectrumXNode>); @override - _i22.Future addDerivation({ + _i21.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i26.DerivePathType? derivePathType, + required _i25.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1112,13 +1113,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addDerivations({ + _i21.Future addDerivations({ required int? chain, - required _i26.DerivePathType? derivePathType, + required _i25.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1131,50 +1132,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future>> fastFetch( + _i21.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i22.Future>>.value( + returnValue: _i21.Future>>.value( >[]), - ) as _i22.Future>>); + ) as _i21.Future>>); @override - _i22.Future getTxCount({required String? address}) => + _i21.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future checkCurrentReceivingAddressesForTransactions() => + _i21.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkCurrentChangeAddressesForTransactions() => + _i21.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int estimateTxFee({ required int? vSize, @@ -1214,7 +1215,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, )); @override - _i22.Future> fetchBuildTxData( + _i21.Future> fetchBuildTxData( List<_i15.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( @@ -1222,10 +1223,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [utxosToUse], ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future> buildTransaction({ + _i21.Future> buildTransaction({ required List<_i15.UTXO>? utxosToUse, required Map? utxoSigningData, required List? recipients, @@ -1243,10 +1244,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1258,11 +1259,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -1274,8 +1275,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override int roughFeeEstimate( int? inputCount, @@ -1294,25 +1295,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i21.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void initCache( String? walletId, - _i21.Coin? coin, + _i20.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1325,14 +1326,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future updateCachedId(String? id) => (super.noSuchMethod( + _i21.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1342,14 +1343,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i21.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1359,15 +1360,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateCachedIsFavorite(bool? isFavorite) => + _i21.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1383,15 +1384,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalance(_i11.Balance? balance) => + _i21.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1407,15 +1408,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i21.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1426,11 +1427,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( Map? txData, dynamic electrumxClient, List<_i15.Address>? myAddresses, - _i21.Coin? coin, + _i20.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1447,7 +1448,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), returnValue: - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( + _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( _FakeTuple2_12<_i15.Transaction, _i15.Address>( this, Invocation.method( @@ -1462,51 +1463,46 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), )), - ) as _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i21.Coin? coin, + required _i20.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i18.SecureStorageInterface? secureStorage, + required _i17.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i22.Future> Function()? getMnemonic, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function()? getCurrentChangeAddress, + required _i21.Future Function()? getMnemonicString, + required _i21.Future Function()? getMnemonicPassphrase, + required _i21.Future Function()? getChainHeight, + required _i21.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i22.Future> Function({ + required _i21.Future> Function({ required String address, required int satoshiAmount, Map? args, })? prepareSend, - required _i22.Future Function({required String address})? getTxCount, - required _i22.Future> Function(List<_i15.UTXO>)? + required _i21.Future Function({required String address})? getTxCount, + required _i21.Future> Function(List<_i15.UTXO>)? fetchBuildTxData, - required _i22.Future Function()? refresh, - required _i22.Future Function()? checkChangeAddressForTransactions, - required _i22.Future Function({ + required _i21.Future Function()? refresh, + required _i21.Future Function()? checkChangeAddressForTransactions, + required _i21.Future Function({ required String address, required int chain, - required _i26.DerivePathType derivePathType, + required _i25.DerivePathType derivePathType, required String pubKey, required String wif, })? addDerivation, - required _i22.Future Function({ - required int chain, - required Map derivationsToAdd, - required _i26.DerivePathType derivePathType, - })? - addDerivations, }) => super.noSuchMethod( Invocation.method( @@ -1522,7 +1518,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #secureStorage: secureStorage, #dustLimitP2PKH: dustLimitP2PKH, #minConfirms: minConfirms, - #getMnemonic: getMnemonic, + #getMnemonicString: getMnemonicString, + #getMnemonicPassphrase: getMnemonicPassphrase, #getChainHeight: getChainHeight, #getCurrentChangeAddress: getCurrentChangeAddress, #estimateTxFee: estimateTxFee, @@ -1533,79 +1530,67 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #checkChangeAddressForTransactions: checkChangeAddressForTransactions, #addDerivation: addDerivation, - #addDerivations: addDerivations, }, ), returnValueForMissingStub: null, ); @override - _i22.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i21.Future<_i15.Address> currentReceivingPaynymAddress( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i21.Future checkCurrentPaynymReceivingAddressForTransactions( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i21.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i16.BIP32> getRootNode({required List? mnemonic}) => - (super.noSuchMethod( - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14( - this, - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - )), - ) as _i22.Future<_i16.BIP32>); - @override - _i22.Future<_i27.Uint8List> deriveNotificationPrivateKey( - {required List? mnemonic}) => + _i21.Future<_i26.Uint8List> deriveNotificationPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, + }) => (super.noSuchMethod( Invocation.method( #deriveNotificationPrivateKey, [], - {#mnemonic: mnemonic}, + { + #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, + }, ), - returnValue: _i22.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i22.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i21.Future<_i26.Uint8List>); @override - _i22.Future<_i27.Uint8List> deriveReceivingPrivateKey({ - required List? mnemonic, + _i21.Future<_i26.Uint8List> deriveReceivingPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, required int? index, }) => (super.noSuchMethod( @@ -1614,48 +1599,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #index: index, }, ), - returnValue: _i22.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i22.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i21.Future<_i26.Uint8List>); @override - _i22.Future<_i17.PaymentCode> getPaymentCode( - _i26.DerivePathType? derivePathType) => + _i21.Future<_i16.PaymentCode> getPaymentCode( + _i25.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i22.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i21.Future<_i16.PaymentCode>.value(_FakePaymentCode_14( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i22.Future<_i17.PaymentCode>); + ) as _i21.Future<_i16.PaymentCode>); @override - _i22.Future<_i27.Uint8List> signWithNotificationKey(_i27.Uint8List? data) => + _i21.Future<_i26.Uint8List> signWithNotificationKey(_i26.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i22.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i22.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i21.Future<_i26.Uint8List>); @override - _i22.Future signStringWithNotificationKey(String? data) => + _i21.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, + _i21.Future> preparePaymentCodeSend({ + required _i16.PaymentCode? paymentCode, required int? satoshiAmount, Map? args, }) => @@ -1670,12 +1656,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i27.Uint8List? privateKey, + _i21.Future<_i15.Address> nextUnusedSendAddressFrom({ + required _i16.PaymentCode? pCode, + required _i26.Uint8List? privateKey, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1688,7 +1674,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1700,9 +1686,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future> prepareNotificationTx({ + _i21.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, @@ -1720,10 +1706,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future broadcastNotificationTx( + _i21.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1731,19 +1717,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future hasConnected(String? paymentCodeString) => + _i21.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + _i21.Future<_i16.PaymentCode?> unBlindedPaymentCodeFromTransaction({ required _i15.Transaction? transaction, required _i15.Address? myNotificationAddress, }) => @@ -1756,31 +1742,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i17.PaymentCode?>.value(), - ) as _i22.Future<_i17.PaymentCode?>); + returnValue: _i21.Future<_i16.PaymentCode?>.value(), + ) as _i21.Future<_i16.PaymentCode?>); @override - _i22.Future> + _i21.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i22.Future>.value(<_i17.PaymentCode>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i16.PaymentCode>[]), + ) as _i21.Future>); @override - _i22.Future checkForNotificationTransactionsTo( + _i21.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future restoreAllHistory({ + _i21.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1795,12 +1781,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i21.Future restoreHistoryWith( + _i16.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1813,15 +1799,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i21.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i25.DerivePathType? derivePathType, + required _i16.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1834,7 +1820,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1847,13 +1833,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i21.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i25.DerivePathType? derivePathType, + required _i16.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1866,7 +1852,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1879,56 +1865,56 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future<_i15.Address> getMyNotificationAddress( - _i26.DerivePathType? derivePathType) => + _i21.Future<_i15.Address> getMyNotificationAddress( + _i25.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future> lookupKey(String? paymentCodeString) => + _i21.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future paymentCodeStringByKey(String? key) => + _i21.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future storeCode(String? paymentCodeString) => + _i21.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); } /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i28.LocaleService { +class MockLocaleService extends _i1.Mock implements _i27.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -1944,17 +1930,17 @@ class MockLocaleService extends _i1.Mock implements _i28.LocaleService { returnValue: false, ) as bool); @override - _i22.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i21.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1962,7 +1948,7 @@ class MockLocaleService extends _i1.Mock implements _i28.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -1992,41 +1978,41 @@ class MockLocaleService extends _i1.Mock implements _i28.LocaleService { /// See the documentation for Mockito's code generation for more information. class MockNodeService extends _i1.Mock implements _i3.NodeService { @override - _i18.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( + _i17.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_16( + returnValue: _FakeSecureStorageInterface_15( this, Invocation.getter(#secureStorageInterface), ), - ) as _i18.SecureStorageInterface); + ) as _i17.SecureStorageInterface); @override - List<_i29.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i28.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i28.NodeModel>[], + ) as List<_i28.NodeModel>); @override - List<_i29.NodeModel> get nodes => (super.noSuchMethod( + List<_i28.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i28.NodeModel>[], + ) as List<_i28.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateDefaults() => (super.noSuchMethod( + _i21.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future setPrimaryNodeFor({ - required _i21.Coin? coin, - required _i29.NodeModel? node, + _i21.Future setPrimaryNodeFor({ + required _i20.Coin? coin, + required _i28.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -2039,44 +2025,44 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i29.NodeModel? getPrimaryNodeFor({required _i21.Coin? coin}) => + _i28.NodeModel? getPrimaryNodeFor({required _i20.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i29.NodeModel?); + )) as _i28.NodeModel?); @override - List<_i29.NodeModel> getNodesFor(_i21.Coin? coin) => (super.noSuchMethod( + List<_i28.NodeModel> getNodesFor(_i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i28.NodeModel>[], + ) as List<_i28.NodeModel>); @override - _i29.NodeModel? getNodeById({required String? id}) => + _i28.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i29.NodeModel?); + )) as _i28.NodeModel?); @override - List<_i29.NodeModel> failoverNodesFor({required _i21.Coin? coin}) => + List<_i28.NodeModel> failoverNodesFor({required _i20.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i28.NodeModel>[], + ) as List<_i28.NodeModel>); @override - _i22.Future add( - _i29.NodeModel? node, + _i21.Future add( + _i28.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -2089,11 +2075,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future delete( + _i21.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -2105,11 +2091,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future setEnabledState( + _i21.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -2123,12 +2109,12 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future edit( - _i29.NodeModel? editedNode, + _i21.Future edit( + _i28.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -2141,20 +2127,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateCommunityNodes() => (super.noSuchMethod( + _i21.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2162,7 +2148,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2205,23 +2191,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i19.CoinServiceAPI get wallet => (super.noSuchMethod( + _i18.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_17( + returnValue: _FakeCoinServiceAPI_16( this, Invocation.getter(#wallet), ), - ) as _i19.CoinServiceAPI); + ) as _i18.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2254,23 +2240,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2280,16 +2266,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i15.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i15.UTXO>[]), + ) as _i21.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2309,10 +2295,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2334,14 +2325,14 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2351,7 +2342,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -2367,27 +2358,27 @@ class MockManager extends _i1.Mock implements _i6.Manager { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2397,34 +2388,35 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -2435,25 +2427,26 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future exitCurrentWallet() => (super.noSuchMethod( + _i21.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2465,11 +2458,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -2481,18 +2474,18 @@ class MockManager extends _i1.Mock implements _i6.Manager { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2500,7 +2493,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2520,7 +2513,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { /// A class which mocks [CoinServiceAPI]. /// /// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { +class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -2531,10 +2524,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2567,23 +2560,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2593,16 +2586,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i15.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i15.UTXO>[]), + ) as _i21.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2622,10 +2615,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); + @override + _i21.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -2642,7 +2645,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: 0, ) as int); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -2658,36 +2661,36 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2697,16 +2700,17 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -2717,43 +2721,44 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future exit() => (super.noSuchMethod( + _i21.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2765,11 +2770,11 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -2781,24 +2786,24 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i21.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); } diff --git a/test/widget_tests/table_view/table_view_row_test.mocks.dart b/test/widget_tests/table_view/table_view_row_test.mocks.dart index b6f043a78..829d3a81b 100644 --- a/test/widget_tests/table_view/table_view_row_test.mocks.dart +++ b/test/widget_tests/table_view/table_view_row_test.mocks.dart @@ -3,12 +3,11 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i21; -import 'dart:typed_data' as _i27; -import 'dart:ui' as _i23; +import 'dart:async' as _i20; +import 'dart:typed_data' as _i26; +import 'dart:ui' as _i22; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip47/bip47.dart' as _i16; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -19,19 +18,19 @@ import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9; import 'package:stackwallet/models/balance.dart' as _i11; import 'package:stackwallet/models/isar/models/isar_models.dart' as _i15; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i24; -import 'package:stackwallet/services/coins/coin_service.dart' as _i18; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i23; +import 'package:stackwallet/services/coins/coin_service.dart' as _i17; import 'package:stackwallet/services/coins/manager.dart' as _i6; import 'package:stackwallet/services/node_service.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' as _i7; -import 'package:stackwallet/services/wallets.dart' as _i19; +import 'package:stackwallet/services/wallets.dart' as _i18; import 'package:stackwallet/services/wallets_service.dart' as _i2; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i20; -import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i25; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i19; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i24; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i26; -import 'package:stackwallet/utilities/prefs.dart' as _i22; + as _i25; +import 'package:stackwallet/utilities/prefs.dart' as _i21; import 'package:tuple/tuple.dart' as _i14; // ignore_for_file: type=lint @@ -190,8 +189,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( +class _FakePaymentCode_14 extends _i1.SmartFake implements _i16.PaymentCode { + _FakePaymentCode_14( Object parent, Invocation parentInvocation, ) : super( @@ -200,19 +199,9 @@ class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { ); } -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeCoinServiceAPI_16 extends _i1.SmartFake - implements _i18.CoinServiceAPI { - _FakeCoinServiceAPI_16( +class _FakeCoinServiceAPI_15 extends _i1.SmartFake + implements _i17.CoinServiceAPI { + _FakeCoinServiceAPI_15( Object parent, Invocation parentInvocation, ) : super( @@ -224,7 +213,7 @@ class _FakeCoinServiceAPI_16 extends _i1.SmartFake /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i19.Wallets { +class MockWallets extends _i1.Mock implements _i18.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -291,7 +280,7 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i20.Coin? coin}) => + List getWalletIdsFor({required _i19.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -301,18 +290,18 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { returnValue: [], ) as List); @override - Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + Map<_i19.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), - returnValue: <_i20.Coin, + returnValue: <_i19.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, - ) as Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + ) as Map<_i19.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i20.Coin? coin) => + _i19.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -376,17 +365,17 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { returnValueForMissingStub: null, ); @override - _i21.Future load(_i22.Prefs? prefs) => (super.noSuchMethod( + _i20.Future load(_i21.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future loadAfterStackRestore( - _i22.Prefs? prefs, + _i20.Future loadAfterStackRestore( + _i21.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -397,11 +386,11 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { managers, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -409,7 +398,7 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -435,19 +424,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i21.Future> get walletNames => + _i20.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i21.Future>.value( + returnValue: _i20.Future>.value( {}), - ) as _i21.Future>); + ) as _i20.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i21.Future renameWallet({ + _i20.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -462,13 +451,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override - _i21.Future addExistingStackWallet({ + _i20.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i20.Coin? coin, + required _i19.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -482,13 +471,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future addNewWallet({ + _i20.Future addNewWallet({ required String? name, - required _i20.Coin? coin, + required _i19.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -501,46 +490,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i20.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i20.Future>.value([]), + ) as _i20.Future>); @override - _i21.Future saveFavoriteWalletIds(List? walletIds) => + _i20.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i20.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i20.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future moveFavorite({ + _i20.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -553,48 +542,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i20.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override - _i21.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i20.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future isMnemonicVerified({required String? walletId}) => + _i20.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override - _i21.Future setMnemonicVerified({required String? walletId}) => + _i20.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future deleteWallet( + _i20.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -606,20 +595,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override - _i21.Future refreshWallets(bool? shouldNotifyListeners) => + _i20.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -627,7 +616,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -655,13 +644,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { /// A class which mocks [BitcoinWallet]. /// /// See the documentation for Mockito's code generation for more information. -class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { +class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i21.Timer? _timer) => super.noSuchMethod( + set timer(_i20.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -738,64 +727,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: false, ) as bool); @override - _i20.Coin get coin => (super.noSuchMethod( + _i19.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i20.Coin.bitcoin, - ) as _i20.Coin); + returnValue: _i19.Coin.bitcoin, + ) as _i19.Coin); @override - _i21.Future> get utxos => (super.noSuchMethod( + _i20.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i21.Future>.value(<_i15.UTXO>[]), - ) as _i21.Future>); + returnValue: _i20.Future>.value(<_i15.UTXO>[]), + ) as _i20.Future>); @override - _i21.Future> get transactions => (super.noSuchMethod( + _i20.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i21.Future>.value(<_i15.Transaction>[]), - ) as _i21.Future>); + _i20.Future>.value(<_i15.Transaction>[]), + ) as _i20.Future>); @override - _i21.Future get currentReceivingAddress => (super.noSuchMethod( + _i20.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override - _i21.Future get currentChangeAddress => (super.noSuchMethod( + _i20.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override - _i21.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i20.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i20.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i20.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i21.Future<_i8.FeeObject>); + ) as _i20.Future<_i8.FeeObject>); @override - _i21.Future get maxFee => (super.noSuchMethod( + _i20.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override - _i21.Future> get mnemonic => (super.noSuchMethod( + _i20.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i20.Future>.value([]), + ) as _i20.Future>); @override - _i21.Future get chainHeight => (super.noSuchMethod( + _i20.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i20.Future.value(), + ) as _i20.Future); + @override + _i20.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i20.Future.value(), + ) as _i20.Future); + @override + _i20.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -892,27 +891,28 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i21.Future exit() => (super.noSuchMethod( + _i20.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i25.DerivePathType addressType({required String? address}) => + _i24.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i25.DerivePathType.bip44, - ) as _i25.DerivePathType); + returnValue: _i24.DerivePathType.bip44, + ) as _i24.DerivePathType); @override - _i21.Future recoverFromMnemonic({ + _i20.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -923,52 +923,53 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future getTransactionCacheEarly(List? allAddresses) => + _i20.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i20.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override - _i21.Future getAllTxsToWatch() => (super.noSuchMethod( + _i20.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future refresh() => (super.noSuchMethod( + _i20.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future> prepareSend({ + _i20.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -984,26 +985,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i20.Future>.value({}), + ) as _i20.Future>); @override - _i21.Future confirmSend({required Map? txData}) => + _i20.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override - _i21.Future testNetworkConnection() => (super.noSuchMethod( + _i20.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1021,33 +1022,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i21.Future initializeNew() => (super.noSuchMethod( + _i20.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future initializeExisting() => (super.noSuchMethod( + _i20.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future updateSentCachedTxData(Map? txData) => + _i20.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1057,35 +1058,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i20.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i20.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i21.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i20.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i21.Future<_i9.ElectrumXNode>); + ) as _i20.Future<_i9.ElectrumXNode>); @override - _i21.Future addDerivation({ + _i20.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i25.DerivePathType? derivePathType, + required _i24.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1099,13 +1100,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future addDerivations({ + _i20.Future addDerivations({ required int? chain, - required _i25.DerivePathType? derivePathType, + required _i24.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1118,50 +1119,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future>> fastFetch( + _i20.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i21.Future>>.value( + returnValue: _i20.Future>>.value( >[]), - ) as _i21.Future>>); + ) as _i20.Future>>); @override - _i21.Future getTxCount({required String? address}) => + _i20.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override - _i21.Future checkCurrentReceivingAddressesForTransactions() => + _i20.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future checkCurrentChangeAddressesForTransactions() => + _i20.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override int estimateTxFee({ required int? vSize, @@ -1201,7 +1202,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, )); @override - _i21.Future> fetchBuildTxData( + _i20.Future> fetchBuildTxData( List<_i15.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( @@ -1209,10 +1210,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { [utxosToUse], ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i20.Future>.value({}), + ) as _i20.Future>); @override - _i21.Future> buildTransaction({ + _i20.Future> buildTransaction({ required List<_i15.UTXO>? utxosToUse, required Map? utxoSigningData, required List? recipients, @@ -1230,10 +1231,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i20.Future>.value({}), + ) as _i20.Future>); @override - _i21.Future fullRescan( + _i20.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1245,11 +1246,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future estimateFeeFor( + _i20.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -1261,8 +1262,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { feeRate, ], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override int roughFeeEstimate( int? inputCount, @@ -1281,25 +1282,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: 0, ) as int); @override - _i21.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i20.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override - _i21.Future generateNewAddress() => (super.noSuchMethod( + _i20.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override void initCache( String? walletId, - _i20.Coin? coin, + _i19.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1312,14 +1313,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i21.Future updateCachedId(String? id) => (super.noSuchMethod( + _i20.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1329,14 +1330,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: 0, ) as int); @override - _i21.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i20.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1346,15 +1347,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Future updateCachedIsFavorite(bool? isFavorite) => + _i20.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1370,15 +1371,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ), ) as _i11.Balance); @override - _i21.Future updateCachedBalance(_i11.Balance? balance) => + _i20.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1394,15 +1395,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ), ) as _i11.Balance); @override - _i21.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i20.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1413,11 +1414,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i20.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( Map? txData, dynamic electrumxClient, List<_i15.Address>? myAddresses, - _i20.Coin? coin, + _i19.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1434,7 +1435,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ], ), returnValue: - _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( + _i20.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( _FakeTuple2_12<_i15.Transaction, _i15.Address>( this, Invocation.method( @@ -1449,51 +1450,46 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ], ), )), - ) as _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i20.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i20.Coin? coin, + required _i19.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i26.SecureStorageInterface? secureStorage, + required _i25.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i21.Future> Function()? getMnemonic, - required _i21.Future Function()? getChainHeight, - required _i21.Future Function()? getCurrentChangeAddress, + required _i20.Future Function()? getMnemonicString, + required _i20.Future Function()? getMnemonicPassphrase, + required _i20.Future Function()? getChainHeight, + required _i20.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i21.Future> Function({ + required _i20.Future> Function({ required String address, required int satoshiAmount, Map? args, })? prepareSend, - required _i21.Future Function({required String address})? getTxCount, - required _i21.Future> Function(List<_i15.UTXO>)? + required _i20.Future Function({required String address})? getTxCount, + required _i20.Future> Function(List<_i15.UTXO>)? fetchBuildTxData, - required _i21.Future Function()? refresh, - required _i21.Future Function()? checkChangeAddressForTransactions, - required _i21.Future Function({ + required _i20.Future Function()? refresh, + required _i20.Future Function()? checkChangeAddressForTransactions, + required _i20.Future Function({ required String address, required int chain, - required _i25.DerivePathType derivePathType, + required _i24.DerivePathType derivePathType, required String pubKey, required String wif, })? addDerivation, - required _i21.Future Function({ - required int chain, - required Map derivationsToAdd, - required _i25.DerivePathType derivePathType, - })? - addDerivations, }) => super.noSuchMethod( Invocation.method( @@ -1509,7 +1505,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #secureStorage: secureStorage, #dustLimitP2PKH: dustLimitP2PKH, #minConfirms: minConfirms, - #getMnemonic: getMnemonic, + #getMnemonicString: getMnemonicString, + #getMnemonicPassphrase: getMnemonicPassphrase, #getChainHeight: getChainHeight, #getCurrentChangeAddress: getCurrentChangeAddress, #estimateTxFee: estimateTxFee, @@ -1520,79 +1517,67 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #checkChangeAddressForTransactions: checkChangeAddressForTransactions, #addDerivation: addDerivation, - #addDerivations: addDerivations, }, ), returnValueForMissingStub: null, ); @override - _i21.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i20.Future<_i15.Address> currentReceivingPaynymAddress( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i21.Future<_i15.Address>); + ) as _i20.Future<_i15.Address>); @override - _i21.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i20.Future checkCurrentPaynymReceivingAddressForTransactions( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i20.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future<_i16.BIP32> getRootNode({required List? mnemonic}) => - (super.noSuchMethod( - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - returnValue: _i21.Future<_i16.BIP32>.value(_FakeBIP32_14( - this, - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - )), - ) as _i21.Future<_i16.BIP32>); - @override - _i21.Future<_i27.Uint8List> deriveNotificationPrivateKey( - {required List? mnemonic}) => + _i20.Future<_i26.Uint8List> deriveNotificationPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, + }) => (super.noSuchMethod( Invocation.method( #deriveNotificationPrivateKey, [], - {#mnemonic: mnemonic}, + { + #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, + }, ), - returnValue: _i21.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i21.Future<_i27.Uint8List>); + returnValue: _i20.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i20.Future<_i26.Uint8List>); @override - _i21.Future<_i27.Uint8List> deriveReceivingPrivateKey({ - required List? mnemonic, + _i20.Future<_i26.Uint8List> deriveReceivingPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, required int? index, }) => (super.noSuchMethod( @@ -1601,48 +1586,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #index: index, }, ), - returnValue: _i21.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i21.Future<_i27.Uint8List>); + returnValue: _i20.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i20.Future<_i26.Uint8List>); @override - _i21.Future<_i17.PaymentCode> getPaymentCode( - _i25.DerivePathType? derivePathType) => + _i20.Future<_i16.PaymentCode> getPaymentCode( + _i24.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i21.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i20.Future<_i16.PaymentCode>.value(_FakePaymentCode_14( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i21.Future<_i17.PaymentCode>); + ) as _i20.Future<_i16.PaymentCode>); @override - _i21.Future<_i27.Uint8List> signWithNotificationKey(_i27.Uint8List? data) => + _i20.Future<_i26.Uint8List> signWithNotificationKey(_i26.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i21.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i21.Future<_i27.Uint8List>); + returnValue: _i20.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i20.Future<_i26.Uint8List>); @override - _i21.Future signStringWithNotificationKey(String? data) => + _i20.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override - _i21.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, + _i20.Future> preparePaymentCodeSend({ + required _i16.PaymentCode? paymentCode, required int? satoshiAmount, Map? args, }) => @@ -1657,12 +1643,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i20.Future>.value({}), + ) as _i20.Future>); @override - _i21.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i27.Uint8List? privateKey, + _i20.Future<_i15.Address> nextUnusedSendAddressFrom({ + required _i16.PaymentCode? pCode, + required _i26.Uint8List? privateKey, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1675,7 +1661,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1687,9 +1673,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), )), - ) as _i21.Future<_i15.Address>); + ) as _i20.Future<_i15.Address>); @override - _i21.Future> prepareNotificationTx({ + _i20.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, @@ -1707,10 +1693,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i20.Future>.value({}), + ) as _i20.Future>); @override - _i21.Future broadcastNotificationTx( + _i20.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1718,19 +1704,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override - _i21.Future hasConnected(String? paymentCodeString) => + _i20.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override - _i21.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + _i20.Future<_i16.PaymentCode?> unBlindedPaymentCodeFromTransaction({ required _i15.Transaction? transaction, required _i15.Address? myNotificationAddress, }) => @@ -1743,31 +1729,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i21.Future<_i17.PaymentCode?>.value(), - ) as _i21.Future<_i17.PaymentCode?>); + returnValue: _i20.Future<_i16.PaymentCode?>.value(), + ) as _i20.Future<_i16.PaymentCode?>); @override - _i21.Future> + _i20.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i21.Future>.value(<_i17.PaymentCode>[]), - ) as _i21.Future>); + _i20.Future>.value(<_i16.PaymentCode>[]), + ) as _i20.Future>); @override - _i21.Future checkForNotificationTransactionsTo( + _i20.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future restoreAllHistory({ + _i20.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1782,12 +1768,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i20.Future restoreHistoryWith( + _i16.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1800,15 +1786,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i20.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i25.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i24.DerivePathType? derivePathType, + required _i16.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1821,7 +1807,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1834,13 +1820,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), )), - ) as _i21.Future<_i15.Address>); + ) as _i20.Future<_i15.Address>); @override - _i21.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i20.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i25.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i24.DerivePathType? derivePathType, + required _i16.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1853,7 +1839,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1866,50 +1852,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), )), - ) as _i21.Future<_i15.Address>); + ) as _i20.Future<_i15.Address>); @override - _i21.Future<_i15.Address> getMyNotificationAddress( - _i25.DerivePathType? derivePathType) => + _i20.Future<_i15.Address> getMyNotificationAddress( + _i24.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i21.Future<_i15.Address>); + ) as _i20.Future<_i15.Address>); @override - _i21.Future> lookupKey(String? paymentCodeString) => + _i20.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i20.Future>.value([]), + ) as _i20.Future>); @override - _i21.Future paymentCodeStringByKey(String? key) => + _i20.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future storeCode(String? paymentCodeString) => + _i20.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); } /// A class which mocks [Manager]. @@ -1930,23 +1916,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i18.CoinServiceAPI get wallet => (super.noSuchMethod( + _i17.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_16( + returnValue: _FakeCoinServiceAPI_15( this, Invocation.getter(#wallet), ), - ) as _i18.CoinServiceAPI); + ) as _i17.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i20.Coin get coin => (super.noSuchMethod( + _i19.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i20.Coin.bitcoin, - ) as _i20.Coin); + returnValue: _i19.Coin.bitcoin, + ) as _i19.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -1979,23 +1965,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i20.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i20.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i21.Future<_i8.FeeObject>); + ) as _i20.Future<_i8.FeeObject>); @override - _i21.Future get maxFee => (super.noSuchMethod( + _i20.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override - _i21.Future get currentReceivingAddress => (super.noSuchMethod( + _i20.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2005,16 +1991,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i11.Balance); @override - _i21.Future> get transactions => (super.noSuchMethod( + _i20.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i21.Future>.value(<_i15.Transaction>[]), - ) as _i21.Future>); + _i20.Future>.value(<_i15.Transaction>[]), + ) as _i20.Future>); @override - _i21.Future> get utxos => (super.noSuchMethod( + _i20.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i21.Future>.value(<_i15.UTXO>[]), - ) as _i21.Future>); + returnValue: _i20.Future>.value(<_i15.UTXO>[]), + ) as _i20.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2034,10 +2020,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i21.Future> get mnemonic => (super.noSuchMethod( + _i20.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i20.Future>.value([]), + ) as _i20.Future>); + @override + _i20.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i20.Future.value(), + ) as _i20.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2059,14 +2050,14 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i20.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2076,7 +2067,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i21.Future> prepareSend({ + _i20.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -2092,27 +2083,27 @@ class MockManager extends _i1.Mock implements _i6.Manager { }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i20.Future>.value({}), + ) as _i20.Future>); @override - _i21.Future confirmSend({required Map? txData}) => + _i20.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override - _i21.Future refresh() => (super.noSuchMethod( + _i20.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2122,34 +2113,35 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i21.Future testNetworkConnection() => (super.noSuchMethod( + _i20.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override - _i21.Future initializeNew() => (super.noSuchMethod( + _i20.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future initializeExisting() => (super.noSuchMethod( + _i20.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future recoverFromMnemonic({ + _i20.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -2160,25 +2152,26 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future exitCurrentWallet() => (super.noSuchMethod( + _i20.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future fullRescan( + _i20.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2190,11 +2183,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future estimateFeeFor( + _i20.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -2206,18 +2199,18 @@ class MockManager extends _i1.Mock implements _i6.Manager { feeRate, ], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override - _i21.Future generateNewAddress() => (super.noSuchMethod( + _i20.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override - void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2225,7 +2218,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2245,7 +2238,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { /// A class which mocks [CoinServiceAPI]. /// /// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { +class MockCoinServiceAPI extends _i1.Mock implements _i17.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -2256,10 +2249,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i20.Coin get coin => (super.noSuchMethod( + _i19.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i20.Coin.bitcoin, - ) as _i20.Coin); + returnValue: _i19.Coin.bitcoin, + ) as _i19.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2292,23 +2285,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i20.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i20.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i21.Future<_i8.FeeObject>); + ) as _i20.Future<_i8.FeeObject>); @override - _i21.Future get maxFee => (super.noSuchMethod( + _i20.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override - _i21.Future get currentReceivingAddress => (super.noSuchMethod( + _i20.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2318,16 +2311,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { ), ) as _i11.Balance); @override - _i21.Future> get transactions => (super.noSuchMethod( + _i20.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i21.Future>.value(<_i15.Transaction>[]), - ) as _i21.Future>); + _i20.Future>.value(<_i15.Transaction>[]), + ) as _i20.Future>); @override - _i21.Future> get utxos => (super.noSuchMethod( + _i20.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i21.Future>.value(<_i15.UTXO>[]), - ) as _i21.Future>); + returnValue: _i20.Future>.value(<_i15.UTXO>[]), + ) as _i20.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2347,10 +2340,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValue: '', ) as String); @override - _i21.Future> get mnemonic => (super.noSuchMethod( + _i20.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i20.Future>.value([]), + ) as _i20.Future>); + @override + _i20.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i20.Future.value(), + ) as _i20.Future); + @override + _i20.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i20.Future.value(), + ) as _i20.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -2367,7 +2370,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValue: 0, ) as int); @override - _i21.Future> prepareSend({ + _i20.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -2383,36 +2386,36 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i20.Future>.value({}), + ) as _i20.Future>); @override - _i21.Future confirmSend({required Map? txData}) => + _i20.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i20.Future.value(''), + ) as _i20.Future); @override - _i21.Future refresh() => (super.noSuchMethod( + _i20.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i20.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2422,16 +2425,17 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValue: false, ) as bool); @override - _i21.Future testNetworkConnection() => (super.noSuchMethod( + _i20.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override - _i21.Future recoverFromMnemonic({ + _i20.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -2442,43 +2446,44 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future initializeNew() => (super.noSuchMethod( + _i20.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future initializeExisting() => (super.noSuchMethod( + _i20.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future exit() => (super.noSuchMethod( + _i20.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future fullRescan( + _i20.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2490,11 +2495,11 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); @override - _i21.Future estimateFeeFor( + _i20.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -2506,24 +2511,24 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { feeRate, ], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i20.Future.value(0), + ) as _i20.Future); @override - _i21.Future generateNewAddress() => (super.noSuchMethod( + _i20.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i20.Future.value(false), + ) as _i20.Future); @override - _i21.Future updateSentCachedTxData(Map? txData) => + _i20.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i20.Future.value(), + returnValueForMissingStub: _i20.Future.value(), + ) as _i20.Future); } diff --git a/test/widget_tests/transaction_card_test.mocks.dart b/test/widget_tests/transaction_card_test.mocks.dart index 8101e32b7..a650dee57 100644 --- a/test/widget_tests/transaction_card_test.mocks.dart +++ b/test/widget_tests/transaction_card_test.mocks.dart @@ -528,6 +528,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: _i18.Future>.value([]), ) as _i18.Future>); @override + _i18.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i18.Future.value(), + ) as _i18.Future); + @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), returnValue: false, @@ -639,6 +644,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { @override _i18.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -649,6 +655,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, @@ -845,6 +852,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI { returnValue: _i18.Future>.value([]), ) as _i18.Future>); @override + _i18.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i18.Future.value(), + ) as _i18.Future); + @override + _i18.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i18.Future.value(), + ) as _i18.Future); + @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, @@ -925,6 +942,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI { @override _i18.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -935,6 +953,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, @@ -1130,6 +1149,16 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { returnValue: _i18.Future>.value([]), ) as _i18.Future>); @override + _i18.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i18.Future.value(), + ) as _i18.Future); + @override + _i18.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i18.Future.value(), + ) as _i18.Future); + @override _i18.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), returnValue: _i18.Future.value(0), @@ -1553,14 +1582,18 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { ) as _i18.Future); @override _i18.Future fillAddresses( - String? suppliedMnemonic, { + String? suppliedMnemonic, + String? mnemonicPassphrase, { int? perBatch = 50, int? numberOfThreads = 4, }) => (super.noSuchMethod( Invocation.method( #fillAddresses, - [suppliedMnemonic], + [ + suppliedMnemonic, + mnemonicPassphrase, + ], { #perBatch: perBatch, #numberOfThreads: numberOfThreads, @@ -1588,6 +1621,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { @override _i18.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -1598,6 +1632,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, diff --git a/test/widget_tests/wallet_card_test.mocks.dart b/test/widget_tests/wallet_card_test.mocks.dart index 9f94bfdc4..6a48669ef 100644 --- a/test/widget_tests/wallet_card_test.mocks.dart +++ b/test/widget_tests/wallet_card_test.mocks.dart @@ -3,12 +3,11 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i20; -import 'dart:typed_data' as _i26; -import 'dart:ui' as _i22; +import 'dart:async' as _i19; +import 'dart:typed_data' as _i25; +import 'dart:ui' as _i21; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip47/bip47.dart' as _i16; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -19,19 +18,19 @@ import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9; import 'package:stackwallet/models/balance.dart' as _i11; import 'package:stackwallet/models/isar/models/isar_models.dart' as _i15; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i23; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i22; import 'package:stackwallet/services/coins/manager.dart' as _i6; -import 'package:stackwallet/services/locale_service.dart' as _i27; +import 'package:stackwallet/services/locale_service.dart' as _i26; import 'package:stackwallet/services/node_service.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' as _i7; -import 'package:stackwallet/services/wallets.dart' as _i18; +import 'package:stackwallet/services/wallets.dart' as _i17; import 'package:stackwallet/services/wallets_service.dart' as _i2; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i19; -import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i24; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i18; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i23; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i25; -import 'package:stackwallet/utilities/prefs.dart' as _i21; + as _i24; +import 'package:stackwallet/utilities/prefs.dart' as _i20; import 'package:tuple/tuple.dart' as _i14; // ignore_for_file: type=lint @@ -190,18 +189,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( +class _FakePaymentCode_14 extends _i1.SmartFake implements _i16.PaymentCode { + _FakePaymentCode_14( Object parent, Invocation parentInvocation, ) : super( @@ -213,7 +202,7 @@ class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i18.Wallets { +class MockWallets extends _i1.Mock implements _i17.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -280,7 +269,7 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i19.Coin? coin}) => + List getWalletIdsFor({required _i18.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -290,18 +279,18 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { returnValue: [], ) as List); @override - Map<_i19.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + Map<_i18.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), - returnValue: <_i19.Coin, + returnValue: <_i18.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, - ) as Map<_i19.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + ) as Map<_i18.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i19.Coin? coin) => + _i18.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -365,17 +354,17 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { returnValueForMissingStub: null, ); @override - _i20.Future load(_i21.Prefs? prefs) => (super.noSuchMethod( + _i19.Future load(_i20.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future loadAfterStackRestore( - _i21.Prefs? prefs, + _i19.Future loadAfterStackRestore( + _i20.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -386,11 +375,11 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { managers, ], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i21.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -398,7 +387,7 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -418,13 +407,13 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { /// A class which mocks [BitcoinWallet]. /// /// See the documentation for Mockito's code generation for more information. -class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { +class MockBitcoinWallet extends _i1.Mock implements _i22.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i20.Timer? _timer) => super.noSuchMethod( + set timer(_i19.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -501,64 +490,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: false, ) as bool); @override - _i19.Coin get coin => (super.noSuchMethod( + _i18.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i19.Coin.bitcoin, - ) as _i19.Coin); + returnValue: _i18.Coin.bitcoin, + ) as _i18.Coin); @override - _i20.Future> get utxos => (super.noSuchMethod( + _i19.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i20.Future>.value(<_i15.UTXO>[]), - ) as _i20.Future>); + returnValue: _i19.Future>.value(<_i15.UTXO>[]), + ) as _i19.Future>); @override - _i20.Future> get transactions => (super.noSuchMethod( + _i19.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i20.Future>.value(<_i15.Transaction>[]), - ) as _i20.Future>); + _i19.Future>.value(<_i15.Transaction>[]), + ) as _i19.Future>); @override - _i20.Future get currentReceivingAddress => (super.noSuchMethod( + _i19.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i19.Future.value(''), + ) as _i19.Future); @override - _i20.Future get currentChangeAddress => (super.noSuchMethod( + _i19.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i19.Future.value(''), + ) as _i19.Future); @override - _i20.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i19.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i19.Future.value(''), + ) as _i19.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i20.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i19.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i20.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i19.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i20.Future<_i8.FeeObject>); + ) as _i19.Future<_i8.FeeObject>); @override - _i20.Future get maxFee => (super.noSuchMethod( + _i19.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i19.Future.value(0), + ) as _i19.Future); @override - _i20.Future> get mnemonic => (super.noSuchMethod( + _i19.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i20.Future>.value([]), - ) as _i20.Future>); + returnValue: _i19.Future>.value([]), + ) as _i19.Future>); @override - _i20.Future get chainHeight => (super.noSuchMethod( + _i19.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i19.Future.value(), + ) as _i19.Future); + @override + _i19.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i19.Future.value(), + ) as _i19.Future); + @override + _i19.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i19.Future.value(0), + ) as _i19.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -655,27 +654,28 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i20.Future exit() => (super.noSuchMethod( + _i19.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i24.DerivePathType addressType({required String? address}) => + _i23.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i24.DerivePathType.bip44, - ) as _i24.DerivePathType); + returnValue: _i23.DerivePathType.bip44, + ) as _i23.DerivePathType); @override - _i20.Future recoverFromMnemonic({ + _i19.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -686,52 +686,53 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future getTransactionCacheEarly(List? allAddresses) => + _i19.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i19.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i20.Future.value(false), - ) as _i20.Future); + returnValue: _i19.Future.value(false), + ) as _i19.Future); @override - _i20.Future getAllTxsToWatch() => (super.noSuchMethod( + _i19.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future refresh() => (super.noSuchMethod( + _i19.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future> prepareSend({ + _i19.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -747,26 +748,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), returnValue: - _i20.Future>.value({}), - ) as _i20.Future>); + _i19.Future>.value({}), + ) as _i19.Future>); @override - _i20.Future confirmSend({required Map? txData}) => + _i19.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i19.Future.value(''), + ) as _i19.Future); @override - _i20.Future testNetworkConnection() => (super.noSuchMethod( + _i19.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i20.Future.value(false), - ) as _i20.Future); + returnValue: _i19.Future.value(false), + ) as _i19.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -784,33 +785,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i20.Future initializeNew() => (super.noSuchMethod( + _i19.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future initializeExisting() => (super.noSuchMethod( + _i19.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future updateSentCachedTxData(Map? txData) => + _i19.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -820,35 +821,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: false, ) as bool); @override - _i20.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i19.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i19.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i20.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i19.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i20.Future<_i9.ElectrumXNode>); + ) as _i19.Future<_i9.ElectrumXNode>); @override - _i20.Future addDerivation({ + _i19.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i24.DerivePathType? derivePathType, + required _i23.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -862,13 +863,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future addDerivations({ + _i19.Future addDerivations({ required int? chain, - required _i24.DerivePathType? derivePathType, + required _i23.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -881,50 +882,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future>> fastFetch( + _i19.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i20.Future>>.value( + returnValue: _i19.Future>>.value( >[]), - ) as _i20.Future>>); + ) as _i19.Future>>); @override - _i20.Future getTxCount({required String? address}) => + _i19.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i19.Future.value(0), + ) as _i19.Future); @override - _i20.Future checkCurrentReceivingAddressesForTransactions() => + _i19.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future checkCurrentChangeAddressesForTransactions() => + _i19.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override int estimateTxFee({ required int? vSize, @@ -964,7 +965,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, )); @override - _i20.Future> fetchBuildTxData( + _i19.Future> fetchBuildTxData( List<_i15.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( @@ -972,10 +973,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { [utxosToUse], ), returnValue: - _i20.Future>.value({}), - ) as _i20.Future>); + _i19.Future>.value({}), + ) as _i19.Future>); @override - _i20.Future> buildTransaction({ + _i19.Future> buildTransaction({ required List<_i15.UTXO>? utxosToUse, required Map? utxoSigningData, required List? recipients, @@ -993,10 +994,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), returnValue: - _i20.Future>.value({}), - ) as _i20.Future>); + _i19.Future>.value({}), + ) as _i19.Future>); @override - _i20.Future fullRescan( + _i19.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1008,11 +1009,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future estimateFeeFor( + _i19.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -1024,8 +1025,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { feeRate, ], ), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i19.Future.value(0), + ) as _i19.Future); @override int roughFeeEstimate( int? inputCount, @@ -1044,25 +1045,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: 0, ) as int); @override - _i20.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i19.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i19.Future.value(0), + ) as _i19.Future); @override - _i20.Future generateNewAddress() => (super.noSuchMethod( + _i19.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i20.Future.value(false), - ) as _i20.Future); + returnValue: _i19.Future.value(false), + ) as _i19.Future); @override void initCache( String? walletId, - _i19.Coin? coin, + _i18.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1075,14 +1076,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i20.Future updateCachedId(String? id) => (super.noSuchMethod( + _i19.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1092,14 +1093,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: 0, ) as int); @override - _i20.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i19.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1109,15 +1110,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: false, ) as bool); @override - _i20.Future updateCachedIsFavorite(bool? isFavorite) => + _i19.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1133,15 +1134,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ), ) as _i11.Balance); @override - _i20.Future updateCachedBalance(_i11.Balance? balance) => + _i19.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1157,15 +1158,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ), ) as _i11.Balance); @override - _i20.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i19.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1176,11 +1177,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i20.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i19.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( Map? txData, dynamic electrumxClient, List<_i15.Address>? myAddresses, - _i19.Coin? coin, + _i18.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1197,7 +1198,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ], ), returnValue: - _i20.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( + _i19.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( _FakeTuple2_12<_i15.Transaction, _i15.Address>( this, Invocation.method( @@ -1212,51 +1213,46 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ], ), )), - ) as _i20.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i19.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i19.Coin? coin, + required _i18.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i25.SecureStorageInterface? secureStorage, + required _i24.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i20.Future> Function()? getMnemonic, - required _i20.Future Function()? getChainHeight, - required _i20.Future Function()? getCurrentChangeAddress, + required _i19.Future Function()? getMnemonicString, + required _i19.Future Function()? getMnemonicPassphrase, + required _i19.Future Function()? getChainHeight, + required _i19.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i20.Future> Function({ + required _i19.Future> Function({ required String address, required int satoshiAmount, Map? args, })? prepareSend, - required _i20.Future Function({required String address})? getTxCount, - required _i20.Future> Function(List<_i15.UTXO>)? + required _i19.Future Function({required String address})? getTxCount, + required _i19.Future> Function(List<_i15.UTXO>)? fetchBuildTxData, - required _i20.Future Function()? refresh, - required _i20.Future Function()? checkChangeAddressForTransactions, - required _i20.Future Function({ + required _i19.Future Function()? refresh, + required _i19.Future Function()? checkChangeAddressForTransactions, + required _i19.Future Function({ required String address, required int chain, - required _i24.DerivePathType derivePathType, + required _i23.DerivePathType derivePathType, required String pubKey, required String wif, })? addDerivation, - required _i20.Future Function({ - required int chain, - required Map derivationsToAdd, - required _i24.DerivePathType derivePathType, - })? - addDerivations, }) => super.noSuchMethod( Invocation.method( @@ -1272,7 +1268,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #secureStorage: secureStorage, #dustLimitP2PKH: dustLimitP2PKH, #minConfirms: minConfirms, - #getMnemonic: getMnemonic, + #getMnemonicString: getMnemonicString, + #getMnemonicPassphrase: getMnemonicPassphrase, #getChainHeight: getChainHeight, #getCurrentChangeAddress: getCurrentChangeAddress, #estimateTxFee: estimateTxFee, @@ -1283,79 +1280,67 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #checkChangeAddressForTransactions: checkChangeAddressForTransactions, #addDerivation: addDerivation, - #addDerivations: addDerivations, }, ), returnValueForMissingStub: null, ); @override - _i20.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i19.Future<_i15.Address> currentReceivingPaynymAddress( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i19.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i20.Future<_i15.Address>); + ) as _i19.Future<_i15.Address>); @override - _i20.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i19.Future checkCurrentPaynymReceivingAddressForTransactions( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i19.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future<_i16.BIP32> getRootNode({required List? mnemonic}) => - (super.noSuchMethod( - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - returnValue: _i20.Future<_i16.BIP32>.value(_FakeBIP32_14( - this, - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - )), - ) as _i20.Future<_i16.BIP32>); - @override - _i20.Future<_i26.Uint8List> deriveNotificationPrivateKey( - {required List? mnemonic}) => + _i19.Future<_i25.Uint8List> deriveNotificationPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, + }) => (super.noSuchMethod( Invocation.method( #deriveNotificationPrivateKey, [], - {#mnemonic: mnemonic}, + { + #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, + }, ), - returnValue: _i20.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), - ) as _i20.Future<_i26.Uint8List>); + returnValue: _i19.Future<_i25.Uint8List>.value(_i25.Uint8List(0)), + ) as _i19.Future<_i25.Uint8List>); @override - _i20.Future<_i26.Uint8List> deriveReceivingPrivateKey({ - required List? mnemonic, + _i19.Future<_i25.Uint8List> deriveReceivingPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, required int? index, }) => (super.noSuchMethod( @@ -1364,48 +1349,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #index: index, }, ), - returnValue: _i20.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), - ) as _i20.Future<_i26.Uint8List>); + returnValue: _i19.Future<_i25.Uint8List>.value(_i25.Uint8List(0)), + ) as _i19.Future<_i25.Uint8List>); @override - _i20.Future<_i17.PaymentCode> getPaymentCode( - _i24.DerivePathType? derivePathType) => + _i19.Future<_i16.PaymentCode> getPaymentCode( + _i23.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i20.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i19.Future<_i16.PaymentCode>.value(_FakePaymentCode_14( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i20.Future<_i17.PaymentCode>); + ) as _i19.Future<_i16.PaymentCode>); @override - _i20.Future<_i26.Uint8List> signWithNotificationKey(_i26.Uint8List? data) => + _i19.Future<_i25.Uint8List> signWithNotificationKey(_i25.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i20.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), - ) as _i20.Future<_i26.Uint8List>); + returnValue: _i19.Future<_i25.Uint8List>.value(_i25.Uint8List(0)), + ) as _i19.Future<_i25.Uint8List>); @override - _i20.Future signStringWithNotificationKey(String? data) => + _i19.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i19.Future.value(''), + ) as _i19.Future); @override - _i20.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, + _i19.Future> preparePaymentCodeSend({ + required _i16.PaymentCode? paymentCode, required int? satoshiAmount, Map? args, }) => @@ -1420,12 +1406,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), returnValue: - _i20.Future>.value({}), - ) as _i20.Future>); + _i19.Future>.value({}), + ) as _i19.Future>); @override - _i20.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i26.Uint8List? privateKey, + _i19.Future<_i15.Address> nextUnusedSendAddressFrom({ + required _i16.PaymentCode? pCode, + required _i25.Uint8List? privateKey, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1438,7 +1424,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i19.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1450,9 +1436,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), )), - ) as _i20.Future<_i15.Address>); + ) as _i19.Future<_i15.Address>); @override - _i20.Future> prepareNotificationTx({ + _i19.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, @@ -1470,10 +1456,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), returnValue: - _i20.Future>.value({}), - ) as _i20.Future>); + _i19.Future>.value({}), + ) as _i19.Future>); @override - _i20.Future broadcastNotificationTx( + _i19.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1481,19 +1467,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i19.Future.value(''), + ) as _i19.Future); @override - _i20.Future hasConnected(String? paymentCodeString) => + _i19.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i20.Future.value(false), - ) as _i20.Future); + returnValue: _i19.Future.value(false), + ) as _i19.Future); @override - _i20.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + _i19.Future<_i16.PaymentCode?> unBlindedPaymentCodeFromTransaction({ required _i15.Transaction? transaction, required _i15.Address? myNotificationAddress, }) => @@ -1506,31 +1492,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i20.Future<_i17.PaymentCode?>.value(), - ) as _i20.Future<_i17.PaymentCode?>); + returnValue: _i19.Future<_i16.PaymentCode?>.value(), + ) as _i19.Future<_i16.PaymentCode?>); @override - _i20.Future> + _i19.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i20.Future>.value(<_i17.PaymentCode>[]), - ) as _i20.Future>); + _i19.Future>.value(<_i16.PaymentCode>[]), + ) as _i19.Future>); @override - _i20.Future checkForNotificationTransactionsTo( + _i19.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future restoreAllHistory({ + _i19.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1545,12 +1531,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i19.Future restoreHistoryWith( + _i16.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1563,15 +1549,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i19.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i24.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i23.DerivePathType? derivePathType, + required _i16.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1584,7 +1570,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i19.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1597,13 +1583,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), )), - ) as _i20.Future<_i15.Address>); + ) as _i19.Future<_i15.Address>); @override - _i20.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i19.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i24.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i23.DerivePathType? derivePathType, + required _i16.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1616,7 +1602,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i19.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1629,56 +1615,56 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), )), - ) as _i20.Future<_i15.Address>); + ) as _i19.Future<_i15.Address>); @override - _i20.Future<_i15.Address> getMyNotificationAddress( - _i24.DerivePathType? derivePathType) => + _i19.Future<_i15.Address> getMyNotificationAddress( + _i23.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i19.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i20.Future<_i15.Address>); + ) as _i19.Future<_i15.Address>); @override - _i20.Future> lookupKey(String? paymentCodeString) => + _i19.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i20.Future>.value([]), - ) as _i20.Future>); + returnValue: _i19.Future>.value([]), + ) as _i19.Future>); @override - _i20.Future paymentCodeStringByKey(String? key) => + _i19.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + ) as _i19.Future); @override - _i20.Future storeCode(String? paymentCodeString) => + _i19.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i19.Future.value(''), + ) as _i19.Future); } /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i27.LocaleService { +class MockLocaleService extends _i1.Mock implements _i26.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -1694,17 +1680,17 @@ class MockLocaleService extends _i1.Mock implements _i27.LocaleService { returnValue: false, ) as bool); @override - _i20.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i19.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i19.Future.value(), + returnValueForMissingStub: _i19.Future.value(), + ) as _i19.Future); @override - void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i21.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1712,7 +1698,7 @@ class MockLocaleService extends _i1.Mock implements _i27.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], diff --git a/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart index 9c8a9941a..aaa0a2baf 100644 --- a/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart +++ b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart @@ -3,12 +3,11 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i22; -import 'dart:typed_data' as _i27; -import 'dart:ui' as _i24; +import 'dart:async' as _i21; +import 'dart:typed_data' as _i26; +import 'dart:ui' as _i23; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip47/bip47.dart' as _i16; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -18,21 +17,21 @@ import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9; import 'package:stackwallet/models/balance.dart' as _i11; import 'package:stackwallet/models/isar/models/isar_models.dart' as _i15; -import 'package:stackwallet/models/node_model.dart' as _i28; +import 'package:stackwallet/models/node_model.dart' as _i27; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i25; -import 'package:stackwallet/services/coins/coin_service.dart' as _i19; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i24; +import 'package:stackwallet/services/coins/coin_service.dart' as _i18; import 'package:stackwallet/services/coins/manager.dart' as _i6; import 'package:stackwallet/services/node_service.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' as _i7; -import 'package:stackwallet/services/wallets.dart' as _i20; +import 'package:stackwallet/services/wallets.dart' as _i19; import 'package:stackwallet/services/wallets_service.dart' as _i2; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i21; -import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i26; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i20; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i25; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i18; -import 'package:stackwallet/utilities/prefs.dart' as _i23; + as _i17; +import 'package:stackwallet/utilities/prefs.dart' as _i22; import 'package:tuple/tuple.dart' as _i14; // ignore_for_file: type=lint @@ -191,8 +190,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( +class _FakePaymentCode_14 extends _i1.SmartFake implements _i16.PaymentCode { + _FakePaymentCode_14( Object parent, Invocation parentInvocation, ) : super( @@ -201,8 +200,9 @@ class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { ); } -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( +class _FakeSecureStorageInterface_15 extends _i1.SmartFake + implements _i17.SecureStorageInterface { + _FakeSecureStorageInterface_15( Object parent, Invocation parentInvocation, ) : super( @@ -211,20 +211,9 @@ class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { ); } -class _FakeSecureStorageInterface_16 extends _i1.SmartFake - implements _i18.SecureStorageInterface { - _FakeSecureStorageInterface_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeCoinServiceAPI_17 extends _i1.SmartFake - implements _i19.CoinServiceAPI { - _FakeCoinServiceAPI_17( +class _FakeCoinServiceAPI_16 extends _i1.SmartFake + implements _i18.CoinServiceAPI { + _FakeCoinServiceAPI_16( Object parent, Invocation parentInvocation, ) : super( @@ -236,7 +225,7 @@ class _FakeCoinServiceAPI_17 extends _i1.SmartFake /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i20.Wallets { +class MockWallets extends _i1.Mock implements _i19.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -303,7 +292,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i21.Coin? coin}) => + List getWalletIdsFor({required _i20.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -313,18 +302,18 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValue: [], ) as List); @override - Map<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), - returnValue: <_i21.Coin, + returnValue: <_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, - ) as Map<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + ) as Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i21.Coin? coin) => + _i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -388,17 +377,17 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - _i22.Future load(_i23.Prefs? prefs) => (super.noSuchMethod( + _i21.Future load(_i22.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future loadAfterStackRestore( - _i23.Prefs? prefs, + _i21.Future loadAfterStackRestore( + _i22.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -409,11 +398,11 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { managers, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -421,7 +410,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -447,19 +436,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i22.Future> get walletNames => + _i21.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i22.Future>.value( + returnValue: _i21.Future>.value( {}), - ) as _i22.Future>); + ) as _i21.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future renameWallet({ + _i21.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -474,13 +463,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future addExistingStackWallet({ + _i21.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i21.Coin? coin, + required _i20.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -494,13 +483,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addNewWallet({ + _i21.Future addNewWallet({ required String? name, - required _i21.Coin? coin, + required _i20.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -513,46 +502,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i21.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future saveFavoriteWalletIds(List? walletIds) => + _i21.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i21.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i21.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future moveFavorite({ + _i21.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -565,48 +554,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i21.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i21.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future isMnemonicVerified({required String? walletId}) => + _i21.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future setMnemonicVerified({required String? walletId}) => + _i21.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future deleteWallet( + _i21.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -618,20 +607,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future refreshWallets(bool? shouldNotifyListeners) => + _i21.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -639,7 +628,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -667,13 +656,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { /// A class which mocks [BitcoinWallet]. /// /// See the documentation for Mockito's code generation for more information. -class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { +class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i22.Timer? _timer) => super.noSuchMethod( + set timer(_i21.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -750,64 +739,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i15.UTXO>[]), + ) as _i21.Future>); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i15.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future get currentChangeAddress => (super.noSuchMethod( + _i21.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i21.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future get chainHeight => (super.noSuchMethod( + _i21.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -904,27 +903,28 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i22.Future exit() => (super.noSuchMethod( + _i21.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i26.DerivePathType addressType({required String? address}) => + _i25.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i26.DerivePathType.bip44, - ) as _i26.DerivePathType); + returnValue: _i25.DerivePathType.bip44, + ) as _i25.DerivePathType); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -935,52 +935,53 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future getTransactionCacheEarly(List? allAddresses) => + _i21.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i21.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future getAllTxsToWatch() => (super.noSuchMethod( + _i21.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -996,26 +997,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1033,33 +1034,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i21.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1069,35 +1070,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i21.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i22.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i21.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i22.Future<_i9.ElectrumXNode>); + ) as _i21.Future<_i9.ElectrumXNode>); @override - _i22.Future addDerivation({ + _i21.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i26.DerivePathType? derivePathType, + required _i25.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1111,13 +1112,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addDerivations({ + _i21.Future addDerivations({ required int? chain, - required _i26.DerivePathType? derivePathType, + required _i25.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1130,50 +1131,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future>> fastFetch( + _i21.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i22.Future>>.value( + returnValue: _i21.Future>>.value( >[]), - ) as _i22.Future>>); + ) as _i21.Future>>); @override - _i22.Future getTxCount({required String? address}) => + _i21.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future checkCurrentReceivingAddressesForTransactions() => + _i21.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkCurrentChangeAddressesForTransactions() => + _i21.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int estimateTxFee({ required int? vSize, @@ -1213,7 +1214,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, )); @override - _i22.Future> fetchBuildTxData( + _i21.Future> fetchBuildTxData( List<_i15.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( @@ -1221,10 +1222,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [utxosToUse], ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future> buildTransaction({ + _i21.Future> buildTransaction({ required List<_i15.UTXO>? utxosToUse, required Map? utxoSigningData, required List? recipients, @@ -1242,10 +1243,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1257,11 +1258,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -1273,8 +1274,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override int roughFeeEstimate( int? inputCount, @@ -1293,25 +1294,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i21.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void initCache( String? walletId, - _i21.Coin? coin, + _i20.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1324,14 +1325,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future updateCachedId(String? id) => (super.noSuchMethod( + _i21.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1341,14 +1342,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i21.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1358,15 +1359,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateCachedIsFavorite(bool? isFavorite) => + _i21.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1382,15 +1383,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalance(_i11.Balance? balance) => + _i21.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1406,15 +1407,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i21.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1425,11 +1426,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( Map? txData, dynamic electrumxClient, List<_i15.Address>? myAddresses, - _i21.Coin? coin, + _i20.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1446,7 +1447,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), returnValue: - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( + _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( _FakeTuple2_12<_i15.Transaction, _i15.Address>( this, Invocation.method( @@ -1461,51 +1462,46 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), )), - ) as _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i21.Coin? coin, + required _i20.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i18.SecureStorageInterface? secureStorage, + required _i17.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i22.Future> Function()? getMnemonic, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function()? getCurrentChangeAddress, + required _i21.Future Function()? getMnemonicString, + required _i21.Future Function()? getMnemonicPassphrase, + required _i21.Future Function()? getChainHeight, + required _i21.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i22.Future> Function({ + required _i21.Future> Function({ required String address, required int satoshiAmount, Map? args, })? prepareSend, - required _i22.Future Function({required String address})? getTxCount, - required _i22.Future> Function(List<_i15.UTXO>)? + required _i21.Future Function({required String address})? getTxCount, + required _i21.Future> Function(List<_i15.UTXO>)? fetchBuildTxData, - required _i22.Future Function()? refresh, - required _i22.Future Function()? checkChangeAddressForTransactions, - required _i22.Future Function({ + required _i21.Future Function()? refresh, + required _i21.Future Function()? checkChangeAddressForTransactions, + required _i21.Future Function({ required String address, required int chain, - required _i26.DerivePathType derivePathType, + required _i25.DerivePathType derivePathType, required String pubKey, required String wif, })? addDerivation, - required _i22.Future Function({ - required int chain, - required Map derivationsToAdd, - required _i26.DerivePathType derivePathType, - })? - addDerivations, }) => super.noSuchMethod( Invocation.method( @@ -1521,7 +1517,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #secureStorage: secureStorage, #dustLimitP2PKH: dustLimitP2PKH, #minConfirms: minConfirms, - #getMnemonic: getMnemonic, + #getMnemonicString: getMnemonicString, + #getMnemonicPassphrase: getMnemonicPassphrase, #getChainHeight: getChainHeight, #getCurrentChangeAddress: getCurrentChangeAddress, #estimateTxFee: estimateTxFee, @@ -1532,79 +1529,67 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #checkChangeAddressForTransactions: checkChangeAddressForTransactions, #addDerivation: addDerivation, - #addDerivations: addDerivations, }, ), returnValueForMissingStub: null, ); @override - _i22.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i21.Future<_i15.Address> currentReceivingPaynymAddress( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i21.Future checkCurrentPaynymReceivingAddressForTransactions( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i21.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i16.BIP32> getRootNode({required List? mnemonic}) => - (super.noSuchMethod( - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14( - this, - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - )), - ) as _i22.Future<_i16.BIP32>); - @override - _i22.Future<_i27.Uint8List> deriveNotificationPrivateKey( - {required List? mnemonic}) => + _i21.Future<_i26.Uint8List> deriveNotificationPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, + }) => (super.noSuchMethod( Invocation.method( #deriveNotificationPrivateKey, [], - {#mnemonic: mnemonic}, + { + #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, + }, ), - returnValue: _i22.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i22.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i21.Future<_i26.Uint8List>); @override - _i22.Future<_i27.Uint8List> deriveReceivingPrivateKey({ - required List? mnemonic, + _i21.Future<_i26.Uint8List> deriveReceivingPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, required int? index, }) => (super.noSuchMethod( @@ -1613,48 +1598,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #index: index, }, ), - returnValue: _i22.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i22.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i21.Future<_i26.Uint8List>); @override - _i22.Future<_i17.PaymentCode> getPaymentCode( - _i26.DerivePathType? derivePathType) => + _i21.Future<_i16.PaymentCode> getPaymentCode( + _i25.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i22.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i21.Future<_i16.PaymentCode>.value(_FakePaymentCode_14( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i22.Future<_i17.PaymentCode>); + ) as _i21.Future<_i16.PaymentCode>); @override - _i22.Future<_i27.Uint8List> signWithNotificationKey(_i27.Uint8List? data) => + _i21.Future<_i26.Uint8List> signWithNotificationKey(_i26.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i22.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i22.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i21.Future<_i26.Uint8List>); @override - _i22.Future signStringWithNotificationKey(String? data) => + _i21.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, + _i21.Future> preparePaymentCodeSend({ + required _i16.PaymentCode? paymentCode, required int? satoshiAmount, Map? args, }) => @@ -1669,12 +1655,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i27.Uint8List? privateKey, + _i21.Future<_i15.Address> nextUnusedSendAddressFrom({ + required _i16.PaymentCode? pCode, + required _i26.Uint8List? privateKey, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1687,7 +1673,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1699,9 +1685,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future> prepareNotificationTx({ + _i21.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, @@ -1719,10 +1705,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future broadcastNotificationTx( + _i21.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1730,19 +1716,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future hasConnected(String? paymentCodeString) => + _i21.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + _i21.Future<_i16.PaymentCode?> unBlindedPaymentCodeFromTransaction({ required _i15.Transaction? transaction, required _i15.Address? myNotificationAddress, }) => @@ -1755,31 +1741,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i17.PaymentCode?>.value(), - ) as _i22.Future<_i17.PaymentCode?>); + returnValue: _i21.Future<_i16.PaymentCode?>.value(), + ) as _i21.Future<_i16.PaymentCode?>); @override - _i22.Future> + _i21.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i22.Future>.value(<_i17.PaymentCode>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i16.PaymentCode>[]), + ) as _i21.Future>); @override - _i22.Future checkForNotificationTransactionsTo( + _i21.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future restoreAllHistory({ + _i21.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1794,12 +1780,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i21.Future restoreHistoryWith( + _i16.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1812,15 +1798,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i21.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i25.DerivePathType? derivePathType, + required _i16.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1833,7 +1819,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1846,13 +1832,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i21.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i25.DerivePathType? derivePathType, + required _i16.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1865,7 +1851,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1878,50 +1864,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future<_i15.Address> getMyNotificationAddress( - _i26.DerivePathType? derivePathType) => + _i21.Future<_i15.Address> getMyNotificationAddress( + _i25.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future> lookupKey(String? paymentCodeString) => + _i21.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future paymentCodeStringByKey(String? key) => + _i21.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future storeCode(String? paymentCodeString) => + _i21.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); } /// A class which mocks [NodeService]. @@ -1929,41 +1915,41 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { /// See the documentation for Mockito's code generation for more information. class MockNodeService extends _i1.Mock implements _i3.NodeService { @override - _i18.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( + _i17.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_16( + returnValue: _FakeSecureStorageInterface_15( this, Invocation.getter(#secureStorageInterface), ), - ) as _i18.SecureStorageInterface); + ) as _i17.SecureStorageInterface); @override - List<_i28.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i27.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i28.NodeModel>[], - ) as List<_i28.NodeModel>); + returnValue: <_i27.NodeModel>[], + ) as List<_i27.NodeModel>); @override - List<_i28.NodeModel> get nodes => (super.noSuchMethod( + List<_i27.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i28.NodeModel>[], - ) as List<_i28.NodeModel>); + returnValue: <_i27.NodeModel>[], + ) as List<_i27.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateDefaults() => (super.noSuchMethod( + _i21.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future setPrimaryNodeFor({ - required _i21.Coin? coin, - required _i28.NodeModel? node, + _i21.Future setPrimaryNodeFor({ + required _i20.Coin? coin, + required _i27.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -1976,44 +1962,44 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i28.NodeModel? getPrimaryNodeFor({required _i21.Coin? coin}) => + _i27.NodeModel? getPrimaryNodeFor({required _i20.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i28.NodeModel?); + )) as _i27.NodeModel?); @override - List<_i28.NodeModel> getNodesFor(_i21.Coin? coin) => (super.noSuchMethod( + List<_i27.NodeModel> getNodesFor(_i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i28.NodeModel>[], - ) as List<_i28.NodeModel>); + returnValue: <_i27.NodeModel>[], + ) as List<_i27.NodeModel>); @override - _i28.NodeModel? getNodeById({required String? id}) => + _i27.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i28.NodeModel?); + )) as _i27.NodeModel?); @override - List<_i28.NodeModel> failoverNodesFor({required _i21.Coin? coin}) => + List<_i27.NodeModel> failoverNodesFor({required _i20.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i28.NodeModel>[], - ) as List<_i28.NodeModel>); + returnValue: <_i27.NodeModel>[], + ) as List<_i27.NodeModel>); @override - _i22.Future add( - _i28.NodeModel? node, + _i21.Future add( + _i27.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -2026,11 +2012,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future delete( + _i21.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -2042,11 +2028,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future setEnabledState( + _i21.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -2060,12 +2046,12 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future edit( - _i28.NodeModel? editedNode, + _i21.Future edit( + _i27.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -2078,20 +2064,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateCommunityNodes() => (super.noSuchMethod( + _i21.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2099,7 +2085,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2142,23 +2128,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i19.CoinServiceAPI get wallet => (super.noSuchMethod( + _i18.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_17( + returnValue: _FakeCoinServiceAPI_16( this, Invocation.getter(#wallet), ), - ) as _i19.CoinServiceAPI); + ) as _i18.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2191,23 +2177,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2217,16 +2203,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i15.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i15.UTXO>[]), + ) as _i21.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2246,10 +2232,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2271,14 +2262,14 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2288,7 +2279,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -2304,27 +2295,27 @@ class MockManager extends _i1.Mock implements _i6.Manager { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2334,34 +2325,35 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -2372,25 +2364,26 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future exitCurrentWallet() => (super.noSuchMethod( + _i21.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2402,11 +2395,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -2418,18 +2411,18 @@ class MockManager extends _i1.Mock implements _i6.Manager { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2437,7 +2430,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2457,7 +2450,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { /// A class which mocks [CoinServiceAPI]. /// /// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { +class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -2468,10 +2461,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2504,23 +2497,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2530,16 +2523,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i15.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i15.UTXO>[]), + ) as _i21.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2559,10 +2552,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); + @override + _i21.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -2579,7 +2582,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: 0, ) as int); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -2595,36 +2598,36 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2634,16 +2637,17 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -2654,43 +2658,44 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future exit() => (super.noSuchMethod( + _i21.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2702,11 +2707,11 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -2718,24 +2723,24 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i21.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); } diff --git a/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart b/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart index bfb71d028..2f252b0a8 100644 --- a/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart +++ b/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart @@ -3,12 +3,11 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i22; -import 'dart:typed_data' as _i27; -import 'dart:ui' as _i24; +import 'dart:async' as _i21; +import 'dart:typed_data' as _i26; +import 'dart:ui' as _i23; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip47/bip47.dart' as _i16; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -18,21 +17,21 @@ import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9; import 'package:stackwallet/models/balance.dart' as _i11; import 'package:stackwallet/models/isar/models/isar_models.dart' as _i15; -import 'package:stackwallet/models/node_model.dart' as _i28; +import 'package:stackwallet/models/node_model.dart' as _i27; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i25; -import 'package:stackwallet/services/coins/coin_service.dart' as _i19; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i24; +import 'package:stackwallet/services/coins/coin_service.dart' as _i18; import 'package:stackwallet/services/coins/manager.dart' as _i6; import 'package:stackwallet/services/node_service.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' as _i7; -import 'package:stackwallet/services/wallets.dart' as _i20; +import 'package:stackwallet/services/wallets.dart' as _i19; import 'package:stackwallet/services/wallets_service.dart' as _i2; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i21; -import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i26; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i20; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i25; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i18; -import 'package:stackwallet/utilities/prefs.dart' as _i23; + as _i17; +import 'package:stackwallet/utilities/prefs.dart' as _i22; import 'package:tuple/tuple.dart' as _i14; // ignore_for_file: type=lint @@ -191,8 +190,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( +class _FakePaymentCode_14 extends _i1.SmartFake implements _i16.PaymentCode { + _FakePaymentCode_14( Object parent, Invocation parentInvocation, ) : super( @@ -201,8 +200,9 @@ class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { ); } -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( +class _FakeSecureStorageInterface_15 extends _i1.SmartFake + implements _i17.SecureStorageInterface { + _FakeSecureStorageInterface_15( Object parent, Invocation parentInvocation, ) : super( @@ -211,20 +211,9 @@ class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { ); } -class _FakeSecureStorageInterface_16 extends _i1.SmartFake - implements _i18.SecureStorageInterface { - _FakeSecureStorageInterface_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeCoinServiceAPI_17 extends _i1.SmartFake - implements _i19.CoinServiceAPI { - _FakeCoinServiceAPI_17( +class _FakeCoinServiceAPI_16 extends _i1.SmartFake + implements _i18.CoinServiceAPI { + _FakeCoinServiceAPI_16( Object parent, Invocation parentInvocation, ) : super( @@ -236,7 +225,7 @@ class _FakeCoinServiceAPI_17 extends _i1.SmartFake /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i20.Wallets { +class MockWallets extends _i1.Mock implements _i19.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -303,7 +292,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i21.Coin? coin}) => + List getWalletIdsFor({required _i20.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -313,18 +302,18 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValue: [], ) as List); @override - Map<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), - returnValue: <_i21.Coin, + returnValue: <_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, - ) as Map<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + ) as Map<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i21.Coin? coin) => + _i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -388,17 +377,17 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - _i22.Future load(_i23.Prefs? prefs) => (super.noSuchMethod( + _i21.Future load(_i22.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future loadAfterStackRestore( - _i23.Prefs? prefs, + _i21.Future loadAfterStackRestore( + _i22.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -409,11 +398,11 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { managers, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -421,7 +410,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -447,19 +436,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i22.Future> get walletNames => + _i21.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i22.Future>.value( + returnValue: _i21.Future>.value( {}), - ) as _i22.Future>); + ) as _i21.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future renameWallet({ + _i21.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -474,13 +463,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future addExistingStackWallet({ + _i21.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i21.Coin? coin, + required _i20.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -494,13 +483,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addNewWallet({ + _i21.Future addNewWallet({ required String? name, - required _i21.Coin? coin, + required _i20.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -513,46 +502,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i21.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future saveFavoriteWalletIds(List? walletIds) => + _i21.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i21.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i21.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future moveFavorite({ + _i21.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -565,48 +554,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i21.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i21.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future isMnemonicVerified({required String? walletId}) => + _i21.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future setMnemonicVerified({required String? walletId}) => + _i21.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future deleteWallet( + _i21.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -618,20 +607,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future refreshWallets(bool? shouldNotifyListeners) => + _i21.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -639,7 +628,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -667,13 +656,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { /// A class which mocks [BitcoinWallet]. /// /// See the documentation for Mockito's code generation for more information. -class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { +class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i22.Timer? _timer) => super.noSuchMethod( + set timer(_i21.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -750,64 +739,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i15.UTXO>[]), + ) as _i21.Future>); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i15.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future get currentChangeAddress => (super.noSuchMethod( + _i21.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i21.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future get chainHeight => (super.noSuchMethod( + _i21.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -904,27 +903,28 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i22.Future exit() => (super.noSuchMethod( + _i21.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i26.DerivePathType addressType({required String? address}) => + _i25.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i26.DerivePathType.bip44, - ) as _i26.DerivePathType); + returnValue: _i25.DerivePathType.bip44, + ) as _i25.DerivePathType); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -935,52 +935,53 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future getTransactionCacheEarly(List? allAddresses) => + _i21.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i21.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future getAllTxsToWatch() => (super.noSuchMethod( + _i21.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -996,26 +997,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1033,33 +1034,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i21.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1069,35 +1070,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i21.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i22.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i21.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i22.Future<_i9.ElectrumXNode>); + ) as _i21.Future<_i9.ElectrumXNode>); @override - _i22.Future addDerivation({ + _i21.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i26.DerivePathType? derivePathType, + required _i25.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1111,13 +1112,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future addDerivations({ + _i21.Future addDerivations({ required int? chain, - required _i26.DerivePathType? derivePathType, + required _i25.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1130,50 +1131,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future>> fastFetch( + _i21.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i22.Future>>.value( + returnValue: _i21.Future>>.value( >[]), - ) as _i22.Future>>); + ) as _i21.Future>>); @override - _i22.Future getTxCount({required String? address}) => + _i21.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future checkCurrentReceivingAddressesForTransactions() => + _i21.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkCurrentChangeAddressesForTransactions() => + _i21.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int estimateTxFee({ required int? vSize, @@ -1213,7 +1214,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, )); @override - _i22.Future> fetchBuildTxData( + _i21.Future> fetchBuildTxData( List<_i15.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( @@ -1221,10 +1222,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [utxosToUse], ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future> buildTransaction({ + _i21.Future> buildTransaction({ required List<_i15.UTXO>? utxosToUse, required Map? utxoSigningData, required List? recipients, @@ -1242,10 +1243,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1257,11 +1258,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -1273,8 +1274,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override int roughFeeEstimate( int? inputCount, @@ -1293,25 +1294,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i21.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void initCache( String? walletId, - _i21.Coin? coin, + _i20.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1324,14 +1325,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future updateCachedId(String? id) => (super.noSuchMethod( + _i21.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1341,14 +1342,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i21.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1358,15 +1359,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateCachedIsFavorite(bool? isFavorite) => + _i21.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1382,15 +1383,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalance(_i11.Balance? balance) => + _i21.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1406,15 +1407,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i21.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1425,11 +1426,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( Map? txData, dynamic electrumxClient, List<_i15.Address>? myAddresses, - _i21.Coin? coin, + _i20.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1446,7 +1447,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), returnValue: - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( + _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( _FakeTuple2_12<_i15.Transaction, _i15.Address>( this, Invocation.method( @@ -1461,51 +1462,46 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), )), - ) as _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i21.Coin? coin, + required _i20.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i18.SecureStorageInterface? secureStorage, + required _i17.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i22.Future> Function()? getMnemonic, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function()? getCurrentChangeAddress, + required _i21.Future Function()? getMnemonicString, + required _i21.Future Function()? getMnemonicPassphrase, + required _i21.Future Function()? getChainHeight, + required _i21.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i22.Future> Function({ + required _i21.Future> Function({ required String address, required int satoshiAmount, Map? args, })? prepareSend, - required _i22.Future Function({required String address})? getTxCount, - required _i22.Future> Function(List<_i15.UTXO>)? + required _i21.Future Function({required String address})? getTxCount, + required _i21.Future> Function(List<_i15.UTXO>)? fetchBuildTxData, - required _i22.Future Function()? refresh, - required _i22.Future Function()? checkChangeAddressForTransactions, - required _i22.Future Function({ + required _i21.Future Function()? refresh, + required _i21.Future Function()? checkChangeAddressForTransactions, + required _i21.Future Function({ required String address, required int chain, - required _i26.DerivePathType derivePathType, + required _i25.DerivePathType derivePathType, required String pubKey, required String wif, })? addDerivation, - required _i22.Future Function({ - required int chain, - required Map derivationsToAdd, - required _i26.DerivePathType derivePathType, - })? - addDerivations, }) => super.noSuchMethod( Invocation.method( @@ -1521,7 +1517,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #secureStorage: secureStorage, #dustLimitP2PKH: dustLimitP2PKH, #minConfirms: minConfirms, - #getMnemonic: getMnemonic, + #getMnemonicString: getMnemonicString, + #getMnemonicPassphrase: getMnemonicPassphrase, #getChainHeight: getChainHeight, #getCurrentChangeAddress: getCurrentChangeAddress, #estimateTxFee: estimateTxFee, @@ -1532,79 +1529,67 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #checkChangeAddressForTransactions: checkChangeAddressForTransactions, #addDerivation: addDerivation, - #addDerivations: addDerivations, }, ), returnValueForMissingStub: null, ); @override - _i22.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i21.Future<_i15.Address> currentReceivingPaynymAddress( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i21.Future checkCurrentPaynymReceivingAddressForTransactions( + _i16.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i21.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i16.BIP32> getRootNode({required List? mnemonic}) => - (super.noSuchMethod( - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14( - this, - Invocation.method( - #getRootNode, - [], - {#mnemonic: mnemonic}, - ), - )), - ) as _i22.Future<_i16.BIP32>); - @override - _i22.Future<_i27.Uint8List> deriveNotificationPrivateKey( - {required List? mnemonic}) => + _i21.Future<_i26.Uint8List> deriveNotificationPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, + }) => (super.noSuchMethod( Invocation.method( #deriveNotificationPrivateKey, [], - {#mnemonic: mnemonic}, + { + #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, + }, ), - returnValue: _i22.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i22.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i21.Future<_i26.Uint8List>); @override - _i22.Future<_i27.Uint8List> deriveReceivingPrivateKey({ - required List? mnemonic, + _i21.Future<_i26.Uint8List> deriveReceivingPrivateKey({ + required String? mnemonic, + required String? mnemonicPassphrase, required int? index, }) => (super.noSuchMethod( @@ -1613,48 +1598,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #index: index, }, ), - returnValue: _i22.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i22.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i21.Future<_i26.Uint8List>); @override - _i22.Future<_i17.PaymentCode> getPaymentCode( - _i26.DerivePathType? derivePathType) => + _i21.Future<_i16.PaymentCode> getPaymentCode( + _i25.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i22.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i21.Future<_i16.PaymentCode>.value(_FakePaymentCode_14( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i22.Future<_i17.PaymentCode>); + ) as _i21.Future<_i16.PaymentCode>); @override - _i22.Future<_i27.Uint8List> signWithNotificationKey(_i27.Uint8List? data) => + _i21.Future<_i26.Uint8List> signWithNotificationKey(_i26.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i22.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i22.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i26.Uint8List>.value(_i26.Uint8List(0)), + ) as _i21.Future<_i26.Uint8List>); @override - _i22.Future signStringWithNotificationKey(String? data) => + _i21.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, + _i21.Future> preparePaymentCodeSend({ + required _i16.PaymentCode? paymentCode, required int? satoshiAmount, Map? args, }) => @@ -1669,12 +1655,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i27.Uint8List? privateKey, + _i21.Future<_i15.Address> nextUnusedSendAddressFrom({ + required _i16.PaymentCode? pCode, + required _i26.Uint8List? privateKey, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1687,7 +1673,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1699,9 +1685,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future> prepareNotificationTx({ + _i21.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, @@ -1719,10 +1705,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future broadcastNotificationTx( + _i21.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1730,19 +1716,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future hasConnected(String? paymentCodeString) => + _i21.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + _i21.Future<_i16.PaymentCode?> unBlindedPaymentCodeFromTransaction({ required _i15.Transaction? transaction, required _i15.Address? myNotificationAddress, }) => @@ -1755,31 +1741,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i17.PaymentCode?>.value(), - ) as _i22.Future<_i17.PaymentCode?>); + returnValue: _i21.Future<_i16.PaymentCode?>.value(), + ) as _i21.Future<_i16.PaymentCode?>); @override - _i22.Future> + _i21.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i22.Future>.value(<_i17.PaymentCode>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i16.PaymentCode>[]), + ) as _i21.Future>); @override - _i22.Future checkForNotificationTransactionsTo( + _i21.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future restoreAllHistory({ + _i21.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1794,12 +1780,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i21.Future restoreHistoryWith( + _i16.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1812,15 +1798,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i21.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i25.DerivePathType? derivePathType, + required _i16.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1833,7 +1819,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1846,13 +1832,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i21.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i25.DerivePathType? derivePathType, + required _i16.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1865,7 +1851,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1878,50 +1864,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future<_i15.Address> getMyNotificationAddress( - _i26.DerivePathType? derivePathType) => + _i21.Future<_i15.Address> getMyNotificationAddress( + _i25.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i21.Future<_i15.Address>); @override - _i22.Future> lookupKey(String? paymentCodeString) => + _i21.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i22.Future paymentCodeStringByKey(String? key) => + _i21.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future storeCode(String? paymentCodeString) => + _i21.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); } /// A class which mocks [NodeService]. @@ -1929,41 +1915,41 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { /// See the documentation for Mockito's code generation for more information. class MockNodeService extends _i1.Mock implements _i3.NodeService { @override - _i18.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( + _i17.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_16( + returnValue: _FakeSecureStorageInterface_15( this, Invocation.getter(#secureStorageInterface), ), - ) as _i18.SecureStorageInterface); + ) as _i17.SecureStorageInterface); @override - List<_i28.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i27.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i28.NodeModel>[], - ) as List<_i28.NodeModel>); + returnValue: <_i27.NodeModel>[], + ) as List<_i27.NodeModel>); @override - List<_i28.NodeModel> get nodes => (super.noSuchMethod( + List<_i27.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i28.NodeModel>[], - ) as List<_i28.NodeModel>); + returnValue: <_i27.NodeModel>[], + ) as List<_i27.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateDefaults() => (super.noSuchMethod( + _i21.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future setPrimaryNodeFor({ - required _i21.Coin? coin, - required _i28.NodeModel? node, + _i21.Future setPrimaryNodeFor({ + required _i20.Coin? coin, + required _i27.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -1976,44 +1962,44 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i28.NodeModel? getPrimaryNodeFor({required _i21.Coin? coin}) => + _i27.NodeModel? getPrimaryNodeFor({required _i20.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i28.NodeModel?); + )) as _i27.NodeModel?); @override - List<_i28.NodeModel> getNodesFor(_i21.Coin? coin) => (super.noSuchMethod( + List<_i27.NodeModel> getNodesFor(_i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i28.NodeModel>[], - ) as List<_i28.NodeModel>); + returnValue: <_i27.NodeModel>[], + ) as List<_i27.NodeModel>); @override - _i28.NodeModel? getNodeById({required String? id}) => + _i27.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i28.NodeModel?); + )) as _i27.NodeModel?); @override - List<_i28.NodeModel> failoverNodesFor({required _i21.Coin? coin}) => + List<_i27.NodeModel> failoverNodesFor({required _i20.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i28.NodeModel>[], - ) as List<_i28.NodeModel>); + returnValue: <_i27.NodeModel>[], + ) as List<_i27.NodeModel>); @override - _i22.Future add( - _i28.NodeModel? node, + _i21.Future add( + _i27.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -2026,11 +2012,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future delete( + _i21.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -2042,11 +2028,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future setEnabledState( + _i21.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -2060,12 +2046,12 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future edit( - _i28.NodeModel? editedNode, + _i21.Future edit( + _i27.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -2078,20 +2064,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateCommunityNodes() => (super.noSuchMethod( + _i21.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2099,7 +2085,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2142,23 +2128,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i19.CoinServiceAPI get wallet => (super.noSuchMethod( + _i18.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_17( + returnValue: _FakeCoinServiceAPI_16( this, Invocation.getter(#wallet), ), - ) as _i19.CoinServiceAPI); + ) as _i18.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2191,23 +2177,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2217,16 +2203,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i15.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i15.UTXO>[]), + ) as _i21.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2246,10 +2232,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2271,14 +2262,14 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2288,7 +2279,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -2304,27 +2295,27 @@ class MockManager extends _i1.Mock implements _i6.Manager { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2334,34 +2325,35 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -2372,25 +2364,26 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future exitCurrentWallet() => (super.noSuchMethod( + _i21.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2402,11 +2395,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -2418,18 +2411,18 @@ class MockManager extends _i1.Mock implements _i6.Manager { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2437,7 +2430,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2457,7 +2450,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { /// A class which mocks [CoinServiceAPI]. /// /// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { +class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -2468,10 +2461,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2504,23 +2497,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2530,16 +2523,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i21.Future>.value(<_i15.Transaction>[]), + ) as _i21.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i21.Future>.value(<_i15.UTXO>[]), + ) as _i21.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2559,10 +2552,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); + @override + _i21.Future get mnemonicString => (super.noSuchMethod( + Invocation.getter(#mnemonicString), + returnValue: _i21.Future.value(), + ) as _i21.Future); + @override + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + Invocation.getter(#mnemonicPassphrase), + returnValue: _i21.Future.value(), + ) as _i21.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -2579,7 +2582,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: 0, ) as int); @override - _i22.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, required int? satoshiAmount, Map? args, @@ -2595,36 +2598,36 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2634,16 +2637,17 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, + String? mnemonicPassphrase, required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required int? height, @@ -2654,43 +2658,44 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { [], { #mnemonic: mnemonic, + #mnemonicPassphrase: mnemonicPassphrase, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future exit() => (super.noSuchMethod( + _i21.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2702,11 +2707,11 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i22.Future estimateFeeFor( + _i21.Future estimateFeeFor( int? satoshiAmount, int? feeRate, ) => @@ -2718,24 +2723,24 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i21.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); }