diff --git a/test/formet_test.dart b/test/formet_test.dart index e27293114..cb8333dae 100644 --- a/test/formet_test.dart +++ b/test/formet_test.dart @@ -1,67 +1,7 @@ -import 'package:decimal/decimal.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/format.dart'; void main() { - group("satoshisToAmount", () { - test("12345", () { - expect(Format.satoshisToAmount(12345, coin: Coin.bitcoin), - Decimal.parse("0.00012345")); - }); - - test("100012345", () { - expect(Format.satoshisToAmount(100012345, coin: Coin.bitcoin), - Decimal.parse("1.00012345")); - }); - - test("0", () { - expect(Format.satoshisToAmount(0, coin: Coin.bitcoin), Decimal.zero); - }); - - test("1000000000", () { - expect(Format.satoshisToAmount(1000000000, coin: Coin.bitcoin), - Decimal.parse("10")); - }); - }); - - group("satoshiAmountToPrettyString", () { - const locale = "en_US"; - test("12345", () { - expect(Format.satoshiAmountToPrettyString(12345, locale, Coin.bitcoin), - "0.00012345"); - }); - - test("100012345", () { - expect( - Format.satoshiAmountToPrettyString(100012345, locale, Coin.bitcoin), - "1.00012345"); - }); - - test("123450000", () { - expect( - Format.satoshiAmountToPrettyString(123450000, locale, Coin.bitcoin), - "1.23450000"); - }); - - test("1230045000", () { - expect( - Format.satoshiAmountToPrettyString(1230045000, locale, Coin.bitcoin), - "12.30045000"); - }); - - test("1000000000", () { - expect( - Format.satoshiAmountToPrettyString(1000000000, locale, Coin.bitcoin), - "10.00000000"); - }); - - test("0", () { - expect(Format.satoshiAmountToPrettyString(0, locale, Coin.bitcoin), - "0.00000000"); - }); - }); - group("extractDateFrom", () { test("1614578400", () { expect(Format.extractDateFrom(1614578400, localized: false), diff --git a/test/pages/send_view/send_view_test.mocks.dart b/test/pages/send_view/send_view_test.mocks.dart index db7df0b52..3882a4f43 100644 --- a/test/pages/send_view/send_view_test.mocks.dart +++ b/test/pages/send_view/send_view_test.mocks.dart @@ -3,12 +3,12 @@ // 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 _i29; -import 'dart:ui' as _i24; +import 'dart:async' as _i23; +import 'dart:typed_data' as _i30; +import 'dart:ui' as _i25; -import 'package:bip32/bip32.dart' as _i17; -import 'package:bip47/bip47.dart' as _i18; +import 'package:bip32/bip32.dart' as _i18; +import 'package:bip47/bip47.dart' as _i19; import 'package:bitcoindart/bitcoindart.dart' as _i14; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -17,28 +17,29 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i13; 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/isar/models/isar_models.dart' as _i17; +import 'package:stackwallet/models/node_model.dart' as _i26; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i9; -import 'package:stackwallet/models/signing_data.dart' as _i28; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i26; -import 'package:stackwallet/services/coins/coin_service.dart' as _i19; +import 'package:stackwallet/models/signing_data.dart' as _i29; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i27; +import 'package:stackwallet/services/coins/coin_service.dart' as _i20; import 'package:stackwallet/services/coins/manager.dart' as _i6; -import 'package:stackwallet/services/locale_service.dart' as _i30; +import 'package:stackwallet/services/locale_service.dart' as _i31; 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 _i21; 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 _i31; +import 'package:stackwallet/utilities/amount/amount.dart' as _i15; +import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i33; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i22; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i28; +import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i32; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i7; -import 'package:stackwallet/utilities/prefs.dart' as _i23; -import 'package:stackwallet/utilities/theme/color_theme.dart' as _i33; -import 'package:tuple/tuple.dart' as _i15; +import 'package:stackwallet/utilities/prefs.dart' as _i24; +import 'package:stackwallet/utilities/theme/color_theme.dart' as _i34; +import 'package:tuple/tuple.dart' as _i16; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -187,9 +188,8 @@ class _FakeElectrumXNode_12 extends _i1.SmartFake ); } -class _FakeTuple2_13 extends _i1.SmartFake - implements _i15.Tuple2 { - _FakeTuple2_13( +class _FakeAmount_13 extends _i1.SmartFake implements _i15.Amount { + _FakeAmount_13( Object parent, Invocation parentInvocation, ) : super( @@ -198,8 +198,9 @@ class _FakeTuple2_13 extends _i1.SmartFake ); } -class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address { - _FakeAddress_14( +class _FakeTuple2_14 extends _i1.SmartFake + implements _i16.Tuple2 { + _FakeTuple2_14( Object parent, Invocation parentInvocation, ) : super( @@ -208,8 +209,8 @@ class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address { ); } -class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 { - _FakeBIP32_15( +class _FakeAddress_15 extends _i1.SmartFake implements _i17.Address { + _FakeAddress_15( Object parent, Invocation parentInvocation, ) : super( @@ -218,8 +219,8 @@ class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 { ); } -class _FakePaymentCode_16 extends _i1.SmartFake implements _i18.PaymentCode { - _FakePaymentCode_16( +class _FakeBIP32_16 extends _i1.SmartFake implements _i18.BIP32 { + _FakeBIP32_16( Object parent, Invocation parentInvocation, ) : super( @@ -228,9 +229,19 @@ class _FakePaymentCode_16 extends _i1.SmartFake implements _i18.PaymentCode { ); } -class _FakeCoinServiceAPI_17 extends _i1.SmartFake - implements _i19.CoinServiceAPI { - _FakeCoinServiceAPI_17( +class _FakePaymentCode_17 extends _i1.SmartFake implements _i19.PaymentCode { + _FakePaymentCode_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCoinServiceAPI_18 extends _i1.SmartFake + implements _i20.CoinServiceAPI { + _FakeCoinServiceAPI_18( Object parent, Invocation parentInvocation, ) : super( @@ -242,7 +253,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 _i21.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -309,7 +320,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i21.Coin? coin}) => + List getWalletIdsFor({required _i22.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -319,21 +330,21 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValue: [], ) as List); @override - List<_i15.Tuple2<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> + List<_i16.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), returnValue: < - _i15.Tuple2<_i21.Coin, + _i16.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>[], ) as List< - _i15.Tuple2<_i21.Coin, + _i16.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i21.Coin? coin) => + _i22.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -397,17 +408,17 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - _i22.Future load(_i23.Prefs? prefs) => (super.noSuchMethod( + _i23.Future load(_i24.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future loadAfterStackRestore( - _i23.Prefs? prefs, + _i23.Future loadAfterStackRestore( + _i24.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -418,11 +429,11 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { managers, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -430,7 +441,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -456,19 +467,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i22.Future> get walletNames => + _i23.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i22.Future>.value( + returnValue: _i23.Future>.value( {}), - ) as _i22.Future>); + ) as _i23.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future renameWallet({ + _i23.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -483,8 +494,8 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( @@ -494,10 +505,10 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValue: {}, ) as Map); @override - _i22.Future addExistingStackWallet({ + _i23.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i21.Coin? coin, + required _i22.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -511,13 +522,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addNewWallet({ + _i23.Future addNewWallet({ required String? name, - required _i21.Coin? coin, + required _i22.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -530,46 +541,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i23.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future saveFavoriteWalletIds(List? walletIds) => + _i23.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i23.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i23.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future moveFavorite({ + _i23.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -582,48 +593,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i23.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i23.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future isMnemonicVerified({required String? walletId}) => + _i23.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future setMnemonicVerified({required String? walletId}) => + _i23.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future deleteWallet( + _i23.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -635,20 +646,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future refreshWallets(bool? shouldNotifyListeners) => + _i23.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -656,7 +667,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -698,33 +709,33 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { ), ) as _i7.SecureStorageInterface); @override - List<_i25.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i26.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i25.NodeModel>[], - ) as List<_i25.NodeModel>); + returnValue: <_i26.NodeModel>[], + ) as List<_i26.NodeModel>); @override - List<_i25.NodeModel> get nodes => (super.noSuchMethod( + List<_i26.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i25.NodeModel>[], - ) as List<_i25.NodeModel>); + returnValue: <_i26.NodeModel>[], + ) as List<_i26.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateDefaults() => (super.noSuchMethod( + _i23.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future setPrimaryNodeFor({ - required _i21.Coin? coin, - required _i25.NodeModel? node, + _i23.Future setPrimaryNodeFor({ + required _i22.Coin? coin, + required _i26.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -737,44 +748,44 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i25.NodeModel? getPrimaryNodeFor({required _i21.Coin? coin}) => + _i26.NodeModel? getPrimaryNodeFor({required _i22.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i25.NodeModel?); + )) as _i26.NodeModel?); @override - List<_i25.NodeModel> getNodesFor(_i21.Coin? coin) => (super.noSuchMethod( + List<_i26.NodeModel> getNodesFor(_i22.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i25.NodeModel>[], - ) as List<_i25.NodeModel>); + returnValue: <_i26.NodeModel>[], + ) as List<_i26.NodeModel>); @override - _i25.NodeModel? getNodeById({required String? id}) => + _i26.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i25.NodeModel?); + )) as _i26.NodeModel?); @override - List<_i25.NodeModel> failoverNodesFor({required _i21.Coin? coin}) => + List<_i26.NodeModel> failoverNodesFor({required _i22.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i25.NodeModel>[], - ) as List<_i25.NodeModel>); + returnValue: <_i26.NodeModel>[], + ) as List<_i26.NodeModel>); @override - _i22.Future add( - _i25.NodeModel? node, + _i23.Future add( + _i26.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -787,11 +798,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future delete( + _i23.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -803,11 +814,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future setEnabledState( + _i23.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -821,12 +832,12 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future edit( - _i25.NodeModel? editedNode, + _i23.Future edit( + _i26.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -839,20 +850,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateCommunityNodes() => (super.noSuchMethod( + _i23.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -860,7 +871,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -888,13 +899,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 _i27.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i22.Timer? _timer) => super.noSuchMethod( + set timer(_i23.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -971,74 +982,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i16.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i17.UTXO>[]), + ) as _i23.Future>); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i16.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i17.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future get currentChangeAddress => (super.noSuchMethod( + _i23.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i23.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i22.Future<_i9.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i9.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i9.FeeObject>.value(_FakeFeeObject_6( + returnValue: _i23.Future<_i9.FeeObject>.value(_FakeFeeObject_6( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i9.FeeObject>); + ) as _i23.Future<_i9.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicString => (super.noSuchMethod( + _i23.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get chainHeight => (super.noSuchMethod( + _i23.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -1110,6 +1121,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ), ) as _i12.Balance); @override + _i23.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i23.Future.value(''), + ) as _i23.Future); + @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( Invocation.setter( @@ -1135,26 +1151,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ), ) as _i14.NetworkType); @override - _i22.Future exit() => (super.noSuchMethod( + _i23.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i27.DerivePathType addressType({required String? address}) => + _i28.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i27.DerivePathType.bip44, - ) as _i27.DerivePathType); + returnValue: _i28.DerivePathType.bip44, + ) as _i28.DerivePathType); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -1173,49 +1189,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future getTransactionCacheEarly(List? allAddresses) => + _i23.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i23.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future getAllTxsToWatch() => (super.noSuchMethod( + _i23.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i15.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1224,31 +1240,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1266,33 +1282,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i23.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1302,36 +1318,36 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i10.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i23.Future<_i10.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), returnValue: - _i22.Future<_i10.ElectrumXNode>.value(_FakeElectrumXNode_12( + _i23.Future<_i10.ElectrumXNode>.value(_FakeElectrumXNode_12( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i22.Future<_i10.ElectrumXNode>); + ) as _i23.Future<_i10.ElectrumXNode>); @override - _i22.Future addDerivation({ + _i23.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i27.DerivePathType? derivePathType, + required _i28.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1345,13 +1361,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addDerivations({ + _i23.Future addDerivations({ required int? chain, - required _i27.DerivePathType? derivePathType, + required _i28.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1364,50 +1380,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future>> fastFetch( + _i23.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i22.Future>>.value( + returnValue: _i23.Future>>.value( >[]), - ) as _i22.Future>>); + ) as _i23.Future>>); @override - _i22.Future getTxCount({required String? address}) => + _i23.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future checkCurrentReceivingAddressesForTransactions() => + _i23.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkCurrentChangeAddressesForTransactions() => + _i23.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override int estimateTxFee({ required int? vSize, @@ -1432,7 +1448,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { required bool? coinControl, required bool? isSendAll, int? additionalOutputs = 0, - List<_i16.UTXO>? utxos, + List<_i17.UTXO>? utxos, }) => super.noSuchMethod(Invocation.method( #coinSelection, @@ -1448,19 +1464,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, )); @override - _i22.Future> fetchBuildTxData( - List<_i16.UTXO>? utxosToUse) => + _i23.Future> fetchBuildTxData( + List<_i17.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( #fetchBuildTxData, [utxosToUse], ), returnValue: - _i22.Future>.value(<_i28.SigningData>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i29.SigningData>[]), + ) as _i23.Future>); @override - _i22.Future> buildTransaction({ - required List<_i28.SigningData>? utxoSigningData, + _i23.Future> buildTransaction({ + required List<_i29.SigningData>? utxoSigningData, required List? recipients, required List? satoshiAmounts, }) => @@ -1475,10 +1491,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1490,26 +1506,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i15.Amount> estimateFeeFor( + _i15.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i15.Amount>.value(_FakeAmount_13( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i15.Amount>); @override - int roughFeeEstimate( + _i15.Amount roughFeeEstimate( int? inputCount, int? outputCount, int? feeRatePerKB, @@ -1523,28 +1548,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { feeRatePerKB, ], ), - returnValue: 0, - ) as int); + returnValue: _FakeAmount_13( + this, + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + ), + ) as _i15.Amount); @override - _i22.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i23.Future<_i15.Amount> sweepAllEstimate(int? feeRate) => + (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i15.Amount>.value(_FakeAmount_13( + this, + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + )), + ) as _i23.Future<_i15.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override void initCache( String? walletId, - _i21.Coin? coin, + _i22.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1557,14 +1599,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future updateCachedId(String? id) => (super.noSuchMethod( + _i23.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1574,14 +1616,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i23.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1591,15 +1633,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateCachedIsFavorite(bool? isFavorite) => + _i23.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override _i12.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1615,15 +1657,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ), ) as _i12.Balance); @override - _i22.Future updateCachedBalance(_i12.Balance? balance) => + _i23.Future updateCachedBalance(_i12.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override _i12.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1639,15 +1681,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ), ) as _i12.Balance); @override - _i22.Future updateCachedBalanceSecondary(_i12.Balance? balance) => + _i23.Future updateCachedBalanceSecondary(_i12.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override List getWalletTokenContractAddresses() => (super.noSuchMethod( Invocation.method( @@ -1657,16 +1699,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValue: [], ) as List); @override - _i22.Future updateWalletTokenContractAddresses( + _i23.Future updateWalletTokenContractAddresses( List? contractAddresses) => (super.noSuchMethod( Invocation.method( #updateWalletTokenContractAddresses, [contractAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override void initWalletDB({_i13.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1677,11 +1719,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction( + _i23.Future<_i16.Tuple2<_i17.Transaction, _i17.Address>> parseTransaction( Map? txData, dynamic electrumxClient, - List<_i16.Address>? myAddresses, - _i21.Coin? coin, + List<_i17.Address>? myAddresses, + _i22.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1698,8 +1740,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ], ), returnValue: - _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value( - _FakeTuple2_13<_i16.Transaction, _i16.Address>( + _i23.Future<_i16.Tuple2<_i17.Transaction, _i17.Address>>.value( + _FakeTuple2_14<_i17.Transaction, _i17.Address>( this, Invocation.method( #parseTransaction, @@ -1713,42 +1755,42 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { ], ), )), - ) as _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>); + ) as _i23.Future<_i16.Tuple2<_i17.Transaction, _i17.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i14.NetworkType? network, - required _i21.Coin? coin, + required _i22.Coin? coin, required _i13.MainDB? db, required _i10.ElectrumX? electrumXClient, required _i7.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i22.Future Function()? getMnemonicString, - required _i22.Future Function()? getMnemonicPassphrase, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function()? getCurrentChangeAddress, + required _i23.Future Function()? getMnemonicString, + required _i23.Future Function()? getMnemonicPassphrase, + required _i23.Future Function()? getChainHeight, + required _i23.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i22.Future> Function({ + required _i23.Future> Function({ required String address, - required int satoshiAmount, + required _i15.Amount amount, Map? args, })? prepareSend, - required _i22.Future Function({required String address})? getTxCount, - required _i22.Future> Function(List<_i16.UTXO>)? + required _i23.Future Function({required String address})? getTxCount, + required _i23.Future> Function(List<_i17.UTXO>)? fetchBuildTxData, - required _i22.Future Function()? refresh, - required _i22.Future Function()? checkChangeAddressForTransactions, - required _i22.Future Function({ + required _i23.Future Function()? refresh, + required _i23.Future Function()? checkChangeAddressForTransactions, + required _i23.Future Function({ required String address, required int chain, - required _i27.DerivePathType derivePathType, + required _i28.DerivePathType derivePathType, required String pubKey, required String wif, })? @@ -1785,44 +1827,44 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i16.Address> currentReceivingPaynymAddress( - _i18.PaymentCode? sender) => + _i23.Future<_i17.Address> currentReceivingPaynymAddress( + _i19.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i22.Future<_i16.Address>); + ) as _i23.Future<_i17.Address>); @override - _i22.Future checkCurrentPaynymReceivingAddressForTransactions( - _i18.PaymentCode? sender) => + _i23.Future checkCurrentPaynymReceivingAddressForTransactions( + _i19.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i23.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i17.BIP32> deriveNotificationBip32Node({ + _i23.Future<_i18.BIP32> deriveNotificationBip32Node({ required String? mnemonic, required String? mnemonicPassphrase, }) => @@ -1835,7 +1877,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #mnemonicPassphrase: mnemonicPassphrase, }, ), - returnValue: _i22.Future<_i17.BIP32>.value(_FakeBIP32_15( + returnValue: _i23.Future<_i18.BIP32>.value(_FakeBIP32_16( this, Invocation.method( #deriveNotificationBip32Node, @@ -1846,9 +1888,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), )), - ) as _i22.Future<_i17.BIP32>); + ) as _i23.Future<_i18.BIP32>); @override - _i22.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({ + _i23.Future<_i18.BIP32> deriveReceivingPrivateKeyNode({ required String? mnemonic, required String? mnemonicPassphrase, required int? index, @@ -1863,7 +1905,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #index: index, }, ), - returnValue: _i22.Future<_i17.BIP32>.value(_FakeBIP32_15( + returnValue: _i23.Future<_i18.BIP32>.value(_FakeBIP32_16( this, Invocation.method( #deriveReceivingPrivateKeyNode, @@ -1875,45 +1917,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), )), - ) as _i22.Future<_i17.BIP32>); + ) as _i23.Future<_i18.BIP32>); @override - _i22.Future<_i18.PaymentCode> getPaymentCode( - _i27.DerivePathType? derivePathType) => + _i23.Future<_i19.PaymentCode> getPaymentCode( + _i28.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i22.Future<_i18.PaymentCode>.value(_FakePaymentCode_16( + returnValue: _i23.Future<_i19.PaymentCode>.value(_FakePaymentCode_17( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i22.Future<_i18.PaymentCode>); + ) as _i23.Future<_i19.PaymentCode>); @override - _i22.Future<_i29.Uint8List> signWithNotificationKey(_i29.Uint8List? data) => + _i23.Future<_i30.Uint8List> signWithNotificationKey(_i30.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i22.Future<_i29.Uint8List>.value(_i29.Uint8List(0)), - ) as _i22.Future<_i29.Uint8List>); + returnValue: _i23.Future<_i30.Uint8List>.value(_i30.Uint8List(0)), + ) as _i23.Future<_i30.Uint8List>); @override - _i22.Future signStringWithNotificationKey(String? data) => + _i23.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future> preparePaymentCodeSend({ - required _i18.PaymentCode? paymentCode, - required int? amount, + _i23.Future> preparePaymentCodeSend({ + required _i19.PaymentCode? paymentCode, + required _i15.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1922,17 +1964,17 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { [], { #paymentCode: paymentCode, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future<_i16.Address> nextUnusedSendAddressFrom({ - required _i18.PaymentCode? pCode, - required _i17.BIP32? privateKeyNode, + _i23.Future<_i17.Address> nextUnusedSendAddressFrom({ + required _i19.PaymentCode? pCode, + required _i18.BIP32? privateKeyNode, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1945,7 +1987,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1957,13 +1999,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.Address>); + ) as _i23.Future<_i17.Address>); @override - _i22.Future> prepareNotificationTx({ + _i23.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, - List<_i16.UTXO>? utxos, + List<_i17.UTXO>? utxos, }) => (super.noSuchMethod( Invocation.method( @@ -1977,10 +2019,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future broadcastNotificationTx( + _i23.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1988,21 +2030,21 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future hasConnected(String? paymentCodeString) => + _i23.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({ - required _i16.Transaction? transaction, - required _i16.Address? myNotificationAddress, + _i23.Future<_i19.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + required _i17.Transaction? transaction, + required _i17.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -2013,12 +2055,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i18.PaymentCode?>.value(), - ) as _i22.Future<_i18.PaymentCode?>); + returnValue: _i23.Future<_i19.PaymentCode?>.value(), + ) as _i23.Future<_i19.PaymentCode?>); @override - _i22.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ - required _i16.Transaction? transaction, - required _i16.Address? myNotificationAddress, + _i23.Future<_i19.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ + required _i17.Transaction? transaction, + required _i17.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -2029,31 +2071,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i18.PaymentCode?>.value(), - ) as _i22.Future<_i18.PaymentCode?>); + returnValue: _i23.Future<_i19.PaymentCode?>.value(), + ) as _i23.Future<_i19.PaymentCode?>); @override - _i22.Future> + _i23.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i22.Future>.value(<_i18.PaymentCode>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i19.PaymentCode>[]), + ) as _i23.Future>); @override - _i22.Future checkForNotificationTransactionsTo( + _i23.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future restoreAllHistory({ + _i23.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -2068,12 +2110,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future restoreHistoryWith( - _i18.PaymentCode? other, + _i23.Future restoreHistoryWith( + _i19.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2086,15 +2128,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({ + _i23.Future<_i17.Address> generatePaynymSendAddressFromKeyPair({ required _i14.ECPair? pair, required int? derivationIndex, - required _i27.DerivePathType? derivePathType, - required _i18.PaymentCode? toPaymentCode, + required _i28.DerivePathType? derivePathType, + required _i19.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -2107,7 +2149,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -2120,13 +2162,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.Address>); + ) as _i23.Future<_i17.Address>); @override - _i22.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({ + _i23.Future<_i17.Address> generatePaynymReceivingAddressFromKeyPair({ required _i14.ECPair? pair, required int? derivationIndex, - required _i27.DerivePathType? derivePathType, - required _i18.PaymentCode? fromPaymentCode, + required _i28.DerivePathType? derivePathType, + required _i19.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -2139,7 +2181,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -2152,58 +2194,58 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.Address>); + ) as _i23.Future<_i17.Address>); @override - _i22.Future<_i16.Address> getMyNotificationAddress( - _i27.DerivePathType? derivePathType) => + _i23.Future<_i17.Address> getMyNotificationAddress( + _i28.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( + returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i22.Future<_i16.Address>); + ) as _i23.Future<_i17.Address>); @override - _i22.Future> lookupKey(String? paymentCodeString) => + _i23.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future paymentCodeStringByKey(String? key) => + _i23.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future storeCode(String? paymentCodeString) => + _i23.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override void initCoinControlInterface({ required String? walletId, required String? walletName, - required _i21.Coin? coin, + required _i22.Coin? coin, required _i13.MainDB? db, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function(_i12.Balance)? refreshedBalanceCallback, + required _i23.Future Function()? getChainHeight, + required _i23.Future Function(_i12.Balance)? refreshedBalanceCallback, }) => super.noSuchMethod( Invocation.method( @@ -2221,22 +2263,22 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future refreshBalance({bool? notify = false}) => + _i23.Future refreshBalance({bool? notify = false}) => (super.noSuchMethod( Invocation.method( #refreshBalance, [], {#notify: notify}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); } /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i30.LocaleService { +class MockLocaleService extends _i1.Mock implements _i31.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -2252,17 +2294,17 @@ class MockLocaleService extends _i1.Mock implements _i30.LocaleService { returnValue: false, ) as bool); @override - _i22.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i23.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2270,7 +2312,7 @@ class MockLocaleService extends _i1.Mock implements _i30.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2298,7 +2340,7 @@ class MockLocaleService extends _i1.Mock implements _i30.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 _i24.Prefs { MockPrefs() { _i1.throwOnMissingStub(this); } @@ -2354,12 +2396,12 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - _i31.SyncingType get syncType => (super.noSuchMethod( + _i32.SyncingType get syncType => (super.noSuchMethod( Invocation.getter(#syncType), - returnValue: _i31.SyncingType.currentWalletOnly, - ) as _i31.SyncingType); + returnValue: _i32.SyncingType.currentWalletOnly, + ) as _i32.SyncingType); @override - set syncType(_i31.SyncingType? syncType) => super.noSuchMethod( + set syncType(_i32.SyncingType? syncType) => super.noSuchMethod( Invocation.setter( #syncType, syncType, @@ -2492,12 +2534,12 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - _i32.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + _i33.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( Invocation.getter(#backupFrequencyType), - returnValue: _i32.BackupFrequencyType.everyTenMinutes, - ) as _i32.BackupFrequencyType); + returnValue: _i33.BackupFrequencyType.everyTenMinutes, + ) as _i33.BackupFrequencyType); @override - set backupFrequencyType(_i32.BackupFrequencyType? backupFrequencyType) => + set backupFrequencyType(_i33.BackupFrequencyType? backupFrequencyType) => super.noSuchMethod( Invocation.setter( #backupFrequencyType, @@ -2589,12 +2631,12 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - _i33.ThemeType get theme => (super.noSuchMethod( + _i34.ThemeType get theme => (super.noSuchMethod( Invocation.getter(#theme), - returnValue: _i33.ThemeType.light, - ) as _i33.ThemeType); + returnValue: _i34.ThemeType.light, + ) as _i34.ThemeType); @override - set theme(_i33.ThemeType? theme) => super.noSuchMethod( + set theme(_i34.ThemeType? theme) => super.noSuchMethod( Invocation.setter( #theme, theme, @@ -2602,12 +2644,12 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - _i33.ThemeType get systemBrightnessLightTheme => (super.noSuchMethod( + _i34.ThemeType get systemBrightnessLightTheme => (super.noSuchMethod( Invocation.getter(#systemBrightnessLightTheme), - returnValue: _i33.ThemeType.light, - ) as _i33.ThemeType); + returnValue: _i34.ThemeType.light, + ) as _i34.ThemeType); @override - set systemBrightnessLightTheme(_i33.ThemeType? systemBrightnessLightTheme) => + set systemBrightnessLightTheme(_i34.ThemeType? systemBrightnessLightTheme) => super.noSuchMethod( Invocation.setter( #systemBrightnessLightTheme, @@ -2616,12 +2658,12 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - _i33.ThemeType get systemBrightnessDarkTheme => (super.noSuchMethod( + _i34.ThemeType get systemBrightnessDarkTheme => (super.noSuchMethod( Invocation.getter(#systemBrightnessDarkTheme), - returnValue: _i33.ThemeType.light, - ) as _i33.ThemeType); + returnValue: _i34.ThemeType.light, + ) as _i34.ThemeType); @override - set systemBrightnessDarkTheme(_i33.ThemeType? systemBrightnessDarkTheme) => + set systemBrightnessDarkTheme(_i34.ThemeType? systemBrightnessDarkTheme) => super.noSuchMethod( Invocation.setter( #systemBrightnessDarkTheme, @@ -2635,51 +2677,51 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValue: false, ) as bool); @override - _i22.Future init() => (super.noSuchMethod( + _i23.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( + _i23.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( Invocation.method( #incrementCurrentNotificationIndex, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future isExternalCallsSet() => (super.noSuchMethod( + _i23.Future isExternalCallsSet() => (super.noSuchMethod( Invocation.method( #isExternalCallsSet, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future saveUserID(String? userId) => (super.noSuchMethod( + _i23.Future saveUserID(String? userId) => (super.noSuchMethod( Invocation.method( #saveUserID, [userId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( + _i23.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( Invocation.method( #saveSignupEpoch, [signupEpoch], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2687,7 +2729,7 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2730,23 +2772,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i19.CoinServiceAPI get wallet => (super.noSuchMethod( + _i20.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_17( + returnValue: _FakeCoinServiceAPI_18( this, Invocation.getter(#wallet), ), - ) as _i19.CoinServiceAPI); + ) as _i20.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2779,23 +2821,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future<_i9.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i9.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i9.FeeObject>.value(_FakeFeeObject_6( + returnValue: _i23.Future<_i9.FeeObject>.value(_FakeFeeObject_6( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i9.FeeObject>); + ) as _i23.Future<_i9.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override _i12.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2805,16 +2847,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i12.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i16.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i17.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i16.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i17.UTXO>[]), + ) as _i23.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2834,15 +2876,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2879,19 +2921,29 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i23.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i23.Future.value(''), + ) as _i23.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2901,9 +2953,9 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i15.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -2912,32 +2964,32 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2947,33 +2999,33 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -2992,20 +3044,20 @@ class MockManager extends _i1.Mock implements _i6.Manager { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future exitCurrentWallet() => (super.noSuchMethod( + _i23.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -3017,43 +3069,52 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i15.Amount> estimateFeeFor( + _i15.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i15.Amount>.value(_FakeAmount_13( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i15.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future resetRescanOnOpen() => (super.noSuchMethod( + _i23.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -3061,7 +3122,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -3081,7 +3142,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 _i20.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -3092,10 +3153,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -3128,23 +3189,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i22.Future<_i9.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i9.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i9.FeeObject>.value(_FakeFeeObject_6( + returnValue: _i23.Future<_i9.FeeObject>.value(_FakeFeeObject_6( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i9.FeeObject>); + ) as _i23.Future<_i9.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override _i12.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -3154,16 +3215,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { ), ) as _i12.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i16.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i17.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i16.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i17.UTXO>[]), + ) as _i23.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -3183,20 +3244,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicString => (super.noSuchMethod( + _i23.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -3213,9 +3274,9 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: 0, ) as int); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i15.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -3224,41 +3285,41 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -3268,15 +3329,15 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -3295,38 +3356,38 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future exit() => (super.noSuchMethod( + _i23.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -3338,40 +3399,49 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i15.Amount> estimateFeeFor( + _i15.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i15.Amount>.value(_FakeAmount_13( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i15.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i23.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.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 72ac2d172..4c690a92d 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 @@ -3,20 +3,21 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i8; -import 'dart:ui' as _i10; +import 'dart:async' as _i9; +import 'dart:ui' as _i11; import 'package:barcode_scan2/barcode_scan2.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i6; import 'package:stackwallet/models/contact.dart' as _i3; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i14; import 'package:stackwallet/models/models.dart' as _i5; -import 'package:stackwallet/services/address_book_service.dart' as _i9; +import 'package:stackwallet/services/address_book_service.dart' as _i10; import 'package:stackwallet/services/coins/coin_service.dart' as _i4; -import 'package:stackwallet/services/coins/manager.dart' as _i11; -import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i7; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i12; +import 'package:stackwallet/services/coins/manager.dart' as _i12; +import 'package:stackwallet/utilities/amount/amount.dart' as _i7; +import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i8; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i13; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -80,17 +81,27 @@ class _FakeBalance_4 extends _i1.SmartFake implements _i6.Balance { ); } +class _FakeAmount_5 extends _i1.SmartFake implements _i7.Amount { + _FakeAmount_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [BarcodeScannerWrapper]. /// /// See the documentation for Mockito's code generation for more information. class MockBarcodeScannerWrapper extends _i1.Mock - implements _i7.BarcodeScannerWrapper { + implements _i8.BarcodeScannerWrapper { MockBarcodeScannerWrapper() { _i1.throwOnMissingStub(this); } @override - _i8.Future<_i2.ScanResult> scan( + _i9.Future<_i2.ScanResult> scan( {_i2.ScanOptions? options = const _i2.ScanOptions()}) => (super.noSuchMethod( Invocation.method( @@ -98,7 +109,7 @@ class MockBarcodeScannerWrapper extends _i1.Mock [], {#options: options}, ), - returnValue: _i8.Future<_i2.ScanResult>.value(_FakeScanResult_0( + returnValue: _i9.Future<_i2.ScanResult>.value(_FakeScanResult_0( this, Invocation.method( #scan, @@ -106,24 +117,24 @@ class MockBarcodeScannerWrapper extends _i1.Mock {#options: options}, ), )), - ) as _i8.Future<_i2.ScanResult>); + ) as _i9.Future<_i2.ScanResult>); } /// A class which mocks [AddressBookService]. /// /// See the documentation for Mockito's code generation for more information. class MockAddressBookService extends _i1.Mock - implements _i9.AddressBookService { + implements _i10.AddressBookService { @override List<_i3.Contact> get contacts => (super.noSuchMethod( Invocation.getter(#contacts), returnValue: <_i3.Contact>[], ) as List<_i3.Contact>); @override - _i8.Future> get addressBookEntries => (super.noSuchMethod( + _i9.Future> get addressBookEntries => (super.noSuchMethod( Invocation.getter(#addressBookEntries), - returnValue: _i8.Future>.value(<_i3.Contact>[]), - ) as _i8.Future>); + returnValue: _i9.Future>.value(<_i3.Contact>[]), + ) as _i9.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), @@ -144,13 +155,13 @@ class MockAddressBookService extends _i1.Mock ), ) as _i3.Contact); @override - _i8.Future> search(String? text) => (super.noSuchMethod( + _i9.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i8.Future>.value(<_i3.Contact>[]), - ) as _i8.Future>); + returnValue: _i9.Future>.value(<_i3.Contact>[]), + ) as _i9.Future>); @override bool matches( String? term, @@ -167,33 +178,33 @@ class MockAddressBookService extends _i1.Mock returnValue: false, ) as bool); @override - _i8.Future addContact(_i3.Contact? contact) => (super.noSuchMethod( + _i9.Future addContact(_i3.Contact? contact) => (super.noSuchMethod( Invocation.method( #addContact, [contact], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future editContact(_i3.Contact? editedContact) => + _i9.Future editContact(_i3.Contact? editedContact) => (super.noSuchMethod( Invocation.method( #editContact, [editedContact], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future removeContact(String? id) => (super.noSuchMethod( + _i9.Future removeContact(String? id) => (super.noSuchMethod( Invocation.method( #removeContact, [id], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -201,7 +212,7 @@ class MockAddressBookService extends _i1.Mock returnValueForMissingStub: null, ); @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -229,7 +240,7 @@ class MockAddressBookService extends _i1.Mock /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i11.Manager { +class MockManager extends _i1.Mock implements _i12.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -257,10 +268,10 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: false, ) as bool); @override - _i12.Coin get coin => (super.noSuchMethod( + _i13.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i12.Coin.bitcoin, - ) as _i12.Coin); + returnValue: _i13.Coin.bitcoin, + ) as _i13.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -293,23 +304,23 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValueForMissingStub: null, ); @override - _i8.Future<_i5.FeeObject> get fees => (super.noSuchMethod( + _i9.Future<_i5.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i8.Future<_i5.FeeObject>.value(_FakeFeeObject_3( + returnValue: _i9.Future<_i5.FeeObject>.value(_FakeFeeObject_3( this, Invocation.getter(#fees), )), - ) as _i8.Future<_i5.FeeObject>); + ) as _i9.Future<_i5.FeeObject>); @override - _i8.Future get maxFee => (super.noSuchMethod( + _i9.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i8.Future get currentReceivingAddress => (super.noSuchMethod( + _i9.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override _i6.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -319,16 +330,16 @@ class MockManager extends _i1.Mock implements _i11.Manager { ), ) as _i6.Balance); @override - _i8.Future> get transactions => (super.noSuchMethod( + _i9.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i8.Future>.value(<_i13.Transaction>[]), - ) as _i8.Future>); + _i9.Future>.value(<_i14.Transaction>[]), + ) as _i9.Future>); @override - _i8.Future> get utxos => (super.noSuchMethod( + _i9.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i8.Future>.value(<_i13.UTXO>[]), - ) as _i8.Future>); + returnValue: _i9.Future>.value(<_i14.UTXO>[]), + ) as _i9.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -348,15 +359,15 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: '', ) as String); @override - _i8.Future> get mnemonic => (super.noSuchMethod( + _i9.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + _i9.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -393,19 +404,29 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i9.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i9.Future.value(''), + ) as _i9.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i9.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -415,9 +436,9 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValueForMissingStub: null, ); @override - _i8.Future> prepareSend({ + _i9.Future> prepareSend({ required String? address, - required int? amount, + required _i7.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -426,32 +447,32 @@ class MockManager extends _i1.Mock implements _i11.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i8.Future confirmSend({required Map? txData}) => + _i9.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override - _i8.Future refresh() => (super.noSuchMethod( + _i9.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -461,33 +482,33 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: false, ) as bool); @override - _i8.Future testNetworkConnection() => (super.noSuchMethod( + _i9.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future initializeNew() => (super.noSuchMethod( + _i9.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future initializeExisting() => (super.noSuchMethod( + _i9.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future recoverFromMnemonic({ + _i9.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -506,20 +527,20 @@ class MockManager extends _i1.Mock implements _i11.Manager { #height: height, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future exitCurrentWallet() => (super.noSuchMethod( + _i9.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future fullRescan( + _i9.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -531,43 +552,52 @@ class MockManager extends _i1.Mock implements _i11.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future estimateFeeFor( - int? satoshiAmount, + _i9.Future<_i7.Amount> estimateFeeFor( + _i7.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future<_i7.Amount>.value(_FakeAmount_5( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i9.Future<_i7.Amount>); @override - _i8.Future generateNewAddress() => (super.noSuchMethod( + _i9.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future resetRescanOnOpen() => (super.noSuchMethod( + _i9.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -575,7 +605,7 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 bcf9e5386..266112adf 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 @@ -3,20 +3,21 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i8; +import 'dart:async' as _i8; +import 'dart:ui' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i5; import 'package:stackwallet/models/contact.dart' as _i2; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i12; import 'package:stackwallet/models/models.dart' as _i4; -import 'package:stackwallet/services/address_book_service.dart' as _i6; +import 'package:stackwallet/services/address_book_service.dart' as _i7; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i9; -import 'package:stackwallet/services/locale_service.dart' as _i13; -import 'package:stackwallet/services/notes_service.dart' as _i12; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; +import 'package:stackwallet/services/coins/manager.dart' as _i10; +import 'package:stackwallet/services/locale_service.dart' as _i14; +import 'package:stackwallet/services/notes_service.dart' as _i13; +import 'package:stackwallet/utilities/amount/amount.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i11; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -70,21 +71,31 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance { ); } +class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount { + _FakeAmount_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [AddressBookService]. /// /// See the documentation for Mockito's code generation for more information. class MockAddressBookService extends _i1.Mock - implements _i6.AddressBookService { + implements _i7.AddressBookService { @override List<_i2.Contact> get contacts => (super.noSuchMethod( Invocation.getter(#contacts), returnValue: <_i2.Contact>[], ) as List<_i2.Contact>); @override - _i7.Future> get addressBookEntries => (super.noSuchMethod( + _i8.Future> get addressBookEntries => (super.noSuchMethod( Invocation.getter(#addressBookEntries), - returnValue: _i7.Future>.value(<_i2.Contact>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i2.Contact>[]), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), @@ -105,13 +116,13 @@ class MockAddressBookService extends _i1.Mock ), ) as _i2.Contact); @override - _i7.Future> search(String? text) => (super.noSuchMethod( + _i8.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i7.Future>.value(<_i2.Contact>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i2.Contact>[]), + ) as _i8.Future>); @override bool matches( String? term, @@ -128,33 +139,33 @@ class MockAddressBookService extends _i1.Mock returnValue: false, ) as bool); @override - _i7.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( + _i8.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( Invocation.method( #addContact, [contact], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future editContact(_i2.Contact? editedContact) => + _i8.Future editContact(_i2.Contact? editedContact) => (super.noSuchMethod( Invocation.method( #editContact, [editedContact], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future removeContact(String? id) => (super.noSuchMethod( + _i8.Future removeContact(String? id) => (super.noSuchMethod( Invocation.method( #removeContact, [id], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -162,7 +173,7 @@ class MockAddressBookService extends _i1.Mock returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -190,7 +201,7 @@ class MockAddressBookService extends _i1.Mock /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i9.Manager { +class MockManager extends _i1.Mock implements _i10.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -218,10 +229,10 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i10.Coin get coin => (super.noSuchMethod( + _i11.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i10.Coin.bitcoin, - ) as _i10.Coin); + returnValue: _i11.Coin.bitcoin, + ) as _i11.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -254,23 +265,23 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i4.FeeObject>); + ) as _i8.Future<_i4.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i5.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -280,16 +291,16 @@ class MockManager extends _i1.Mock implements _i9.Manager { ), ) as _i5.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i11.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i12.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i11.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i12.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -309,15 +320,15 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -354,19 +365,29 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -376,9 +397,9 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i6.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -387,32 +408,32 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -422,33 +443,33 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -467,20 +488,20 @@ class MockManager extends _i1.Mock implements _i9.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -492,43 +513,52 @@ class MockManager extends _i1.Mock implements _i9.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i6.Amount> estimateFeeFor( + _i6.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i6.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -536,7 +566,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -556,7 +586,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i12.NotesService { +class MockNotesService extends _i1.Mock implements _i13.NotesService { @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), @@ -568,34 +598,34 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService { returnValue: {}, ) as Map); @override - _i7.Future> get notes => (super.noSuchMethod( + _i8.Future> get notes => (super.noSuchMethod( Invocation.getter(#notes), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future> search(String? text) => (super.noSuchMethod( + _i8.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + _i8.Future getNoteFor({required String? txid}) => (super.noSuchMethod( Invocation.method( #getNoteFor, [], {#txid: txid}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future editOrAddNote({ + _i8.Future editOrAddNote({ required String? txid, required String? note, }) => @@ -608,21 +638,21 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService { #note: note, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + _i8.Future deleteNote({required String? txid}) => (super.noSuchMethod( Invocation.method( #deleteNote, [], {#txid: txid}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -630,7 +660,7 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -658,7 +688,7 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService { /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i13.LocaleService { +class MockLocaleService extends _i1.Mock implements _i14.LocaleService { @override String get locale => (super.noSuchMethod( Invocation.getter(#locale), @@ -670,17 +700,17 @@ class MockLocaleService extends _i1.Mock implements _i13.LocaleService { returnValue: false, ) as bool); @override - _i7.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i8.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -688,7 +718,7 @@ class MockLocaleService extends _i1.Mock implements _i13.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 3cc4c9852..dc9692644 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 @@ -3,18 +3,19 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i8; +import 'dart:async' as _i8; +import 'dart:ui' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i5; import 'package:stackwallet/models/contact.dart' as _i2; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i12; import 'package:stackwallet/models/models.dart' as _i4; -import 'package:stackwallet/services/address_book_service.dart' as _i6; +import 'package:stackwallet/services/address_book_service.dart' as _i7; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i9; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; +import 'package:stackwallet/services/coins/manager.dart' as _i10; +import 'package:stackwallet/utilities/amount/amount.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i11; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -68,21 +69,31 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance { ); } +class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount { + _FakeAmount_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [AddressBookService]. /// /// See the documentation for Mockito's code generation for more information. class MockAddressBookService extends _i1.Mock - implements _i6.AddressBookService { + implements _i7.AddressBookService { @override List<_i2.Contact> get contacts => (super.noSuchMethod( Invocation.getter(#contacts), returnValue: <_i2.Contact>[], ) as List<_i2.Contact>); @override - _i7.Future> get addressBookEntries => (super.noSuchMethod( + _i8.Future> get addressBookEntries => (super.noSuchMethod( Invocation.getter(#addressBookEntries), - returnValue: _i7.Future>.value(<_i2.Contact>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i2.Contact>[]), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), @@ -103,13 +114,13 @@ class MockAddressBookService extends _i1.Mock ), ) as _i2.Contact); @override - _i7.Future> search(String? text) => (super.noSuchMethod( + _i8.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i7.Future>.value(<_i2.Contact>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i2.Contact>[]), + ) as _i8.Future>); @override bool matches( String? term, @@ -126,33 +137,33 @@ class MockAddressBookService extends _i1.Mock returnValue: false, ) as bool); @override - _i7.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( + _i8.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( Invocation.method( #addContact, [contact], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future editContact(_i2.Contact? editedContact) => + _i8.Future editContact(_i2.Contact? editedContact) => (super.noSuchMethod( Invocation.method( #editContact, [editedContact], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future removeContact(String? id) => (super.noSuchMethod( + _i8.Future removeContact(String? id) => (super.noSuchMethod( Invocation.method( #removeContact, [id], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -160,7 +171,7 @@ class MockAddressBookService extends _i1.Mock returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -188,7 +199,7 @@ class MockAddressBookService extends _i1.Mock /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i9.Manager { +class MockManager extends _i1.Mock implements _i10.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -216,10 +227,10 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i10.Coin get coin => (super.noSuchMethod( + _i11.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i10.Coin.bitcoin, - ) as _i10.Coin); + returnValue: _i11.Coin.bitcoin, + ) as _i11.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -252,23 +263,23 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i4.FeeObject>); + ) as _i8.Future<_i4.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i5.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -278,16 +289,16 @@ class MockManager extends _i1.Mock implements _i9.Manager { ), ) as _i5.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i11.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i12.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i11.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i12.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -307,15 +318,15 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -352,19 +363,29 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -374,9 +395,9 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i6.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -385,32 +406,32 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -420,33 +441,33 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -465,20 +486,20 @@ class MockManager extends _i1.Mock implements _i9.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -490,43 +511,52 @@ class MockManager extends _i1.Mock implements _i9.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i6.Amount> estimateFeeFor( + _i6.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i6.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -534,7 +564,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], diff --git a/test/screen_tests/lockscreen_view_screen_test.mocks.dart b/test/screen_tests/lockscreen_view_screen_test.mocks.dart index 51a9b0558..acdd22a94 100644 --- a/test/screen_tests/lockscreen_view_screen_test.mocks.dart +++ b/test/screen_tests/lockscreen_view_screen_test.mocks.dart @@ -3,19 +3,20 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i5; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i14; import 'package:stackwallet/models/models.dart' as _i4; -import 'package:stackwallet/models/node_model.dart' as _i11; +import 'package:stackwallet/models/node_model.dart' as _i12; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i12; -import 'package:stackwallet/services/node_service.dart' as _i10; -import 'package:stackwallet/services/wallets_service.dart' as _i6; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; +import 'package:stackwallet/services/coins/manager.dart' as _i13; +import 'package:stackwallet/services/node_service.dart' as _i11; +import 'package:stackwallet/services/wallets_service.dart' as _i7; +import 'package:stackwallet/utilities/amount/amount.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i2; @@ -72,24 +73,34 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance { ); } +class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount { + _FakeAmount_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i6.WalletsService { +class MockWalletsService extends _i1.Mock implements _i7.WalletsService { @override - _i7.Future> get walletNames => + _i8.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i7.Future>.value( - {}), - ) as _i7.Future>); + returnValue: _i8.Future>.value( + {}), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future renameWallet({ + _i8.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -104,21 +115,21 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i7.Future addExistingStackWallet({ + _i8.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i8.Coin? coin, + required _i9.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -132,13 +143,13 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future addNewWallet({ + _i8.Future addNewWallet({ required String? name, - required _i8.Coin? coin, + required _i9.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -151,46 +162,46 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i8.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future saveFavoriteWalletIds(List? walletIds) => + _i8.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i8.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i8.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future moveFavorite({ + _i8.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -203,48 +214,48 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i8.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i8.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future isMnemonicVerified({required String? walletId}) => + _i8.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future setMnemonicVerified({required String? walletId}) => + _i8.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future deleteWallet( + _i8.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -256,20 +267,20 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future refreshWallets(bool? shouldNotifyListeners) => + _i8.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -277,7 +288,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -305,7 +316,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i10.NodeService { +class MockNodeService extends _i1.Mock implements _i11.NodeService { @override _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), @@ -315,33 +326,33 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { ), ) as _i2.SecureStorageInterface); @override - List<_i11.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i12.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + returnValue: <_i12.NodeModel>[], + ) as List<_i12.NodeModel>); @override - List<_i11.NodeModel> get nodes => (super.noSuchMethod( + List<_i12.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + returnValue: <_i12.NodeModel>[], + ) as List<_i12.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateDefaults() => (super.noSuchMethod( + _i8.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future setPrimaryNodeFor({ - required _i8.Coin? coin, - required _i11.NodeModel? node, + _i8.Future setPrimaryNodeFor({ + required _i9.Coin? coin, + required _i12.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -354,44 +365,44 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.NodeModel? getPrimaryNodeFor({required _i8.Coin? coin}) => + _i12.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i11.NodeModel?); + )) as _i12.NodeModel?); @override - List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod( + List<_i12.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + returnValue: <_i12.NodeModel>[], + ) as List<_i12.NodeModel>); @override - _i11.NodeModel? getNodeById({required String? id}) => + _i12.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i11.NodeModel?); + )) as _i12.NodeModel?); @override - List<_i11.NodeModel> failoverNodesFor({required _i8.Coin? coin}) => + List<_i12.NodeModel> failoverNodesFor({required _i9.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + returnValue: <_i12.NodeModel>[], + ) as List<_i12.NodeModel>); @override - _i7.Future add( - _i11.NodeModel? node, + _i8.Future add( + _i12.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -404,11 +415,11 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future delete( + _i8.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -420,11 +431,11 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future setEnabledState( + _i8.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -438,12 +449,12 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future edit( - _i11.NodeModel? editedNode, + _i8.Future edit( + _i12.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -456,20 +467,20 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future updateCommunityNodes() => (super.noSuchMethod( + _i8.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -477,7 +488,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -505,7 +516,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i12.Manager { +class MockManager extends _i1.Mock implements _i13.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -533,10 +544,10 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: false, ) as bool); @override - _i8.Coin get coin => (super.noSuchMethod( + _i9.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i8.Coin.bitcoin, - ) as _i8.Coin); + returnValue: _i9.Coin.bitcoin, + ) as _i9.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -569,23 +580,23 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i4.FeeObject>); + ) as _i8.Future<_i4.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i5.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -595,16 +606,16 @@ class MockManager extends _i1.Mock implements _i12.Manager { ), ) as _i5.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i13.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i14.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i13.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i14.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -624,15 +635,15 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -669,19 +680,29 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -691,9 +712,9 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i6.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -702,32 +723,32 @@ class MockManager extends _i1.Mock implements _i12.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -737,33 +758,33 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -782,20 +803,20 @@ class MockManager extends _i1.Mock implements _i12.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -807,43 +828,52 @@ class MockManager extends _i1.Mock implements _i12.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i6.Amount> estimateFeeFor( + _i6.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i6.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -851,7 +881,7 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 6cc5c84a9..23054bf14 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 @@ -3,19 +3,20 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:ui' as _i8; +import 'dart:async' as _i7; +import 'dart:ui' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i9; -import 'package:stackwallet/services/locale_service.dart' as _i12; -import 'package:stackwallet/services/notes_service.dart' as _i11; -import 'package:stackwallet/services/wallets_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; +import 'package:stackwallet/services/coins/manager.dart' as _i10; +import 'package:stackwallet/services/locale_service.dart' as _i13; +import 'package:stackwallet/services/notes_service.dart' as _i12; +import 'package:stackwallet/services/wallets_service.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -59,24 +60,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i5.WalletsService { +class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override - _i6.Future> get walletNames => + _i7.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i6.Future>.value( - {}), - ) as _i6.Future>); + returnValue: _i7.Future>.value( + {}), + ) as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future renameWallet({ + _i7.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -91,21 +102,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i6.Future addExistingStackWallet({ + _i7.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -119,13 +130,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addNewWallet({ + _i7.Future addNewWallet({ required String? name, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -138,46 +149,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future moveFavorite({ + _i7.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -190,48 +201,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future isMnemonicVerified({required String? walletId}) => + _i7.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future setMnemonicVerified({required String? walletId}) => + _i7.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteWallet( + _i7.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -243,20 +254,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => + _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -264,7 +275,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -292,7 +303,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i9.Manager { +class MockManager extends _i1.Mock implements _i10.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -320,10 +331,10 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i7.Coin get coin => (super.noSuchMethod( + _i8.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin, - ) as _i7.Coin); + returnValue: _i8.Coin.bitcoin, + ) as _i8.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -356,23 +367,23 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i6.Future<_i3.FeeObject>); + ) as _i7.Future<_i3.FeeObject>); @override - _i6.Future get maxFee => (super.noSuchMethod( + _i7.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future get currentReceivingAddress => (super.noSuchMethod( + _i7.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -382,16 +393,16 @@ class MockManager extends _i1.Mock implements _i9.Manager { ), ) as _i4.Balance); @override - _i6.Future> get transactions => (super.noSuchMethod( + _i7.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i6.Future>.value(<_i10.Transaction>[]), - ) as _i6.Future>); + _i7.Future>.value(<_i11.Transaction>[]), + ) as _i7.Future>); @override - _i6.Future> get utxos => (super.noSuchMethod( + _i7.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i6.Future>.value(<_i10.UTXO>[]), - ) as _i6.Future>); + returnValue: _i7.Future>.value(<_i11.UTXO>[]), + ) as _i7.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -411,15 +422,15 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: '', ) as String); @override - _i6.Future> get mnemonic => (super.noSuchMethod( + _i7.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -456,19 +467,29 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i7.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -478,9 +499,9 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future> prepareSend({ + _i7.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -489,32 +510,32 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i7.Future>.value({}), + ) as _i7.Future>); @override - _i6.Future confirmSend({required Map? txData}) => + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override - _i6.Future refresh() => (super.noSuchMethod( + _i7.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -524,33 +545,33 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i6.Future testNetworkConnection() => (super.noSuchMethod( + _i7.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future initializeNew() => (super.noSuchMethod( + _i7.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future initializeExisting() => (super.noSuchMethod( + _i7.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future recoverFromMnemonic({ + _i7.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -569,20 +590,20 @@ class MockManager extends _i1.Mock implements _i9.Manager { #height: height, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future exitCurrentWallet() => (super.noSuchMethod( + _i7.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future fullRescan( + _i7.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -594,43 +615,52 @@ class MockManager extends _i1.Mock implements _i9.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future estimateFeeFor( - int? satoshiAmount, + _i7.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i7.Future<_i5.Amount>); @override - _i6.Future generateNewAddress() => (super.noSuchMethod( + _i7.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future resetRescanOnOpen() => (super.noSuchMethod( + _i7.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -638,7 +668,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -658,7 +688,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i11.NotesService { +class MockNotesService extends _i1.Mock implements _i12.NotesService { @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), @@ -670,34 +700,34 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { returnValue: {}, ) as Map); @override - _i6.Future> get notes => (super.noSuchMethod( + _i7.Future> get notes => (super.noSuchMethod( Invocation.getter(#notes), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future> search(String? text) => (super.noSuchMethod( + _i7.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override - _i6.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( Invocation.method( #getNoteFor, [], {#txid: txid}, ), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override - _i6.Future editOrAddNote({ + _i7.Future editOrAddNote({ required String? txid, required String? note, }) => @@ -710,21 +740,21 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { #note: note, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteNote({required String? txid}) => (super.noSuchMethod( + _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( Invocation.method( #deleteNote, [], {#txid: txid}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -732,7 +762,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -760,7 +790,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i12.LocaleService { +class MockLocaleService extends _i1.Mock implements _i13.LocaleService { @override String get locale => (super.noSuchMethod( Invocation.getter(#locale), @@ -772,17 +802,17 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService { returnValue: false, ) as bool); @override - _i6.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i7.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -790,7 +820,7 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 70296abd2..d511d0e22 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 @@ -3,19 +3,20 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:ui' as _i8; +import 'dart:async' as _i7; +import 'dart:ui' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i9; -import 'package:stackwallet/services/locale_service.dart' as _i12; -import 'package:stackwallet/services/notes_service.dart' as _i11; -import 'package:stackwallet/services/wallets_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; +import 'package:stackwallet/services/coins/manager.dart' as _i10; +import 'package:stackwallet/services/locale_service.dart' as _i13; +import 'package:stackwallet/services/notes_service.dart' as _i12; +import 'package:stackwallet/services/wallets_service.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -59,24 +60,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i5.WalletsService { +class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override - _i6.Future> get walletNames => + _i7.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i6.Future>.value( - {}), - ) as _i6.Future>); + returnValue: _i7.Future>.value( + {}), + ) as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future renameWallet({ + _i7.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -91,21 +102,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i6.Future addExistingStackWallet({ + _i7.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -119,13 +130,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addNewWallet({ + _i7.Future addNewWallet({ required String? name, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -138,46 +149,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future moveFavorite({ + _i7.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -190,48 +201,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future isMnemonicVerified({required String? walletId}) => + _i7.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future setMnemonicVerified({required String? walletId}) => + _i7.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteWallet( + _i7.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -243,20 +254,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => + _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -264,7 +275,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -292,7 +303,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i9.Manager { +class MockManager extends _i1.Mock implements _i10.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -320,10 +331,10 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i7.Coin get coin => (super.noSuchMethod( + _i8.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin, - ) as _i7.Coin); + returnValue: _i8.Coin.bitcoin, + ) as _i8.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -356,23 +367,23 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i6.Future<_i3.FeeObject>); + ) as _i7.Future<_i3.FeeObject>); @override - _i6.Future get maxFee => (super.noSuchMethod( + _i7.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future get currentReceivingAddress => (super.noSuchMethod( + _i7.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -382,16 +393,16 @@ class MockManager extends _i1.Mock implements _i9.Manager { ), ) as _i4.Balance); @override - _i6.Future> get transactions => (super.noSuchMethod( + _i7.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i6.Future>.value(<_i10.Transaction>[]), - ) as _i6.Future>); + _i7.Future>.value(<_i11.Transaction>[]), + ) as _i7.Future>); @override - _i6.Future> get utxos => (super.noSuchMethod( + _i7.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i6.Future>.value(<_i10.UTXO>[]), - ) as _i6.Future>); + returnValue: _i7.Future>.value(<_i11.UTXO>[]), + ) as _i7.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -411,15 +422,15 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: '', ) as String); @override - _i6.Future> get mnemonic => (super.noSuchMethod( + _i7.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -456,19 +467,29 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i7.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -478,9 +499,9 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future> prepareSend({ + _i7.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -489,32 +510,32 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i7.Future>.value({}), + ) as _i7.Future>); @override - _i6.Future confirmSend({required Map? txData}) => + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override - _i6.Future refresh() => (super.noSuchMethod( + _i7.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -524,33 +545,33 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i6.Future testNetworkConnection() => (super.noSuchMethod( + _i7.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future initializeNew() => (super.noSuchMethod( + _i7.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future initializeExisting() => (super.noSuchMethod( + _i7.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future recoverFromMnemonic({ + _i7.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -569,20 +590,20 @@ class MockManager extends _i1.Mock implements _i9.Manager { #height: height, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future exitCurrentWallet() => (super.noSuchMethod( + _i7.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future fullRescan( + _i7.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -594,43 +615,52 @@ class MockManager extends _i1.Mock implements _i9.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future estimateFeeFor( - int? satoshiAmount, + _i7.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i7.Future<_i5.Amount>); @override - _i6.Future generateNewAddress() => (super.noSuchMethod( + _i7.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future resetRescanOnOpen() => (super.noSuchMethod( + _i7.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -638,7 +668,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -658,7 +688,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i11.NotesService { +class MockNotesService extends _i1.Mock implements _i12.NotesService { @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), @@ -670,34 +700,34 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { returnValue: {}, ) as Map); @override - _i6.Future> get notes => (super.noSuchMethod( + _i7.Future> get notes => (super.noSuchMethod( Invocation.getter(#notes), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future> search(String? text) => (super.noSuchMethod( + _i7.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override - _i6.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( Invocation.method( #getNoteFor, [], {#txid: txid}, ), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override - _i6.Future editOrAddNote({ + _i7.Future editOrAddNote({ required String? txid, required String? note, }) => @@ -710,21 +740,21 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { #note: note, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteNote({required String? txid}) => (super.noSuchMethod( + _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( Invocation.method( #deleteNote, [], {#txid: txid}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -732,7 +762,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -760,7 +790,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i12.LocaleService { +class MockLocaleService extends _i1.Mock implements _i13.LocaleService { @override String get locale => (super.noSuchMethod( Invocation.getter(#locale), @@ -772,17 +802,17 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService { returnValue: false, ) as bool); @override - _i6.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i7.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -790,7 +820,7 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 b5860e0cd..7d1a3f0fc 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 @@ -3,19 +3,20 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:ui' as _i8; +import 'dart:async' as _i7; +import 'dart:ui' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i9; -import 'package:stackwallet/services/locale_service.dart' as _i12; -import 'package:stackwallet/services/notes_service.dart' as _i11; -import 'package:stackwallet/services/wallets_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; +import 'package:stackwallet/services/coins/manager.dart' as _i10; +import 'package:stackwallet/services/locale_service.dart' as _i13; +import 'package:stackwallet/services/notes_service.dart' as _i12; +import 'package:stackwallet/services/wallets_service.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -59,24 +60,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i5.WalletsService { +class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override - _i6.Future> get walletNames => + _i7.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i6.Future>.value( - {}), - ) as _i6.Future>); + returnValue: _i7.Future>.value( + {}), + ) as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future renameWallet({ + _i7.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -91,21 +102,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i6.Future addExistingStackWallet({ + _i7.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -119,13 +130,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addNewWallet({ + _i7.Future addNewWallet({ required String? name, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -138,46 +149,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future moveFavorite({ + _i7.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -190,48 +201,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future isMnemonicVerified({required String? walletId}) => + _i7.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future setMnemonicVerified({required String? walletId}) => + _i7.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteWallet( + _i7.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -243,20 +254,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => + _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -264,7 +275,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -292,7 +303,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i9.Manager { +class MockManager extends _i1.Mock implements _i10.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -320,10 +331,10 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i7.Coin get coin => (super.noSuchMethod( + _i8.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin, - ) as _i7.Coin); + returnValue: _i8.Coin.bitcoin, + ) as _i8.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -356,23 +367,23 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i6.Future<_i3.FeeObject>); + ) as _i7.Future<_i3.FeeObject>); @override - _i6.Future get maxFee => (super.noSuchMethod( + _i7.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future get currentReceivingAddress => (super.noSuchMethod( + _i7.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -382,16 +393,16 @@ class MockManager extends _i1.Mock implements _i9.Manager { ), ) as _i4.Balance); @override - _i6.Future> get transactions => (super.noSuchMethod( + _i7.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i6.Future>.value(<_i10.Transaction>[]), - ) as _i6.Future>); + _i7.Future>.value(<_i11.Transaction>[]), + ) as _i7.Future>); @override - _i6.Future> get utxos => (super.noSuchMethod( + _i7.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i6.Future>.value(<_i10.UTXO>[]), - ) as _i6.Future>); + returnValue: _i7.Future>.value(<_i11.UTXO>[]), + ) as _i7.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -411,15 +422,15 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: '', ) as String); @override - _i6.Future> get mnemonic => (super.noSuchMethod( + _i7.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -456,19 +467,29 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i7.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -478,9 +499,9 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future> prepareSend({ + _i7.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -489,32 +510,32 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i7.Future>.value({}), + ) as _i7.Future>); @override - _i6.Future confirmSend({required Map? txData}) => + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override - _i6.Future refresh() => (super.noSuchMethod( + _i7.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -524,33 +545,33 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i6.Future testNetworkConnection() => (super.noSuchMethod( + _i7.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future initializeNew() => (super.noSuchMethod( + _i7.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future initializeExisting() => (super.noSuchMethod( + _i7.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future recoverFromMnemonic({ + _i7.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -569,20 +590,20 @@ class MockManager extends _i1.Mock implements _i9.Manager { #height: height, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future exitCurrentWallet() => (super.noSuchMethod( + _i7.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future fullRescan( + _i7.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -594,43 +615,52 @@ class MockManager extends _i1.Mock implements _i9.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future estimateFeeFor( - int? satoshiAmount, + _i7.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i7.Future<_i5.Amount>); @override - _i6.Future generateNewAddress() => (super.noSuchMethod( + _i7.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future resetRescanOnOpen() => (super.noSuchMethod( + _i7.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -638,7 +668,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -658,7 +688,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i11.NotesService { +class MockNotesService extends _i1.Mock implements _i12.NotesService { @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), @@ -670,34 +700,34 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { returnValue: {}, ) as Map); @override - _i6.Future> get notes => (super.noSuchMethod( + _i7.Future> get notes => (super.noSuchMethod( Invocation.getter(#notes), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future> search(String? text) => (super.noSuchMethod( + _i7.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override - _i6.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( Invocation.method( #getNoteFor, [], {#txid: txid}, ), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override - _i6.Future editOrAddNote({ + _i7.Future editOrAddNote({ required String? txid, required String? note, }) => @@ -710,21 +740,21 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { #note: note, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteNote({required String? txid}) => (super.noSuchMethod( + _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( Invocation.method( #deleteNote, [], {#txid: txid}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -732,7 +762,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -760,7 +790,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i12.LocaleService { +class MockLocaleService extends _i1.Mock implements _i13.LocaleService { @override String get locale => (super.noSuchMethod( Invocation.getter(#locale), @@ -772,17 +802,17 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService { returnValue: false, ) as bool); @override - _i6.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i7.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -790,7 +820,7 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 ce6a5fa73..7a0270532 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 @@ -3,16 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { +class MockManager extends _i1.Mock implements _i6.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i6.Coin get coin => (super.noSuchMethod( + _i7.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin, - ) as _i6.Coin); + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i3.FeeObject>); + ) as _i8.Future<_i3.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager { ), ) as _i4.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i8.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i9.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i8.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i9.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i5.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 dd1a445be..ff835bf64 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 @@ -3,17 +3,18 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:ui' as _i8; +import 'dart:async' as _i7; +import 'dart:ui' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i9; -import 'package:stackwallet/services/wallets_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; +import 'package:stackwallet/services/coins/manager.dart' as _i10; +import 'package:stackwallet/services/wallets_service.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -57,24 +58,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i5.WalletsService { +class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override - _i6.Future> get walletNames => + _i7.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i6.Future>.value( - {}), - ) as _i6.Future>); + returnValue: _i7.Future>.value( + {}), + ) as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future renameWallet({ + _i7.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -89,21 +100,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i6.Future addExistingStackWallet({ + _i7.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -117,13 +128,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addNewWallet({ + _i7.Future addNewWallet({ required String? name, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -136,46 +147,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future moveFavorite({ + _i7.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -188,48 +199,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future isMnemonicVerified({required String? walletId}) => + _i7.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future setMnemonicVerified({required String? walletId}) => + _i7.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteWallet( + _i7.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -241,20 +252,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => + _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -262,7 +273,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -290,7 +301,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i9.Manager { +class MockManager extends _i1.Mock implements _i10.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -318,10 +329,10 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i7.Coin get coin => (super.noSuchMethod( + _i8.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin, - ) as _i7.Coin); + returnValue: _i8.Coin.bitcoin, + ) as _i8.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -354,23 +365,23 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i6.Future<_i3.FeeObject>); + ) as _i7.Future<_i3.FeeObject>); @override - _i6.Future get maxFee => (super.noSuchMethod( + _i7.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future get currentReceivingAddress => (super.noSuchMethod( + _i7.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -380,16 +391,16 @@ class MockManager extends _i1.Mock implements _i9.Manager { ), ) as _i4.Balance); @override - _i6.Future> get transactions => (super.noSuchMethod( + _i7.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i6.Future>.value(<_i10.Transaction>[]), - ) as _i6.Future>); + _i7.Future>.value(<_i11.Transaction>[]), + ) as _i7.Future>); @override - _i6.Future> get utxos => (super.noSuchMethod( + _i7.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i6.Future>.value(<_i10.UTXO>[]), - ) as _i6.Future>); + returnValue: _i7.Future>.value(<_i11.UTXO>[]), + ) as _i7.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -409,15 +420,15 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: '', ) as String); @override - _i6.Future> get mnemonic => (super.noSuchMethod( + _i7.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -454,19 +465,29 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i7.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -476,9 +497,9 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future> prepareSend({ + _i7.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -487,32 +508,32 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i7.Future>.value({}), + ) as _i7.Future>); @override - _i6.Future confirmSend({required Map? txData}) => + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override - _i6.Future refresh() => (super.noSuchMethod( + _i7.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -522,33 +543,33 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i6.Future testNetworkConnection() => (super.noSuchMethod( + _i7.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future initializeNew() => (super.noSuchMethod( + _i7.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future initializeExisting() => (super.noSuchMethod( + _i7.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future recoverFromMnemonic({ + _i7.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -567,20 +588,20 @@ class MockManager extends _i1.Mock implements _i9.Manager { #height: height, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future exitCurrentWallet() => (super.noSuchMethod( + _i7.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future fullRescan( + _i7.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -592,43 +613,52 @@ class MockManager extends _i1.Mock implements _i9.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future estimateFeeFor( - int? satoshiAmount, + _i7.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i7.Future<_i5.Amount>); @override - _i6.Future generateNewAddress() => (super.noSuchMethod( + _i7.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future resetRescanOnOpen() => (super.noSuchMethod( + _i7.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -636,7 +666,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 0be6762a5..796f4fd13 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 @@ -3,19 +3,20 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i5; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i14; import 'package:stackwallet/models/models.dart' as _i4; -import 'package:stackwallet/models/node_model.dart' as _i11; +import 'package:stackwallet/models/node_model.dart' as _i12; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i12; -import 'package:stackwallet/services/node_service.dart' as _i10; -import 'package:stackwallet/services/wallets_service.dart' as _i6; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; +import 'package:stackwallet/services/coins/manager.dart' as _i13; +import 'package:stackwallet/services/node_service.dart' as _i11; +import 'package:stackwallet/services/wallets_service.dart' as _i7; +import 'package:stackwallet/utilities/amount/amount.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i2; @@ -72,24 +73,34 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance { ); } +class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount { + _FakeAmount_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i6.WalletsService { +class MockWalletsService extends _i1.Mock implements _i7.WalletsService { @override - _i7.Future> get walletNames => + _i8.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i7.Future>.value( - {}), - ) as _i7.Future>); + returnValue: _i8.Future>.value( + {}), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future renameWallet({ + _i8.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -104,21 +115,21 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i7.Future addExistingStackWallet({ + _i8.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i8.Coin? coin, + required _i9.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -132,13 +143,13 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future addNewWallet({ + _i8.Future addNewWallet({ required String? name, - required _i8.Coin? coin, + required _i9.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -151,46 +162,46 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i8.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future saveFavoriteWalletIds(List? walletIds) => + _i8.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i8.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i8.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future moveFavorite({ + _i8.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -203,48 +214,48 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i8.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i8.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future isMnemonicVerified({required String? walletId}) => + _i8.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future setMnemonicVerified({required String? walletId}) => + _i8.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future deleteWallet( + _i8.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -256,20 +267,20 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future refreshWallets(bool? shouldNotifyListeners) => + _i8.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -277,7 +288,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -305,7 +316,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i10.NodeService { +class MockNodeService extends _i1.Mock implements _i11.NodeService { @override _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), @@ -315,33 +326,33 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { ), ) as _i2.SecureStorageInterface); @override - List<_i11.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i12.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + returnValue: <_i12.NodeModel>[], + ) as List<_i12.NodeModel>); @override - List<_i11.NodeModel> get nodes => (super.noSuchMethod( + List<_i12.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + returnValue: <_i12.NodeModel>[], + ) as List<_i12.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateDefaults() => (super.noSuchMethod( + _i8.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future setPrimaryNodeFor({ - required _i8.Coin? coin, - required _i11.NodeModel? node, + _i8.Future setPrimaryNodeFor({ + required _i9.Coin? coin, + required _i12.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -354,44 +365,44 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.NodeModel? getPrimaryNodeFor({required _i8.Coin? coin}) => + _i12.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i11.NodeModel?); + )) as _i12.NodeModel?); @override - List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod( + List<_i12.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + returnValue: <_i12.NodeModel>[], + ) as List<_i12.NodeModel>); @override - _i11.NodeModel? getNodeById({required String? id}) => + _i12.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i11.NodeModel?); + )) as _i12.NodeModel?); @override - List<_i11.NodeModel> failoverNodesFor({required _i8.Coin? coin}) => + List<_i12.NodeModel> failoverNodesFor({required _i9.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i11.NodeModel>[], - ) as List<_i11.NodeModel>); + returnValue: <_i12.NodeModel>[], + ) as List<_i12.NodeModel>); @override - _i7.Future add( - _i11.NodeModel? node, + _i8.Future add( + _i12.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -404,11 +415,11 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future delete( + _i8.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -420,11 +431,11 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future setEnabledState( + _i8.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -438,12 +449,12 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future edit( - _i11.NodeModel? editedNode, + _i8.Future edit( + _i12.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -456,20 +467,20 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { shouldNotifyListeners, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future updateCommunityNodes() => (super.noSuchMethod( + _i8.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -477,7 +488,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -505,7 +516,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i12.Manager { +class MockManager extends _i1.Mock implements _i13.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -533,10 +544,10 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: false, ) as bool); @override - _i8.Coin get coin => (super.noSuchMethod( + _i9.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i8.Coin.bitcoin, - ) as _i8.Coin); + returnValue: _i9.Coin.bitcoin, + ) as _i9.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -569,23 +580,23 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i4.FeeObject>); + ) as _i8.Future<_i4.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i5.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -595,16 +606,16 @@ class MockManager extends _i1.Mock implements _i12.Manager { ), ) as _i5.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i13.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i14.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i13.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i14.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -624,15 +635,15 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -669,19 +680,29 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -691,9 +712,9 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i6.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -702,32 +723,32 @@ class MockManager extends _i1.Mock implements _i12.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -737,33 +758,33 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -782,20 +803,20 @@ class MockManager extends _i1.Mock implements _i12.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -807,43 +828,52 @@ class MockManager extends _i1.Mock implements _i12.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i6.Amount> estimateFeeFor( + _i6.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i6.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -851,7 +881,7 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 ce7c6a728..6ea1fd2c5 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 @@ -3,23 +3,24 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i8; -import 'dart:ui' as _i11; +import 'dart:async' as _i9; +import 'dart:ui' as _i12; import 'package:barcode_scan2/barcode_scan2.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i5; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i14; import 'package:stackwallet/models/models.dart' as _i4; -import 'package:stackwallet/models/node_model.dart' as _i15; +import 'package:stackwallet/models/node_model.dart' as _i16; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i12; -import 'package:stackwallet/services/node_service.dart' as _i14; -import 'package:stackwallet/services/wallets_service.dart' as _i9; -import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i7; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; +import 'package:stackwallet/services/coins/manager.dart' as _i13; +import 'package:stackwallet/services/node_service.dart' as _i15; +import 'package:stackwallet/services/wallets_service.dart' as _i10; +import 'package:stackwallet/utilities/amount/amount.dart' as _i6; +import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i8; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i11; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i6; + as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -73,9 +74,19 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance { ); } -class _FakeSecureStorageInterface_4 extends _i1.SmartFake - implements _i6.SecureStorageInterface { - _FakeSecureStorageInterface_4( +class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount { + _FakeAmount_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeSecureStorageInterface_5 extends _i1.SmartFake + implements _i7.SecureStorageInterface { + _FakeSecureStorageInterface_5( Object parent, Invocation parentInvocation, ) : super( @@ -88,13 +99,13 @@ class _FakeSecureStorageInterface_4 extends _i1.SmartFake /// /// See the documentation for Mockito's code generation for more information. class MockBarcodeScannerWrapper extends _i1.Mock - implements _i7.BarcodeScannerWrapper { + implements _i8.BarcodeScannerWrapper { MockBarcodeScannerWrapper() { _i1.throwOnMissingStub(this); } @override - _i8.Future<_i2.ScanResult> scan( + _i9.Future<_i2.ScanResult> scan( {_i2.ScanOptions? options = const _i2.ScanOptions()}) => (super.noSuchMethod( Invocation.method( @@ -102,7 +113,7 @@ class MockBarcodeScannerWrapper extends _i1.Mock [], {#options: options}, ), - returnValue: _i8.Future<_i2.ScanResult>.value(_FakeScanResult_0( + returnValue: _i9.Future<_i2.ScanResult>.value(_FakeScanResult_0( this, Invocation.method( #scan, @@ -110,27 +121,27 @@ class MockBarcodeScannerWrapper extends _i1.Mock {#options: options}, ), )), - ) as _i8.Future<_i2.ScanResult>); + ) as _i9.Future<_i2.ScanResult>); } /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i9.WalletsService { +class MockWalletsService extends _i1.Mock implements _i10.WalletsService { @override - _i8.Future> get walletNames => + _i9.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i8.Future>.value( - {}), - ) as _i8.Future>); + returnValue: _i9.Future>.value( + {}), + ) as _i9.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future renameWallet({ + _i9.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -145,21 +156,21 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i8.Future addExistingStackWallet({ + _i9.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i10.Coin? coin, + required _i11.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -173,13 +184,13 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future addNewWallet({ + _i9.Future addNewWallet({ required String? name, - required _i10.Coin? coin, + required _i11.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -192,46 +203,46 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i9.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i8.Future saveFavoriteWalletIds(List? walletIds) => + _i9.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i9.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i9.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future moveFavorite({ + _i9.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -244,48 +255,48 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i9.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i9.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future isMnemonicVerified({required String? walletId}) => + _i9.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future setMnemonicVerified({required String? walletId}) => + _i9.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future deleteWallet( + _i9.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -297,20 +308,20 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i8.Future refreshWallets(bool? shouldNotifyListeners) => + _i9.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -318,7 +329,7 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -346,7 +357,7 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i12.Manager { +class MockManager extends _i1.Mock implements _i13.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -374,10 +385,10 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: false, ) as bool); @override - _i10.Coin get coin => (super.noSuchMethod( + _i11.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i10.Coin.bitcoin, - ) as _i10.Coin); + returnValue: _i11.Coin.bitcoin, + ) as _i11.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -410,23 +421,23 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValueForMissingStub: null, ); @override - _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + _i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2( this, Invocation.getter(#fees), )), - ) as _i8.Future<_i4.FeeObject>); + ) as _i9.Future<_i4.FeeObject>); @override - _i8.Future get maxFee => (super.noSuchMethod( + _i9.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i8.Future get currentReceivingAddress => (super.noSuchMethod( + _i9.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override _i5.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -436,16 +447,16 @@ class MockManager extends _i1.Mock implements _i12.Manager { ), ) as _i5.Balance); @override - _i8.Future> get transactions => (super.noSuchMethod( + _i9.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i8.Future>.value(<_i13.Transaction>[]), - ) as _i8.Future>); + _i9.Future>.value(<_i14.Transaction>[]), + ) as _i9.Future>); @override - _i8.Future> get utxos => (super.noSuchMethod( + _i9.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i8.Future>.value(<_i13.UTXO>[]), - ) as _i8.Future>); + returnValue: _i9.Future>.value(<_i14.UTXO>[]), + ) as _i9.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -465,15 +476,15 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: '', ) as String); @override - _i8.Future> get mnemonic => (super.noSuchMethod( + _i9.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + _i9.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -510,19 +521,29 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i9.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i9.Future.value(''), + ) as _i9.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i9.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -532,9 +553,9 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValueForMissingStub: null, ); @override - _i8.Future> prepareSend({ + _i9.Future> prepareSend({ required String? address, - required int? amount, + required _i6.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -543,32 +564,32 @@ class MockManager extends _i1.Mock implements _i12.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i8.Future confirmSend({required Map? txData}) => + _i9.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override - _i8.Future refresh() => (super.noSuchMethod( + _i9.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -578,33 +599,33 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: false, ) as bool); @override - _i8.Future testNetworkConnection() => (super.noSuchMethod( + _i9.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future initializeNew() => (super.noSuchMethod( + _i9.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future initializeExisting() => (super.noSuchMethod( + _i9.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future recoverFromMnemonic({ + _i9.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -623,20 +644,20 @@ class MockManager extends _i1.Mock implements _i12.Manager { #height: height, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future exitCurrentWallet() => (super.noSuchMethod( + _i9.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future fullRescan( + _i9.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -648,43 +669,52 @@ class MockManager extends _i1.Mock implements _i12.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future estimateFeeFor( - int? satoshiAmount, + _i9.Future<_i6.Amount> estimateFeeFor( + _i6.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i9.Future<_i6.Amount>); @override - _i8.Future generateNewAddress() => (super.noSuchMethod( + _i9.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future resetRescanOnOpen() => (super.noSuchMethod( + _i9.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -692,7 +722,7 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -712,43 +742,43 @@ class MockManager extends _i1.Mock implements _i12.Manager { /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i14.NodeService { +class MockNodeService extends _i1.Mock implements _i15.NodeService { @override - _i6.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( + _i7.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_4( + returnValue: _FakeSecureStorageInterface_5( this, Invocation.getter(#secureStorageInterface), ), - ) as _i6.SecureStorageInterface); + ) as _i7.SecureStorageInterface); @override - List<_i15.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i16.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i15.NodeModel>[], - ) as List<_i15.NodeModel>); + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); @override - List<_i15.NodeModel> get nodes => (super.noSuchMethod( + List<_i16.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i15.NodeModel>[], - ) as List<_i15.NodeModel>); + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future updateDefaults() => (super.noSuchMethod( + _i9.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future setPrimaryNodeFor({ - required _i10.Coin? coin, - required _i15.NodeModel? node, + _i9.Future setPrimaryNodeFor({ + required _i11.Coin? coin, + required _i16.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -761,44 +791,44 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i15.NodeModel? getPrimaryNodeFor({required _i10.Coin? coin}) => + _i16.NodeModel? getPrimaryNodeFor({required _i11.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i15.NodeModel?); + )) as _i16.NodeModel?); @override - List<_i15.NodeModel> getNodesFor(_i10.Coin? coin) => (super.noSuchMethod( + List<_i16.NodeModel> getNodesFor(_i11.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i15.NodeModel>[], - ) as List<_i15.NodeModel>); + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); @override - _i15.NodeModel? getNodeById({required String? id}) => + _i16.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i15.NodeModel?); + )) as _i16.NodeModel?); @override - List<_i15.NodeModel> failoverNodesFor({required _i10.Coin? coin}) => + List<_i16.NodeModel> failoverNodesFor({required _i11.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i15.NodeModel>[], - ) as List<_i15.NodeModel>); + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); @override - _i8.Future add( - _i15.NodeModel? node, + _i9.Future add( + _i16.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -811,11 +841,11 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future delete( + _i9.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -827,11 +857,11 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future setEnabledState( + _i9.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -845,12 +875,12 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future edit( - _i15.NodeModel? editedNode, + _i9.Future edit( + _i16.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -863,20 +893,20 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future updateCommunityNodes() => (super.noSuchMethod( + _i9.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -884,7 +914,7 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 2df1a8d62..8d2715174 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 @@ -3,16 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { +class MockManager extends _i1.Mock implements _i6.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i6.Coin get coin => (super.noSuchMethod( + _i7.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin, - ) as _i6.Coin); + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i3.FeeObject>); + ) as _i8.Future<_i3.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager { ), ) as _i4.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i8.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i9.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i8.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i9.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i5.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 5c48821f8..742d98a9c 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 @@ -3,16 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { +class MockManager extends _i1.Mock implements _i6.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i6.Coin get coin => (super.noSuchMethod( + _i7.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin, - ) as _i6.Coin); + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i3.FeeObject>); + ) as _i8.Future<_i3.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager { ), ) as _i4.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i8.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i9.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i8.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i9.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i5.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 09a6f027e..0db6ce111 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 @@ -3,18 +3,19 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i8; -import 'dart:ui' as _i10; +import 'dart:async' as _i9; +import 'dart:ui' as _i11; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i5; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i12; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13; import 'package:stackwallet/models/models.dart' as _i4; -import 'package:stackwallet/models/node_model.dart' as _i7; +import 'package:stackwallet/models/node_model.dart' as _i8; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i11; -import 'package:stackwallet/services/node_service.dart' as _i6; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; +import 'package:stackwallet/services/coins/manager.dart' as _i12; +import 'package:stackwallet/services/node_service.dart' as _i7; +import 'package:stackwallet/utilities/amount/amount.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i2; @@ -71,10 +72,20 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance { ); } +class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount { + _FakeAmount_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i6.NodeService { +class MockNodeService extends _i1.Mock implements _i7.NodeService { @override _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), @@ -84,33 +95,33 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { ), ) as _i2.SecureStorageInterface); @override - List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i8.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + returnValue: <_i8.NodeModel>[], + ) as List<_i8.NodeModel>); @override - List<_i7.NodeModel> get nodes => (super.noSuchMethod( + List<_i8.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + returnValue: <_i8.NodeModel>[], + ) as List<_i8.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future updateDefaults() => (super.noSuchMethod( + _i9.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future setPrimaryNodeFor({ - required _i9.Coin? coin, - required _i7.NodeModel? node, + _i9.Future setPrimaryNodeFor({ + required _i10.Coin? coin, + required _i8.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -123,44 +134,44 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i7.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) => + _i8.NodeModel? getPrimaryNodeFor({required _i10.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i7.NodeModel?); + )) as _i8.NodeModel?); @override - List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod( + List<_i8.NodeModel> getNodesFor(_i10.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + returnValue: <_i8.NodeModel>[], + ) as List<_i8.NodeModel>); @override - _i7.NodeModel? getNodeById({required String? id}) => + _i8.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i7.NodeModel?); + )) as _i8.NodeModel?); @override - List<_i7.NodeModel> failoverNodesFor({required _i9.Coin? coin}) => + List<_i8.NodeModel> failoverNodesFor({required _i10.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + returnValue: <_i8.NodeModel>[], + ) as List<_i8.NodeModel>); @override - _i8.Future add( - _i7.NodeModel? node, + _i9.Future add( + _i8.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -173,11 +184,11 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future delete( + _i9.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -189,11 +200,11 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future setEnabledState( + _i9.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -207,12 +218,12 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future edit( - _i7.NodeModel? editedNode, + _i9.Future edit( + _i8.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -225,20 +236,20 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future updateCommunityNodes() => (super.noSuchMethod( + _i9.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -246,7 +257,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -274,7 +285,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i11.Manager { +class MockManager extends _i1.Mock implements _i12.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -302,10 +313,10 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: false, ) as bool); @override - _i9.Coin get coin => (super.noSuchMethod( + _i10.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin, - ) as _i9.Coin); + returnValue: _i10.Coin.bitcoin, + ) as _i10.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -338,23 +349,23 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValueForMissingStub: null, ); @override - _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + _i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2( this, Invocation.getter(#fees), )), - ) as _i8.Future<_i4.FeeObject>); + ) as _i9.Future<_i4.FeeObject>); @override - _i8.Future get maxFee => (super.noSuchMethod( + _i9.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i8.Future get currentReceivingAddress => (super.noSuchMethod( + _i9.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override _i5.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -364,16 +375,16 @@ class MockManager extends _i1.Mock implements _i11.Manager { ), ) as _i5.Balance); @override - _i8.Future> get transactions => (super.noSuchMethod( + _i9.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i8.Future>.value(<_i12.Transaction>[]), - ) as _i8.Future>); + _i9.Future>.value(<_i13.Transaction>[]), + ) as _i9.Future>); @override - _i8.Future> get utxos => (super.noSuchMethod( + _i9.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i8.Future>.value(<_i12.UTXO>[]), - ) as _i8.Future>); + returnValue: _i9.Future>.value(<_i13.UTXO>[]), + ) as _i9.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -393,15 +404,15 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: '', ) as String); @override - _i8.Future> get mnemonic => (super.noSuchMethod( + _i9.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + _i9.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -438,19 +449,29 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i9.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i9.Future.value(''), + ) as _i9.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i9.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -460,9 +481,9 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValueForMissingStub: null, ); @override - _i8.Future> prepareSend({ + _i9.Future> prepareSend({ required String? address, - required int? amount, + required _i6.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -471,32 +492,32 @@ class MockManager extends _i1.Mock implements _i11.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i8.Future confirmSend({required Map? txData}) => + _i9.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override - _i8.Future refresh() => (super.noSuchMethod( + _i9.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -506,33 +527,33 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: false, ) as bool); @override - _i8.Future testNetworkConnection() => (super.noSuchMethod( + _i9.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future initializeNew() => (super.noSuchMethod( + _i9.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future initializeExisting() => (super.noSuchMethod( + _i9.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future recoverFromMnemonic({ + _i9.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -551,20 +572,20 @@ class MockManager extends _i1.Mock implements _i11.Manager { #height: height, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future exitCurrentWallet() => (super.noSuchMethod( + _i9.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future fullRescan( + _i9.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -576,43 +597,52 @@ class MockManager extends _i1.Mock implements _i11.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future estimateFeeFor( - int? satoshiAmount, + _i9.Future<_i6.Amount> estimateFeeFor( + _i6.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i9.Future<_i6.Amount>); @override - _i8.Future generateNewAddress() => (super.noSuchMethod( + _i9.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future resetRescanOnOpen() => (super.noSuchMethod( + _i9.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -620,7 +650,7 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 689918939..865ed2f88 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 @@ -3,18 +3,19 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i8; -import 'dart:ui' as _i10; +import 'dart:async' as _i9; +import 'dart:ui' as _i11; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i5; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i12; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13; import 'package:stackwallet/models/models.dart' as _i4; -import 'package:stackwallet/models/node_model.dart' as _i7; +import 'package:stackwallet/models/node_model.dart' as _i8; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i11; -import 'package:stackwallet/services/node_service.dart' as _i6; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; +import 'package:stackwallet/services/coins/manager.dart' as _i12; +import 'package:stackwallet/services/node_service.dart' as _i7; +import 'package:stackwallet/utilities/amount/amount.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i2; @@ -71,10 +72,20 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance { ); } +class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount { + _FakeAmount_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i6.NodeService { +class MockNodeService extends _i1.Mock implements _i7.NodeService { @override _i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), @@ -84,33 +95,33 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { ), ) as _i2.SecureStorageInterface); @override - List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i8.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + returnValue: <_i8.NodeModel>[], + ) as List<_i8.NodeModel>); @override - List<_i7.NodeModel> get nodes => (super.noSuchMethod( + List<_i8.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + returnValue: <_i8.NodeModel>[], + ) as List<_i8.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future updateDefaults() => (super.noSuchMethod( + _i9.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future setPrimaryNodeFor({ - required _i9.Coin? coin, - required _i7.NodeModel? node, + _i9.Future setPrimaryNodeFor({ + required _i10.Coin? coin, + required _i8.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -123,44 +134,44 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i7.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) => + _i8.NodeModel? getPrimaryNodeFor({required _i10.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i7.NodeModel?); + )) as _i8.NodeModel?); @override - List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod( + List<_i8.NodeModel> getNodesFor(_i10.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + returnValue: <_i8.NodeModel>[], + ) as List<_i8.NodeModel>); @override - _i7.NodeModel? getNodeById({required String? id}) => + _i8.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i7.NodeModel?); + )) as _i8.NodeModel?); @override - List<_i7.NodeModel> failoverNodesFor({required _i9.Coin? coin}) => + List<_i8.NodeModel> failoverNodesFor({required _i10.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i7.NodeModel>[], - ) as List<_i7.NodeModel>); + returnValue: <_i8.NodeModel>[], + ) as List<_i8.NodeModel>); @override - _i8.Future add( - _i7.NodeModel? node, + _i9.Future add( + _i8.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -173,11 +184,11 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future delete( + _i9.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -189,11 +200,11 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future setEnabledState( + _i9.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -207,12 +218,12 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future edit( - _i7.NodeModel? editedNode, + _i9.Future edit( + _i8.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -225,20 +236,20 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future updateCommunityNodes() => (super.noSuchMethod( + _i9.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -246,7 +257,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -274,7 +285,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i11.Manager { +class MockManager extends _i1.Mock implements _i12.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -302,10 +313,10 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: false, ) as bool); @override - _i9.Coin get coin => (super.noSuchMethod( + _i10.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin, - ) as _i9.Coin); + returnValue: _i10.Coin.bitcoin, + ) as _i10.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -338,23 +349,23 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValueForMissingStub: null, ); @override - _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + _i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2( this, Invocation.getter(#fees), )), - ) as _i8.Future<_i4.FeeObject>); + ) as _i9.Future<_i4.FeeObject>); @override - _i8.Future get maxFee => (super.noSuchMethod( + _i9.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i8.Future get currentReceivingAddress => (super.noSuchMethod( + _i9.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override _i5.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -364,16 +375,16 @@ class MockManager extends _i1.Mock implements _i11.Manager { ), ) as _i5.Balance); @override - _i8.Future> get transactions => (super.noSuchMethod( + _i9.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i8.Future>.value(<_i12.Transaction>[]), - ) as _i8.Future>); + _i9.Future>.value(<_i13.Transaction>[]), + ) as _i9.Future>); @override - _i8.Future> get utxos => (super.noSuchMethod( + _i9.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i8.Future>.value(<_i12.UTXO>[]), - ) as _i8.Future>); + returnValue: _i9.Future>.value(<_i13.UTXO>[]), + ) as _i9.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -393,15 +404,15 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: '', ) as String); @override - _i8.Future> get mnemonic => (super.noSuchMethod( + _i9.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + _i9.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -438,19 +449,29 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i9.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i9.Future.value(''), + ) as _i9.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i9.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -460,9 +481,9 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValueForMissingStub: null, ); @override - _i8.Future> prepareSend({ + _i9.Future> prepareSend({ required String? address, - required int? amount, + required _i6.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -471,32 +492,32 @@ class MockManager extends _i1.Mock implements _i11.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i8.Future confirmSend({required Map? txData}) => + _i9.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override - _i8.Future refresh() => (super.noSuchMethod( + _i9.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -506,33 +527,33 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: false, ) as bool); @override - _i8.Future testNetworkConnection() => (super.noSuchMethod( + _i9.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future initializeNew() => (super.noSuchMethod( + _i9.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future initializeExisting() => (super.noSuchMethod( + _i9.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future recoverFromMnemonic({ + _i9.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -551,20 +572,20 @@ class MockManager extends _i1.Mock implements _i11.Manager { #height: height, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future exitCurrentWallet() => (super.noSuchMethod( + _i9.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future fullRescan( + _i9.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -576,43 +597,52 @@ class MockManager extends _i1.Mock implements _i11.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future estimateFeeFor( - int? satoshiAmount, + _i9.Future<_i6.Amount> estimateFeeFor( + _i6.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i9.Future<_i6.Amount>); @override - _i8.Future generateNewAddress() => (super.noSuchMethod( + _i9.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future resetRescanOnOpen() => (super.noSuchMethod( + _i9.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -620,7 +650,7 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 8a88c264c..25a849858 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 @@ -3,16 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { +class MockManager extends _i1.Mock implements _i6.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i6.Coin get coin => (super.noSuchMethod( + _i7.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin, - ) as _i6.Coin); + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i3.FeeObject>); + ) as _i8.Future<_i3.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager { ), ) as _i4.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i8.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i9.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i8.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i9.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i5.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 dd74d3134..63bbf9990 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 @@ -3,16 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { +class MockManager extends _i1.Mock implements _i6.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i6.Coin get coin => (super.noSuchMethod( + _i7.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin, - ) as _i6.Coin); + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i3.FeeObject>); + ) as _i8.Future<_i3.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager { ), ) as _i4.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i8.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i9.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i8.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i9.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i5.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 71ab847d7..49ddcebd3 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 @@ -3,17 +3,18 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:ui' as _i8; +import 'dart:async' as _i7; +import 'dart:ui' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i9; -import 'package:stackwallet/services/wallets_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; +import 'package:stackwallet/services/coins/manager.dart' as _i10; +import 'package:stackwallet/services/wallets_service.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -57,24 +58,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i5.WalletsService { +class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override - _i6.Future> get walletNames => + _i7.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i6.Future>.value( - {}), - ) as _i6.Future>); + returnValue: _i7.Future>.value( + {}), + ) as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future renameWallet({ + _i7.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -89,21 +100,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i6.Future addExistingStackWallet({ + _i7.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -117,13 +128,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addNewWallet({ + _i7.Future addNewWallet({ required String? name, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -136,46 +147,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future moveFavorite({ + _i7.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -188,48 +199,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future isMnemonicVerified({required String? walletId}) => + _i7.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future setMnemonicVerified({required String? walletId}) => + _i7.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteWallet( + _i7.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -241,20 +252,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => + _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -262,7 +273,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -290,7 +301,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i9.Manager { +class MockManager extends _i1.Mock implements _i10.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -318,10 +329,10 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i7.Coin get coin => (super.noSuchMethod( + _i8.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin, - ) as _i7.Coin); + returnValue: _i8.Coin.bitcoin, + ) as _i8.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -354,23 +365,23 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i6.Future<_i3.FeeObject>); + ) as _i7.Future<_i3.FeeObject>); @override - _i6.Future get maxFee => (super.noSuchMethod( + _i7.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future get currentReceivingAddress => (super.noSuchMethod( + _i7.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -380,16 +391,16 @@ class MockManager extends _i1.Mock implements _i9.Manager { ), ) as _i4.Balance); @override - _i6.Future> get transactions => (super.noSuchMethod( + _i7.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i6.Future>.value(<_i10.Transaction>[]), - ) as _i6.Future>); + _i7.Future>.value(<_i11.Transaction>[]), + ) as _i7.Future>); @override - _i6.Future> get utxos => (super.noSuchMethod( + _i7.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i6.Future>.value(<_i10.UTXO>[]), - ) as _i6.Future>); + returnValue: _i7.Future>.value(<_i11.UTXO>[]), + ) as _i7.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -409,15 +420,15 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: '', ) as String); @override - _i6.Future> get mnemonic => (super.noSuchMethod( + _i7.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -454,19 +465,29 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i7.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -476,9 +497,9 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future> prepareSend({ + _i7.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -487,32 +508,32 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i7.Future>.value({}), + ) as _i7.Future>); @override - _i6.Future confirmSend({required Map? txData}) => + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override - _i6.Future refresh() => (super.noSuchMethod( + _i7.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -522,33 +543,33 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i6.Future testNetworkConnection() => (super.noSuchMethod( + _i7.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future initializeNew() => (super.noSuchMethod( + _i7.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future initializeExisting() => (super.noSuchMethod( + _i7.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future recoverFromMnemonic({ + _i7.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -567,20 +588,20 @@ class MockManager extends _i1.Mock implements _i9.Manager { #height: height, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future exitCurrentWallet() => (super.noSuchMethod( + _i7.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future fullRescan( + _i7.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -592,43 +613,52 @@ class MockManager extends _i1.Mock implements _i9.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future estimateFeeFor( - int? satoshiAmount, + _i7.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i7.Future<_i5.Amount>); @override - _i6.Future generateNewAddress() => (super.noSuchMethod( + _i7.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future resetRescanOnOpen() => (super.noSuchMethod( + _i7.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -636,7 +666,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 94659b07c..026d06a20 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 @@ -3,22 +3,23 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i8; -import 'dart:ui' as _i14; +import 'dart:async' as _i9; +import 'dart:ui' as _i15; -import 'package:local_auth/auth_strings.dart' as _i11; -import 'package:local_auth/local_auth.dart' as _i10; +import 'package:local_auth/auth_strings.dart' as _i12; +import 'package:local_auth/local_auth.dart' as _i11; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6; -import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i7; +import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i7; +import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i8; import 'package:stackwallet/models/balance.dart' as _i5; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i17; import 'package:stackwallet/models/models.dart' as _i4; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i15; -import 'package:stackwallet/services/wallets_service.dart' as _i13; -import 'package:stackwallet/utilities/biometrics.dart' as _i12; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; +import 'package:stackwallet/services/coins/manager.dart' as _i16; +import 'package:stackwallet/services/wallets_service.dart' as _i14; +import 'package:stackwallet/utilities/amount/amount.dart' as _i6; +import 'package:stackwallet/utilities/biometrics.dart' as _i13; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; import 'package:stackwallet/utilities/prefs.dart' as _i2; // ignore_for_file: type=lint @@ -73,10 +74,20 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance { ); } +class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount { + _FakeAmount_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [CachedElectrumX]. /// /// See the documentation for Mockito's code generation for more information. -class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { +class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX { MockCachedElectrumX() { _i1.throwOnMissingStub(this); } @@ -105,15 +116,15 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { ), ) as _i2.Prefs); @override - List<_i7.ElectrumXNode> get failovers => (super.noSuchMethod( + List<_i8.ElectrumXNode> get failovers => (super.noSuchMethod( Invocation.getter(#failovers), - returnValue: <_i7.ElectrumXNode>[], - ) as List<_i7.ElectrumXNode>); + returnValue: <_i8.ElectrumXNode>[], + ) as List<_i8.ElectrumXNode>); @override - _i8.Future> getAnonymitySet({ + _i9.Future> getAnonymitySet({ required String? groupId, String? blockhash = r'', - required _i9.Coin? coin, + required _i10.Coin? coin, }) => (super.noSuchMethod( Invocation.method( @@ -126,8 +137,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { }, ), returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override String base64ToHex(String? source) => (super.noSuchMethod( Invocation.method( @@ -145,9 +156,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { returnValue: '', ) as String); @override - _i8.Future> getTransaction({ + _i9.Future> getTransaction({ required String? txHash, - required _i9.Coin? coin, + required _i10.Coin? coin, bool? verbose = true, }) => (super.noSuchMethod( @@ -161,11 +172,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { }, ), returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i8.Future> getUsedCoinSerials({ - required _i9.Coin? coin, + _i9.Future> getUsedCoinSerials({ + required _i10.Coin? coin, int? startNumber = 0, }) => (super.noSuchMethod( @@ -177,43 +188,43 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { #startNumber: startNumber, }, ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i8.Future clearSharedTransactionCache({required _i9.Coin? coin}) => + _i9.Future clearSharedTransactionCache({required _i10.Coin? coin}) => (super.noSuchMethod( Invocation.method( #clearSharedTransactionCache, [], {#coin: coin}, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); } /// A class which mocks [LocalAuthentication]. /// /// See the documentation for Mockito's code generation for more information. class MockLocalAuthentication extends _i1.Mock - implements _i10.LocalAuthentication { + implements _i11.LocalAuthentication { MockLocalAuthentication() { _i1.throwOnMissingStub(this); } @override - _i8.Future get canCheckBiometrics => (super.noSuchMethod( + _i9.Future get canCheckBiometrics => (super.noSuchMethod( Invocation.getter(#canCheckBiometrics), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future authenticateWithBiometrics({ + _i9.Future authenticateWithBiometrics({ required String? localizedReason, bool? useErrorDialogs = true, bool? stickyAuth = false, - _i11.AndroidAuthMessages? androidAuthStrings = - const _i11.AndroidAuthMessages(), - _i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(), + _i12.AndroidAuthMessages? androidAuthStrings = + const _i12.AndroidAuthMessages(), + _i12.IOSAuthMessages? iOSAuthStrings = const _i12.IOSAuthMessages(), bool? sensitiveTransaction = true, }) => (super.noSuchMethod( @@ -229,16 +240,16 @@ class MockLocalAuthentication extends _i1.Mock #sensitiveTransaction: sensitiveTransaction, }, ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future authenticate({ + _i9.Future authenticate({ required String? localizedReason, bool? useErrorDialogs = true, bool? stickyAuth = false, - _i11.AndroidAuthMessages? androidAuthStrings = - const _i11.AndroidAuthMessages(), - _i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(), + _i12.AndroidAuthMessages? androidAuthStrings = + const _i12.AndroidAuthMessages(), + _i12.IOSAuthMessages? iOSAuthStrings = const _i12.IOSAuthMessages(), bool? sensitiveTransaction = true, bool? biometricOnly = false, }) => @@ -256,46 +267,46 @@ class MockLocalAuthentication extends _i1.Mock #biometricOnly: biometricOnly, }, ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future stopAuthentication() => (super.noSuchMethod( + _i9.Future stopAuthentication() => (super.noSuchMethod( Invocation.method( #stopAuthentication, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future isDeviceSupported() => (super.noSuchMethod( + _i9.Future isDeviceSupported() => (super.noSuchMethod( Invocation.method( #isDeviceSupported, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future> getAvailableBiometrics() => + _i9.Future> getAvailableBiometrics() => (super.noSuchMethod( Invocation.method( #getAvailableBiometrics, [], ), returnValue: - _i8.Future>.value(<_i10.BiometricType>[]), - ) as _i8.Future>); + _i9.Future>.value(<_i11.BiometricType>[]), + ) as _i9.Future>); } /// A class which mocks [Biometrics]. /// /// See the documentation for Mockito's code generation for more information. -class MockBiometrics extends _i1.Mock implements _i12.Biometrics { +class MockBiometrics extends _i1.Mock implements _i13.Biometrics { MockBiometrics() { _i1.throwOnMissingStub(this); } @override - _i8.Future authenticate({ + _i9.Future authenticate({ required String? cancelButtonText, required String? localizedReason, required String? title, @@ -310,28 +321,28 @@ class MockBiometrics extends _i1.Mock implements _i12.Biometrics { #title: title, }, ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); } /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i13.WalletsService { +class MockWalletsService extends _i1.Mock implements _i14.WalletsService { @override - _i8.Future> get walletNames => + _i9.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i8.Future>.value( - {}), - ) as _i8.Future>); + returnValue: _i9.Future>.value( + {}), + ) as _i9.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future renameWallet({ + _i9.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -346,21 +357,21 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i8.Future addExistingStackWallet({ + _i9.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i9.Coin? coin, + required _i10.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -374,13 +385,13 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future addNewWallet({ + _i9.Future addNewWallet({ required String? name, - required _i9.Coin? coin, + required _i10.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -393,46 +404,46 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i9.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i8.Future saveFavoriteWalletIds(List? walletIds) => + _i9.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i9.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i9.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future moveFavorite({ + _i9.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -445,48 +456,48 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i9.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i9.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future isMnemonicVerified({required String? walletId}) => + _i9.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future setMnemonicVerified({required String? walletId}) => + _i9.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future deleteWallet( + _i9.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -498,20 +509,20 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i8.Future refreshWallets(bool? shouldNotifyListeners) => + _i9.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -519,7 +530,7 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -547,7 +558,7 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i15.Manager { +class MockManager extends _i1.Mock implements _i16.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -575,10 +586,10 @@ class MockManager extends _i1.Mock implements _i15.Manager { returnValue: false, ) as bool); @override - _i9.Coin get coin => (super.noSuchMethod( + _i10.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin, - ) as _i9.Coin); + returnValue: _i10.Coin.bitcoin, + ) as _i10.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -611,23 +622,23 @@ class MockManager extends _i1.Mock implements _i15.Manager { returnValueForMissingStub: null, ); @override - _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + _i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2( this, Invocation.getter(#fees), )), - ) as _i8.Future<_i4.FeeObject>); + ) as _i9.Future<_i4.FeeObject>); @override - _i8.Future get maxFee => (super.noSuchMethod( + _i9.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i8.Future get currentReceivingAddress => (super.noSuchMethod( + _i9.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override _i5.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -637,16 +648,16 @@ class MockManager extends _i1.Mock implements _i15.Manager { ), ) as _i5.Balance); @override - _i8.Future> get transactions => (super.noSuchMethod( + _i9.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i8.Future>.value(<_i16.Transaction>[]), - ) as _i8.Future>); + _i9.Future>.value(<_i17.Transaction>[]), + ) as _i9.Future>); @override - _i8.Future> get utxos => (super.noSuchMethod( + _i9.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i8.Future>.value(<_i16.UTXO>[]), - ) as _i8.Future>); + returnValue: _i9.Future>.value(<_i17.UTXO>[]), + ) as _i9.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -666,15 +677,15 @@ class MockManager extends _i1.Mock implements _i15.Manager { returnValue: '', ) as String); @override - _i8.Future> get mnemonic => (super.noSuchMethod( + _i9.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i8.Future get mnemonicPassphrase => (super.noSuchMethod( + _i9.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -711,19 +722,29 @@ class MockManager extends _i1.Mock implements _i15.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i9.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i9.Future.value(''), + ) as _i9.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i9.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -733,9 +754,9 @@ class MockManager extends _i1.Mock implements _i15.Manager { returnValueForMissingStub: null, ); @override - _i8.Future> prepareSend({ + _i9.Future> prepareSend({ required String? address, - required int? amount, + required _i6.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -744,32 +765,32 @@ class MockManager extends _i1.Mock implements _i15.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i8.Future>.value({}), - ) as _i8.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i8.Future confirmSend({required Map? txData}) => + _i9.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i8.Future.value(''), - ) as _i8.Future); + returnValue: _i9.Future.value(''), + ) as _i9.Future); @override - _i8.Future refresh() => (super.noSuchMethod( + _i9.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -779,33 +800,33 @@ class MockManager extends _i1.Mock implements _i15.Manager { returnValue: false, ) as bool); @override - _i8.Future testNetworkConnection() => (super.noSuchMethod( + _i9.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future initializeNew() => (super.noSuchMethod( + _i9.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future initializeExisting() => (super.noSuchMethod( + _i9.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future recoverFromMnemonic({ + _i9.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -824,20 +845,20 @@ class MockManager extends _i1.Mock implements _i15.Manager { #height: height, }, ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future exitCurrentWallet() => (super.noSuchMethod( + _i9.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future fullRescan( + _i9.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -849,43 +870,52 @@ class MockManager extends _i1.Mock implements _i15.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i8.Future estimateFeeFor( - int? satoshiAmount, + _i9.Future<_i6.Amount> estimateFeeFor( + _i6.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i9.Future<_i6.Amount>); @override - _i8.Future generateNewAddress() => (super.noSuchMethod( + _i9.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i8.Future resetRescanOnOpen() => (super.noSuchMethod( + _i9.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -893,7 +923,7 @@ class MockManager extends _i1.Mock implements _i15.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 d42f9998a..d918b1684 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 @@ -3,17 +3,18 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:ui' as _i8; +import 'dart:async' as _i7; +import 'dart:ui' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i9; -import 'package:stackwallet/services/wallets_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; +import 'package:stackwallet/services/coins/manager.dart' as _i10; +import 'package:stackwallet/services/wallets_service.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -57,24 +58,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i5.WalletsService { +class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override - _i6.Future> get walletNames => + _i7.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i6.Future>.value( - {}), - ) as _i6.Future>); + returnValue: _i7.Future>.value( + {}), + ) as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future renameWallet({ + _i7.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -89,21 +100,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i6.Future addExistingStackWallet({ + _i7.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -117,13 +128,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addNewWallet({ + _i7.Future addNewWallet({ required String? name, - required _i7.Coin? coin, + required _i8.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -136,46 +147,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future moveFavorite({ + _i7.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -188,48 +199,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future isMnemonicVerified({required String? walletId}) => + _i7.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future setMnemonicVerified({required String? walletId}) => + _i7.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteWallet( + _i7.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -241,20 +252,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => + _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -262,7 +273,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -290,7 +301,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i9.Manager { +class MockManager extends _i1.Mock implements _i10.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -318,10 +329,10 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i7.Coin get coin => (super.noSuchMethod( + _i8.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin, - ) as _i7.Coin); + returnValue: _i8.Coin.bitcoin, + ) as _i8.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -354,23 +365,23 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i6.Future<_i3.FeeObject>); + ) as _i7.Future<_i3.FeeObject>); @override - _i6.Future get maxFee => (super.noSuchMethod( + _i7.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future.value(0), + ) as _i7.Future); @override - _i6.Future get currentReceivingAddress => (super.noSuchMethod( + _i7.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -380,16 +391,16 @@ class MockManager extends _i1.Mock implements _i9.Manager { ), ) as _i4.Balance); @override - _i6.Future> get transactions => (super.noSuchMethod( + _i7.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i6.Future>.value(<_i10.Transaction>[]), - ) as _i6.Future>); + _i7.Future>.value(<_i11.Transaction>[]), + ) as _i7.Future>); @override - _i6.Future> get utxos => (super.noSuchMethod( + _i7.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i6.Future>.value(<_i10.UTXO>[]), - ) as _i6.Future>); + returnValue: _i7.Future>.value(<_i11.UTXO>[]), + ) as _i7.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -409,15 +420,15 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: '', ) as String); @override - _i6.Future> get mnemonic => (super.noSuchMethod( + _i7.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); @override - _i6.Future get mnemonicPassphrase => (super.noSuchMethod( + _i7.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + ) as _i7.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -454,19 +465,29 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i7.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -476,9 +497,9 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - _i6.Future> prepareSend({ + _i7.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -487,32 +508,32 @@ class MockManager extends _i1.Mock implements _i9.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i7.Future>.value({}), + ) as _i7.Future>); @override - _i6.Future confirmSend({required Map? txData}) => + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i6.Future.value(''), - ) as _i6.Future); + returnValue: _i7.Future.value(''), + ) as _i7.Future); @override - _i6.Future refresh() => (super.noSuchMethod( + _i7.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -522,33 +543,33 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override - _i6.Future testNetworkConnection() => (super.noSuchMethod( + _i7.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future initializeNew() => (super.noSuchMethod( + _i7.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future initializeExisting() => (super.noSuchMethod( + _i7.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future recoverFromMnemonic({ + _i7.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -567,20 +588,20 @@ class MockManager extends _i1.Mock implements _i9.Manager { #height: height, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future exitCurrentWallet() => (super.noSuchMethod( + _i7.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future fullRescan( + _i7.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -592,43 +613,52 @@ class MockManager extends _i1.Mock implements _i9.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future estimateFeeFor( - int? satoshiAmount, + _i7.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i7.Future<_i5.Amount>); @override - _i6.Future generateNewAddress() => (super.noSuchMethod( + _i7.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future resetRescanOnOpen() => (super.noSuchMethod( + _i7.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -636,7 +666,7 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 665b0333b..52c9776df 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 @@ -3,18 +3,19 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/services/locale_service.dart' as _i11; -import 'package:stackwallet/services/notes_service.dart' as _i10; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/locale_service.dart' as _i12; +import 'package:stackwallet/services/notes_service.dart' as _i11; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -58,10 +59,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { +class MockManager extends _i1.Mock implements _i6.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -89,10 +100,10 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i6.Coin get coin => (super.noSuchMethod( + _i7.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin, - ) as _i6.Coin); + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -125,23 +136,23 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i3.FeeObject>); + ) as _i8.Future<_i3.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -151,16 +162,16 @@ class MockManager extends _i1.Mock implements _i5.Manager { ), ) as _i4.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i8.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i9.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i8.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i9.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -180,15 +191,15 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -225,19 +236,29 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -247,9 +268,9 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -258,32 +279,32 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -293,33 +314,33 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -338,20 +359,20 @@ class MockManager extends _i1.Mock implements _i5.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -363,43 +384,52 @@ class MockManager extends _i1.Mock implements _i5.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i5.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -407,7 +437,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -427,7 +457,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i10.NotesService { +class MockNotesService extends _i1.Mock implements _i11.NotesService { @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), @@ -439,34 +469,34 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { returnValue: {}, ) as Map); @override - _i7.Future> get notes => (super.noSuchMethod( + _i8.Future> get notes => (super.noSuchMethod( Invocation.getter(#notes), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future> search(String? text) => (super.noSuchMethod( + _i8.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + _i8.Future getNoteFor({required String? txid}) => (super.noSuchMethod( Invocation.method( #getNoteFor, [], {#txid: txid}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future editOrAddNote({ + _i8.Future editOrAddNote({ required String? txid, required String? note, }) => @@ -479,21 +509,21 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { #note: note, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + _i8.Future deleteNote({required String? txid}) => (super.noSuchMethod( Invocation.method( #deleteNote, [], {#txid: txid}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -501,7 +531,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -529,7 +559,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i11.LocaleService { +class MockLocaleService extends _i1.Mock implements _i12.LocaleService { @override String get locale => (super.noSuchMethod( Invocation.getter(#locale), @@ -541,17 +571,17 @@ class MockLocaleService extends _i1.Mock implements _i11.LocaleService { returnValue: false, ) as bool); @override - _i7.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i8.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -559,7 +589,7 @@ class MockLocaleService extends _i1.Mock implements _i11.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 d1190a181..245da71d8 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 @@ -3,17 +3,18 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/services/notes_service.dart' as _i10; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/notes_service.dart' as _i11; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -57,10 +58,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { +class MockManager extends _i1.Mock implements _i6.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -88,10 +99,10 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i6.Coin get coin => (super.noSuchMethod( + _i7.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin, - ) as _i6.Coin); + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -124,23 +135,23 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i3.FeeObject>); + ) as _i8.Future<_i3.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -150,16 +161,16 @@ class MockManager extends _i1.Mock implements _i5.Manager { ), ) as _i4.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i8.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i9.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i8.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i9.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -179,15 +190,15 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -224,19 +235,29 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -246,9 +267,9 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -257,32 +278,32 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -292,33 +313,33 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -337,20 +358,20 @@ class MockManager extends _i1.Mock implements _i5.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -362,43 +383,52 @@ class MockManager extends _i1.Mock implements _i5.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i5.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -406,7 +436,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -426,7 +456,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i10.NotesService { +class MockNotesService extends _i1.Mock implements _i11.NotesService { @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), @@ -438,34 +468,34 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { returnValue: {}, ) as Map); @override - _i7.Future> get notes => (super.noSuchMethod( + _i8.Future> get notes => (super.noSuchMethod( Invocation.getter(#notes), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future> search(String? text) => (super.noSuchMethod( + _i8.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + _i8.Future getNoteFor({required String? txid}) => (super.noSuchMethod( Invocation.method( #getNoteFor, [], {#txid: txid}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future editOrAddNote({ + _i8.Future editOrAddNote({ required String? txid, required String? note, }) => @@ -478,21 +508,21 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { #note: note, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + _i8.Future deleteNote({required String? txid}) => (super.noSuchMethod( Invocation.method( #deleteNote, [], {#txid: txid}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -500,7 +530,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 b542dc860..57de0b1b7 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 @@ -3,16 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { +class MockManager extends _i1.Mock implements _i6.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i6.Coin get coin => (super.noSuchMethod( + _i7.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin, - ) as _i6.Coin); + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i3.FeeObject>); + ) as _i8.Future<_i3.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager { ), ) as _i4.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i8.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i9.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i8.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i9.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i5.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 d0a586e2e..48dc8f554 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 @@ -3,19 +3,20 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i11; +import 'dart:async' as _i8; +import 'dart:ui' as _i12; import 'package:barcode_scan2/barcode_scan2.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i5; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11; import 'package:stackwallet/models/models.dart' as _i4; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i8; -import 'package:stackwallet/services/notes_service.dart' as _i12; -import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i6; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; +import 'package:stackwallet/services/coins/manager.dart' as _i9; +import 'package:stackwallet/services/notes_service.dart' as _i13; +import 'package:stackwallet/utilities/amount/amount.dart' as _i6; +import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i7; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -69,17 +70,27 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance { ); } +class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount { + _FakeAmount_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [BarcodeScannerWrapper]. /// /// See the documentation for Mockito's code generation for more information. class MockBarcodeScannerWrapper extends _i1.Mock - implements _i6.BarcodeScannerWrapper { + implements _i7.BarcodeScannerWrapper { MockBarcodeScannerWrapper() { _i1.throwOnMissingStub(this); } @override - _i7.Future<_i2.ScanResult> scan( + _i8.Future<_i2.ScanResult> scan( {_i2.ScanOptions? options = const _i2.ScanOptions()}) => (super.noSuchMethod( Invocation.method( @@ -87,7 +98,7 @@ class MockBarcodeScannerWrapper extends _i1.Mock [], {#options: options}, ), - returnValue: _i7.Future<_i2.ScanResult>.value(_FakeScanResult_0( + returnValue: _i8.Future<_i2.ScanResult>.value(_FakeScanResult_0( this, Invocation.method( #scan, @@ -95,13 +106,13 @@ class MockBarcodeScannerWrapper extends _i1.Mock {#options: options}, ), )), - ) as _i7.Future<_i2.ScanResult>); + ) as _i8.Future<_i2.ScanResult>); } /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i8.Manager { +class MockManager extends _i1.Mock implements _i9.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -129,10 +140,10 @@ class MockManager extends _i1.Mock implements _i8.Manager { returnValue: false, ) as bool); @override - _i9.Coin get coin => (super.noSuchMethod( + _i10.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin, - ) as _i9.Coin); + returnValue: _i10.Coin.bitcoin, + ) as _i10.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -165,23 +176,23 @@ class MockManager extends _i1.Mock implements _i8.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i4.FeeObject>); + ) as _i8.Future<_i4.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i5.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -191,16 +202,16 @@ class MockManager extends _i1.Mock implements _i8.Manager { ), ) as _i5.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i10.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i11.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i10.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i11.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -220,15 +231,15 @@ class MockManager extends _i1.Mock implements _i8.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -265,19 +276,29 @@ class MockManager extends _i1.Mock implements _i8.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -287,9 +308,9 @@ class MockManager extends _i1.Mock implements _i8.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i6.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -298,32 +319,32 @@ class MockManager extends _i1.Mock implements _i8.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -333,33 +354,33 @@ class MockManager extends _i1.Mock implements _i8.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -378,20 +399,20 @@ class MockManager extends _i1.Mock implements _i8.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -403,43 +424,52 @@ class MockManager extends _i1.Mock implements _i8.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i6.Amount> estimateFeeFor( + _i6.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i6.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -447,7 +477,7 @@ class MockManager extends _i1.Mock implements _i8.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -467,7 +497,7 @@ class MockManager extends _i1.Mock implements _i8.Manager { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i12.NotesService { +class MockNotesService extends _i1.Mock implements _i13.NotesService { @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), @@ -479,34 +509,34 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService { returnValue: {}, ) as Map); @override - _i7.Future> get notes => (super.noSuchMethod( + _i8.Future> get notes => (super.noSuchMethod( Invocation.getter(#notes), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future> search(String? text) => (super.noSuchMethod( + _i8.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + _i8.Future getNoteFor({required String? txid}) => (super.noSuchMethod( Invocation.method( #getNoteFor, [], {#txid: txid}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future editOrAddNote({ + _i8.Future editOrAddNote({ required String? txid, required String? note, }) => @@ -519,21 +549,21 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService { #note: note, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + _i8.Future deleteNote({required String? txid}) => (super.noSuchMethod( Invocation.method( #deleteNote, [], {#txid: txid}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -541,7 +571,7 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService { returnValueForMissingStub: null, ); @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], 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 71a400d4c..190da405c 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 @@ -3,18 +3,19 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/balance.dart' as _i4; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9; import 'package:stackwallet/models/models.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/services/locale_service.dart' as _i11; -import 'package:stackwallet/services/notes_service.dart' as _i10; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/locale_service.dart' as _i12; +import 'package:stackwallet/services/notes_service.dart' as _i11; +import 'package:stackwallet/utilities/amount/amount.dart' as _i5; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -58,10 +59,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance { ); } +class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount { + _FakeAmount_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { +class MockManager extends _i1.Mock implements _i6.Manager { @override bool get isActiveWallet => (super.noSuchMethod( Invocation.getter(#isActiveWallet), @@ -89,10 +100,10 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i6.Coin get coin => (super.noSuchMethod( + _i7.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin, - ) as _i6.Coin); + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -125,23 +136,23 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i7.Future<_i3.FeeObject>); + ) as _i8.Future<_i3.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod( + _i8.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i7.Future get currentReceivingAddress => (super.noSuchMethod( + _i8.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i4.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -151,16 +162,16 @@ class MockManager extends _i1.Mock implements _i5.Manager { ), ) as _i4.Balance); @override - _i7.Future> get transactions => (super.noSuchMethod( + _i8.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i7.Future>.value(<_i8.Transaction>[]), - ) as _i7.Future>); + _i8.Future>.value(<_i9.Transaction>[]), + ) as _i8.Future>); @override - _i7.Future> get utxos => (super.noSuchMethod( + _i8.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i7.Future>.value(<_i8.UTXO>[]), - ) as _i7.Future>); + returnValue: _i8.Future>.value(<_i9.UTXO>[]), + ) as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -180,15 +191,15 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: '', ) as String); @override - _i7.Future> get mnemonic => (super.noSuchMethod( + _i8.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i7.Future get mnemonicPassphrase => (super.noSuchMethod( + _i8.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -225,19 +236,29 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i8.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -247,9 +268,9 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - _i7.Future> prepareSend({ + _i8.Future> prepareSend({ required String? address, - required int? amount, + required _i5.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -258,32 +279,32 @@ class MockManager extends _i1.Mock implements _i5.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future confirmSend({required Map? txData}) => + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future refresh() => (super.noSuchMethod( + _i8.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -293,33 +314,33 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override - _i7.Future testNetworkConnection() => (super.noSuchMethod( + _i8.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future initializeNew() => (super.noSuchMethod( + _i8.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future initializeExisting() => (super.noSuchMethod( + _i8.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future recoverFromMnemonic({ + _i8.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -338,20 +359,20 @@ class MockManager extends _i1.Mock implements _i5.Manager { #height: height, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future exitCurrentWallet() => (super.noSuchMethod( + _i8.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -363,43 +384,52 @@ class MockManager extends _i1.Mock implements _i5.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future estimateFeeFor( - int? satoshiAmount, + _i8.Future<_i5.Amount> estimateFeeFor( + _i5.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i8.Future<_i5.Amount>); @override - _i7.Future generateNewAddress() => (super.noSuchMethod( + _i8.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i7.Future resetRescanOnOpen() => (super.noSuchMethod( + _i8.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -407,7 +437,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -427,7 +457,7 @@ class MockManager extends _i1.Mock implements _i5.Manager { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i10.NotesService { +class MockNotesService extends _i1.Mock implements _i11.NotesService { @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), @@ -439,34 +469,34 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { returnValue: {}, ) as Map); @override - _i7.Future> get notes => (super.noSuchMethod( + _i8.Future> get notes => (super.noSuchMethod( Invocation.getter(#notes), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i7.Future> search(String? text) => (super.noSuchMethod( + _i8.Future> search(String? text) => (super.noSuchMethod( Invocation.method( #search, [text], ), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + _i8.Future getNoteFor({required String? txid}) => (super.noSuchMethod( Invocation.method( #getNoteFor, [], {#txid: txid}, ), - returnValue: _i7.Future.value(''), - ) as _i7.Future); + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override - _i7.Future editOrAddNote({ + _i8.Future editOrAddNote({ required String? txid, required String? note, }) => @@ -479,21 +509,21 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { #note: note, }, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + _i8.Future deleteNote({required String? txid}) => (super.noSuchMethod( Invocation.method( #deleteNote, [], {#txid: txid}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -501,7 +531,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -529,7 +559,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i11.LocaleService { +class MockLocaleService extends _i1.Mock implements _i12.LocaleService { @override String get locale => (super.noSuchMethod( Invocation.getter(#locale), @@ -541,17 +571,17 @@ class MockLocaleService extends _i1.Mock implements _i11.LocaleService { returnValue: false, ) as bool); @override - _i7.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i8.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -559,7 +589,7 @@ class MockLocaleService extends _i1.Mock implements _i11.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], diff --git a/test/services/coins/fake_coin_service_api.dart b/test/services/coins/fake_coin_service_api.dart index 9f522d822..ea70545d1 100644 --- a/test/services/coins/fake_coin_service_api.dart +++ b/test/services/coins/fake_coin_service_api.dart @@ -3,6 +3,7 @@ import 'package:stackwallet/models/isar/models/blockchain_data/transaction.dart' import 'package:stackwallet/models/isar/models/blockchain_data/utxo.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/services/coins/coin_service.dart'; +import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; class FakeCoinServiceAPI extends CoinServiceAPI { @@ -71,7 +72,7 @@ class FakeCoinServiceAPI extends CoinServiceAPI { } @override - Future estimateFeeFor(int satoshiAmount, int feeRate) { + Future estimateFeeFor(Amount amount, int feeRate) { // TODO: implement estimateFeeFor throw UnimplementedError(); } @@ -103,7 +104,7 @@ class FakeCoinServiceAPI extends CoinServiceAPI { @override Future> prepareSend( {required String address, - required int amount, + required Amount amount, Map? args}) { // TODO: implement prepareSend throw UnimplementedError(); diff --git a/test/services/coins/manager_test.dart b/test/services/coins/manager_test.dart index d4a8f9969..6704294b0 100644 --- a/test/services/coins/manager_test.dart +++ b/test/services/coins/manager_test.dart @@ -1,3 +1,4 @@ +import 'package:decimal/decimal.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; @@ -13,6 +14,13 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'manager_test.mocks.dart'; +/// quick amount constructor wrapper. Using an int is bad practice but for +/// testing with small amounts this should be fine +Amount _a(int i) => Amount.fromDecimal( + Decimal.fromInt(i), + fractionDigits: 8, + ); + @GenerateMocks([FiroWallet, ElectrumX]) void main() { test("Manager should have a backgroundRefreshListener on initialization", () { @@ -79,20 +87,20 @@ void main() { when(wallet.balance).thenAnswer( (_) => Balance( coin: Coin.firo, - total: 10, - spendable: 1, - blockedTotal: 0, - pendingSpendable: 9, + total: _a(10), + spendable: _a(1), + blockedTotal: _a(0), + pendingSpendable: _a(9), ), ); final manager = Manager(wallet); expect(manager.balance.coin, Coin.firo); - expect(manager.balance.total, 10); - expect(manager.balance.spendable, 1); - expect(manager.balance.blockedTotal, 0); - expect(manager.balance.pendingSpendable, 9); + expect(manager.balance.total.raw.toInt(), 10); + expect(manager.balance.spendable.raw.toInt(), 1); + expect(manager.balance.blockedTotal.raw.toInt(), 0); + expect(manager.balance.pendingSpendable.raw.toInt(), 9); }); }); diff --git a/test/services/coins/manager_test.mocks.dart b/test/services/coins/manager_test.mocks.dart index e85f304ce..2319e31ba 100644 --- a/test/services/coins/manager_test.mocks.dart +++ b/test/services/coins/manager_test.mocks.dart @@ -3,22 +3,23 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i10; +import 'dart:async' as _i11; -import 'package:decimal/decimal.dart' as _i8; +import 'package:decimal/decimal.dart' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/db/isar/main_db.dart' as _i7; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4; import 'package:stackwallet/models/balance.dart' as _i6; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i12; -import 'package:stackwallet/models/lelantus_coin.dart' as _i14; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13; +import 'package:stackwallet/models/lelantus_coin.dart' as _i15; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i3; -import 'package:stackwallet/models/signing_data.dart' as _i13; -import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as _i9; +import 'package:stackwallet/models/signing_data.dart' as _i14; +import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as _i10; import 'package:stackwallet/services/transaction_notification_tracker.dart' as _i2; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i11; +import 'package:stackwallet/utilities/amount/amount.dart' as _i8; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i12; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -93,8 +94,18 @@ class _FakeMainDB_5 extends _i1.SmartFake implements _i7.MainDB { ); } -class _FakeDecimal_6 extends _i1.SmartFake implements _i8.Decimal { - _FakeDecimal_6( +class _FakeAmount_6 extends _i1.SmartFake implements _i8.Amount { + _FakeAmount_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDecimal_7 extends _i1.SmartFake implements _i9.Decimal { + _FakeDecimal_7( Object parent, Invocation parentInvocation, ) : super( @@ -106,13 +117,13 @@ class _FakeDecimal_6 extends _i1.SmartFake implements _i8.Decimal { /// A class which mocks [FiroWallet]. /// /// See the documentation for Mockito's code generation for more information. -class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { +class MockFiroWallet extends _i1.Mock implements _i10.FiroWallet { MockFiroWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i10.Timer? _timer) => super.noSuchMethod( + set timer(_i11.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -202,48 +213,48 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValue: false, ) as bool); @override - _i11.Coin get coin => (super.noSuchMethod( + _i12.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i11.Coin.bitcoin, - ) as _i11.Coin); + returnValue: _i12.Coin.bitcoin, + ) as _i12.Coin); @override - _i10.Future> get mnemonic => (super.noSuchMethod( + _i11.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i10.Future>.value([]), - ) as _i10.Future>); + returnValue: _i11.Future>.value([]), + ) as _i11.Future>); @override - _i10.Future get mnemonicString => (super.noSuchMethod( + _i11.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future get mnemonicPassphrase => (super.noSuchMethod( + _i11.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future get maxFee => (super.noSuchMethod( + _i11.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i10.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + _i11.Future<_i3.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i10.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + returnValue: _i11.Future<_i3.FeeObject>.value(_FakeFeeObject_1( this, Invocation.getter(#fees), )), - ) as _i10.Future<_i3.FeeObject>); + ) as _i11.Future<_i3.FeeObject>); @override - _i10.Future get currentReceivingAddress => (super.noSuchMethod( + _i11.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i10.Future.value(''), - ) as _i10.Future); + returnValue: _i11.Future.value(''), + ) as _i11.Future); @override - _i10.Future get currentChangeAddress => (super.noSuchMethod( + _i11.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i10.Future.value(''), - ) as _i10.Future); + returnValue: _i11.Future.value(''), + ) as _i11.Future); @override String get walletName => (super.noSuchMethod( Invocation.getter(#walletName), @@ -294,10 +305,10 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValue: false, ) as bool); @override - _i10.Future get chainHeight => (super.noSuchMethod( + _i11.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -320,16 +331,21 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { ), ) as _i6.Balance); @override - _i10.Future> get utxos => (super.noSuchMethod( + _i11.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i10.Future>.value(<_i12.UTXO>[]), - ) as _i10.Future>); + returnValue: _i11.Future>.value(<_i13.UTXO>[]), + ) as _i11.Future>); @override - _i10.Future> get transactions => (super.noSuchMethod( + _i11.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i10.Future>.value(<_i12.Transaction>[]), - ) as _i10.Future>); + _i11.Future>.value(<_i13.Transaction>[]), + ) as _i11.Future>); + @override + _i11.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i11.Future.value(''), + ) as _i11.Future); @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -356,23 +372,23 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValue: false, ) as bool); @override - _i10.Future updateSentCachedTxData(Map? txData) => + _i11.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future testNetworkConnection() => (super.noSuchMethod( + _i11.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -390,9 +406,9 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValueForMissingStub: null, ); @override - _i10.Future> prepareSendPublic({ + _i11.Future> prepareSendPublic({ required String? address, - required int? amount, + required _i8.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -401,27 +417,27 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future confirmSendPublic({dynamic txData}) => + _i11.Future confirmSendPublic({dynamic txData}) => (super.noSuchMethod( Invocation.method( #confirmSendPublic, [], {#txData: txData}, ), - returnValue: _i10.Future.value(''), - ) as _i10.Future); + returnValue: _i11.Future.value(''), + ) as _i11.Future); @override - _i10.Future> prepareSend({ + _i11.Future> prepareSend({ required String? address, - required int? amount, + required _i8.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -430,23 +446,23 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future confirmSend({required Map? txData}) => + _i11.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i10.Future.value(''), - ) as _i10.Future); + returnValue: _i11.Future.value(''), + ) as _i11.Future); @override int estimateTxFee({ required int? vSize, @@ -470,7 +486,7 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { String? _recipientAddress, bool? isSendAll, { int? additionalOutputs = 0, - List<_i12.UTXO>? utxos, + List<_i13.UTXO>? utxos, }) => super.noSuchMethod(Invocation.method( #coinSelection, @@ -486,19 +502,19 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { }, )); @override - _i10.Future> fetchBuildTxData( - List<_i12.UTXO>? utxosToUse) => + _i11.Future> fetchBuildTxData( + List<_i13.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( #fetchBuildTxData, [utxosToUse], ), returnValue: - _i10.Future>.value(<_i13.SigningData>[]), - ) as _i10.Future>); + _i11.Future>.value(<_i14.SigningData>[]), + ) as _i11.Future>); @override - _i10.Future> buildTransaction({ - required List<_i13.SigningData>? utxoSigningData, + _i11.Future> buildTransaction({ + required List<_i14.SigningData>? utxoSigningData, required List? recipients, required List? satoshiAmounts, }) => @@ -513,100 +529,100 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { }, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i11.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future initializeNew() => (super.noSuchMethod( + _i11.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future initializeExisting() => (super.noSuchMethod( + _i11.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i11.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i10.Future getAllTxsToWatch() => (super.noSuchMethod( + _i11.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future refresh() => (super.noSuchMethod( + _i11.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - List> getLelantusCoinMap() => + List> getLelantusCoinMap() => (super.noSuchMethod( Invocation.method( #getLelantusCoinMap, [], ), - returnValue: >[], - ) as List>); + returnValue: >[], + ) as List>); @override - _i10.Future anonymizeAllPublicFunds() => (super.noSuchMethod( + _i11.Future anonymizeAllPublicFunds() => (super.noSuchMethod( Invocation.method( #anonymizeAllPublicFunds, [], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future>> createMintsFromAmount(int? total) => + _i11.Future>> createMintsFromAmount(int? total) => (super.noSuchMethod( Invocation.method( #createMintsFromAmount, [total], ), - returnValue: _i10.Future>>.value( + returnValue: _i11.Future>>.value( >[]), - ) as _i10.Future>>); + ) as _i11.Future>>); @override - _i10.Future submitHexToNetwork(String? hex) => (super.noSuchMethod( + _i11.Future submitHexToNetwork(String? hex) => (super.noSuchMethod( Invocation.method( #submitHexToNetwork, [hex], ), - returnValue: _i10.Future.value(''), - ) as _i10.Future); + returnValue: _i11.Future.value(''), + ) as _i11.Future); @override - _i10.Future> buildMintTransaction( - List<_i12.UTXO>? utxosToUse, + _i11.Future> buildMintTransaction( + List<_i13.UTXO>? utxosToUse, int? satoshisPerRecipient, List>? mintsMap, ) => @@ -620,29 +636,29 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { ], ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future checkReceivingAddressForTransactions() => + _i11.Future checkReceivingAddressForTransactions() => (super.noSuchMethod( Invocation.method( #checkReceivingAddressForTransactions, [], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future checkChangeAddressForTransactions() => (super.noSuchMethod( + _i11.Future checkChangeAddressForTransactions() => (super.noSuchMethod( Invocation.method( #checkChangeAddressForTransactions, [], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future fillAddresses( + _i11.Future fillAddresses( String? suppliedMnemonic, String? mnemonicPassphrase, { int? perBatch = 50, @@ -660,11 +676,11 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { #numberOfThreads: numberOfThreads, }, ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future fullRescan( + _i11.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -676,11 +692,11 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future recoverFromMnemonic({ + _i11.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -699,103 +715,121 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { #height: height, }, ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future> getSetDataMap(int? latestSetId) => + _i11.Future> getSetDataMap(int? latestSetId) => (super.noSuchMethod( Invocation.method( #getSetDataMap, [latestSetId], ), - returnValue: _i10.Future>.value({}), - ) as _i10.Future>); + returnValue: _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future>> fetchAnonymitySets() => + _i11.Future>> fetchAnonymitySets() => (super.noSuchMethod( Invocation.method( #fetchAnonymitySets, [], ), - returnValue: _i10.Future>>.value( + returnValue: _i11.Future>>.value( >[]), - ) as _i10.Future>>); + ) as _i11.Future>>); @override - _i10.Future getLatestSetId() => (super.noSuchMethod( + _i11.Future getLatestSetId() => (super.noSuchMethod( Invocation.method( #getLatestSetId, [], ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i10.Future> getUsedCoinSerials() => (super.noSuchMethod( + _i11.Future> getUsedCoinSerials() => (super.noSuchMethod( Invocation.method( #getUsedCoinSerials, [], ), - returnValue: _i10.Future>.value([]), - ) as _i10.Future>); + returnValue: _i11.Future>.value([]), + ) as _i11.Future>); @override - _i10.Future exit() => (super.noSuchMethod( + _i11.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future getCoinsToJoinSplit(int? required) => + _i11.Future getCoinsToJoinSplit(int? required) => (super.noSuchMethod( Invocation.method( #getCoinsToJoinSplit, [required], ), - returnValue: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future estimateJoinSplitFee(int? spendAmount) => + _i11.Future estimateJoinSplitFee(int? spendAmount) => (super.noSuchMethod( Invocation.method( #estimateJoinSplitFee, [spendAmount], ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i10.Future estimateFeeFor( - int? satoshiAmount, + _i11.Future<_i8.Amount> estimateFeeFor( + _i8.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + returnValue: _i11.Future<_i8.Amount>.value(_FakeAmount_6( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i11.Future<_i8.Amount>); @override - _i10.Future estimateFeeForPublic( - int? satoshiAmount, + _i11.Future<_i8.Amount> estimateFeeForPublic( + _i8.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeForPublic, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + returnValue: _i11.Future<_i8.Amount>.value(_FakeAmount_6( + this, + Invocation.method( + #estimateFeeForPublic, + [ + amount, + feeRate, + ], + ), + )), + ) as _i11.Future<_i8.Amount>); @override - int roughFeeEstimate( + _i8.Amount roughFeeEstimate( int? inputCount, int? outputCount, int? feeRatePerKB, @@ -809,32 +843,48 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { feeRatePerKB, ], ), - returnValue: 0, - ) as int); + returnValue: _FakeAmount_6( + this, + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + ), + ) as _i8.Amount); @override - _i10.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i11.Future<_i8.Amount> sweepAllEstimate(int? feeRate) => (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + returnValue: _i11.Future<_i8.Amount>.value(_FakeAmount_6( + this, + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + )), + ) as _i11.Future<_i8.Amount>); @override - _i10.Future>> fastFetch( + _i11.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i10.Future>>.value( + returnValue: _i11.Future>>.value( >[]), - ) as _i10.Future>>); + ) as _i11.Future>>); @override - _i10.Future> getJMintTransactions( + _i11.Future> getJMintTransactions( _i5.CachedElectrumX? cachedClient, List? transactions, - _i11.Coin? coin, + _i12.Coin? coin, ) => (super.noSuchMethod( Invocation.method( @@ -845,49 +895,49 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { coin, ], ), - returnValue: _i10.Future>.value( - <_i12.Address, _i12.Transaction>{}), - ) as _i10.Future>); + returnValue: _i11.Future>.value( + <_i13.Address, _i13.Transaction>{}), + ) as _i11.Future>); @override - _i10.Future generateNewAddress() => (super.noSuchMethod( + _i11.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i8.Decimal availablePrivateBalance() => (super.noSuchMethod( + _i8.Amount availablePrivateBalance() => (super.noSuchMethod( Invocation.method( #availablePrivateBalance, [], ), - returnValue: _FakeDecimal_6( + returnValue: _FakeAmount_6( this, Invocation.method( #availablePrivateBalance, [], ), ), - ) as _i8.Decimal); + ) as _i8.Amount); @override - _i8.Decimal availablePublicBalance() => (super.noSuchMethod( + _i8.Amount availablePublicBalance() => (super.noSuchMethod( Invocation.method( #availablePublicBalance, [], ), - returnValue: _FakeDecimal_6( + returnValue: _FakeAmount_6( this, Invocation.method( #availablePublicBalance, [], ), ), - ) as _i8.Decimal); + ) as _i8.Amount); @override void initCache( String? walletId, - _i11.Coin? coin, + _i12.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -900,14 +950,14 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValueForMissingStub: null, ); @override - _i10.Future updateCachedId(String? id) => (super.noSuchMethod( + _i11.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -917,14 +967,14 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValue: 0, ) as int); @override - _i10.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i11.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -934,15 +984,15 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValue: false, ) as bool); @override - _i10.Future updateCachedIsFavorite(bool? isFavorite) => + _i11.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override _i6.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -958,15 +1008,15 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { ), ) as _i6.Balance); @override - _i10.Future updateCachedBalance(_i6.Balance? balance) => + _i11.Future updateCachedBalance(_i6.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override _i6.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -982,15 +1032,15 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { ), ) as _i6.Balance); @override - _i10.Future updateCachedBalanceSecondary(_i6.Balance? balance) => + _i11.Future updateCachedBalanceSecondary(_i6.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override List getWalletTokenContractAddresses() => (super.noSuchMethod( Invocation.method( @@ -1000,16 +1050,16 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValue: [], ) as List); @override - _i10.Future updateWalletTokenContractAddresses( + _i11.Future updateWalletTokenContractAddresses( List? contractAddresses) => (super.noSuchMethod( Invocation.method( #updateWalletTokenContractAddresses, [contractAddresses], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override void initWalletDB({_i7.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1028,34 +1078,34 @@ class MockFiroWallet extends _i1.Mock implements _i9.FiroWallet { returnValueForMissingStub: null, ); @override - _i10.Future firoUpdateJIndex(List? jIndex) => + _i11.Future firoUpdateJIndex(List? jIndex) => (super.noSuchMethod( Invocation.method( #firoUpdateJIndex, [jIndex], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future firoUpdateLelantusCoins(List? lelantusCoins) => + _i11.Future firoUpdateLelantusCoins(List? lelantusCoins) => (super.noSuchMethod( Invocation.method( #firoUpdateLelantusCoins, [lelantusCoins], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod( + _i11.Future firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod( Invocation.method( #firoUpdateMintIndex, [mintIndex], ), - returnValue: _i10.Future.value(), - returnValueForMissingStub: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); } /// A class which mocks [ElectrumX]. @@ -1103,7 +1153,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { returnValue: false, ) as bool); @override - _i10.Future request({ + _i11.Future request({ required String? command, List? args = const [], Duration? connectionTimeout = const Duration(seconds: 60), @@ -1122,10 +1172,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { #retries: retries, }, ), - returnValue: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future>> batchRequest({ + _i11.Future>> batchRequest({ required String? command, required Map>? args, Duration? connectionTimeout = const Duration(seconds: 60), @@ -1142,11 +1192,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { #retries: retries, }, ), - returnValue: _i10.Future>>.value( + returnValue: _i11.Future>>.value( >[]), - ) as _i10.Future>>); + ) as _i11.Future>>); @override - _i10.Future ping({ + _i11.Future ping({ String? requestID, int? retryCount = 1, }) => @@ -1159,10 +1209,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { #retryCount: retryCount, }, ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i10.Future> getBlockHeadTip({String? requestID}) => + _i11.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( Invocation.method( #getBlockHeadTip, @@ -1170,10 +1220,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { {#requestID: requestID}, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future> getServerFeatures({String? requestID}) => + _i11.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( Invocation.method( #getServerFeatures, @@ -1181,10 +1231,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { {#requestID: requestID}, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future broadcastTransaction({ + _i11.Future broadcastTransaction({ required String? rawTx, String? requestID, }) => @@ -1197,10 +1247,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { #requestID: requestID, }, ), - returnValue: _i10.Future.value(''), - ) as _i10.Future); + returnValue: _i11.Future.value(''), + ) as _i11.Future); @override - _i10.Future> getBalance({ + _i11.Future> getBalance({ required String? scripthash, String? requestID, }) => @@ -1214,10 +1264,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { }, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future>> getHistory({ + _i11.Future>> getHistory({ required String? scripthash, String? requestID, }) => @@ -1230,11 +1280,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { #requestID: requestID, }, ), - returnValue: _i10.Future>>.value( + returnValue: _i11.Future>>.value( >[]), - ) as _i10.Future>>); + ) as _i11.Future>>); @override - _i10.Future>>> getBatchHistory( + _i11.Future>>> getBatchHistory( {required Map>? args}) => (super.noSuchMethod( Invocation.method( @@ -1242,11 +1292,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { [], {#args: args}, ), - returnValue: _i10.Future>>>.value( + returnValue: _i11.Future>>>.value( >>{}), - ) as _i10.Future>>>); + ) as _i11.Future>>>); @override - _i10.Future>> getUTXOs({ + _i11.Future>> getUTXOs({ required String? scripthash, String? requestID, }) => @@ -1259,11 +1309,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { #requestID: requestID, }, ), - returnValue: _i10.Future>>.value( + returnValue: _i11.Future>>.value( >[]), - ) as _i10.Future>>); + ) as _i11.Future>>); @override - _i10.Future>>> getBatchUTXOs( + _i11.Future>>> getBatchUTXOs( {required Map>? args}) => (super.noSuchMethod( Invocation.method( @@ -1271,11 +1321,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { [], {#args: args}, ), - returnValue: _i10.Future>>>.value( + returnValue: _i11.Future>>>.value( >>{}), - ) as _i10.Future>>>); + ) as _i11.Future>>>); @override - _i10.Future> getTransaction({ + _i11.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, @@ -1291,10 +1341,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { }, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future> getAnonymitySet({ + _i11.Future> getAnonymitySet({ String? groupId = r'1', String? blockhash = r'', String? requestID, @@ -1310,10 +1360,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { }, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future getMintData({ + _i11.Future getMintData({ dynamic mints, String? requestID, }) => @@ -1326,10 +1376,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { #requestID: requestID, }, ), - returnValue: _i10.Future.value(), - ) as _i10.Future); + returnValue: _i11.Future.value(), + ) as _i11.Future); @override - _i10.Future> getUsedCoinSerials({ + _i11.Future> getUsedCoinSerials({ String? requestID, required int? startNumber, }) => @@ -1343,19 +1393,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { }, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future getLatestCoinId({String? requestID}) => (super.noSuchMethod( + _i11.Future getLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i10.Future.value(0), - ) as _i10.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i10.Future> getFeeRate({String? requestID}) => + _i11.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( Invocation.method( #getFeeRate, @@ -1363,10 +1413,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { {#requestID: requestID}, ), returnValue: - _i10.Future>.value({}), - ) as _i10.Future>); + _i11.Future>.value({}), + ) as _i11.Future>); @override - _i10.Future<_i8.Decimal> estimateFee({ + _i11.Future<_i9.Decimal> estimateFee({ String? requestID, required int? blocks, }) => @@ -1379,7 +1429,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { #blocks: blocks, }, ), - returnValue: _i10.Future<_i8.Decimal>.value(_FakeDecimal_6( + returnValue: _i11.Future<_i9.Decimal>.value(_FakeDecimal_7( this, Invocation.method( #estimateFee, @@ -1390,15 +1440,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { }, ), )), - ) as _i10.Future<_i8.Decimal>); + ) as _i11.Future<_i9.Decimal>); @override - _i10.Future<_i8.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( + _i11.Future<_i9.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( Invocation.method( #relayFee, [], {#requestID: requestID}, ), - returnValue: _i10.Future<_i8.Decimal>.value(_FakeDecimal_6( + returnValue: _i11.Future<_i9.Decimal>.value(_FakeDecimal_7( this, Invocation.method( #relayFee, @@ -1406,5 +1456,5 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { {#requestID: requestID}, ), )), - ) as _i10.Future<_i8.Decimal>); + ) as _i11.Future<_i9.Decimal>); } diff --git a/test/widget_tests/managed_favorite_test.dart b/test/widget_tests/managed_favorite_test.dart index 2d8bedde5..351c83cee 100644 --- a/test/widget_tests/managed_favorite_test.dart +++ b/test/widget_tests/managed_favorite_test.dart @@ -1,3 +1,4 @@ +import 'package:decimal/decimal.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -12,6 +13,7 @@ import 'package:stackwallet/services/locale_service.dart'; import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/wallets.dart'; import 'package:stackwallet/services/wallets_service.dart'; +import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/listenable_list.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; @@ -20,6 +22,13 @@ import 'package:stackwallet/widgets/managed_favorite.dart'; import 'managed_favorite_test.mocks.dart'; +/// quick amount constructor wrapper. Using an int is bad practice but for +/// testing with small amounts this should be fine +Amount _a(int i) => Amount.fromDecimal( + Decimal.fromInt(i), + fractionDigits: 8, + ); + @GenerateMocks([ Wallets, WalletsService, @@ -45,10 +54,10 @@ void main() { when(manager.balance).thenAnswer( (realInvocation) => Balance( coin: Coin.bitcoin, - total: 10, - spendable: 10, - blockedTotal: 0, - pendingSpendable: 0, + total: _a(10), + spendable: _a(10), + blockedTotal: _a(0), + pendingSpendable: _a(0), ), ); @@ -98,10 +107,10 @@ void main() { when(manager.balance).thenAnswer( (realInvocation) => Balance( coin: Coin.bitcoin, - total: 10, - spendable: 10, - blockedTotal: 0, - pendingSpendable: 0, + total: _a(10), + spendable: _a(10), + blockedTotal: _a(0), + pendingSpendable: _a(0), ), ); @@ -169,10 +178,10 @@ void main() { when(manager.balance).thenAnswer( (realInvocation) => Balance( coin: Coin.bitcoin, - total: 10, - spendable: 10, - blockedTotal: 0, - pendingSpendable: 0, + total: _a(10), + spendable: _a(10), + blockedTotal: _a(0), + pendingSpendable: _a(0), ), ); diff --git a/test/widget_tests/managed_favorite_test.mocks.dart b/test/widget_tests/managed_favorite_test.mocks.dart index ebe7b3724..82e7b4b1e 100644 --- a/test/widget_tests/managed_favorite_test.mocks.dart +++ b/test/widget_tests/managed_favorite_test.mocks.dart @@ -3,12 +3,12 @@ // 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 _i23; +import 'dart:typed_data' as _i29; +import 'dart:ui' as _i25; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip32/bip32.dart' as _i17; +import 'package:bip47/bip47.dart' as _i18; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -17,25 +17,26 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12; 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 _i30; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16; +import 'package:stackwallet/models/node_model.dart' as _i31; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/models/signing_data.dart' as _i27; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i25; -import 'package:stackwallet/services/coins/coin_service.dart' as _i19; +import 'package:stackwallet/models/signing_data.dart' as _i28; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i26; +import 'package:stackwallet/services/coins/coin_service.dart' as _i20; 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 _i30; 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 _i21; 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/amount/amount.dart' as _i14; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i22; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i27; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i18; -import 'package:stackwallet/utilities/prefs.dart' as _i23; -import 'package:tuple/tuple.dart' as _i14; + as _i19; +import 'package:stackwallet/utilities/prefs.dart' as _i24; +import 'package:tuple/tuple.dart' as _i15; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -172,9 +173,8 @@ class _FakeElectrumXNode_11 extends _i1.SmartFake implements _i9.ElectrumXNode { ); } -class _FakeTuple2_12 extends _i1.SmartFake - implements _i14.Tuple2 { - _FakeTuple2_12( +class _FakeAmount_12 extends _i1.SmartFake implements _i14.Amount { + _FakeAmount_12( Object parent, Invocation parentInvocation, ) : super( @@ -183,8 +183,9 @@ class _FakeTuple2_12 extends _i1.SmartFake ); } -class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { - _FakeAddress_13( +class _FakeTuple2_13 extends _i1.SmartFake + implements _i15.Tuple2 { + _FakeTuple2_13( Object parent, Invocation parentInvocation, ) : super( @@ -193,8 +194,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( +class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address { + _FakeAddress_14( Object parent, Invocation parentInvocation, ) : super( @@ -203,8 +204,8 @@ class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { ); } -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( +class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 { + _FakeBIP32_15( Object parent, Invocation parentInvocation, ) : super( @@ -213,9 +214,8 @@ class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { ); } -class _FakeSecureStorageInterface_16 extends _i1.SmartFake - implements _i18.SecureStorageInterface { - _FakeSecureStorageInterface_16( +class _FakePaymentCode_16 extends _i1.SmartFake implements _i18.PaymentCode { + _FakePaymentCode_16( Object parent, Invocation parentInvocation, ) : super( @@ -224,9 +224,20 @@ class _FakeSecureStorageInterface_16 extends _i1.SmartFake ); } -class _FakeCoinServiceAPI_17 extends _i1.SmartFake - implements _i19.CoinServiceAPI { - _FakeCoinServiceAPI_17( +class _FakeSecureStorageInterface_17 extends _i1.SmartFake + implements _i19.SecureStorageInterface { + _FakeSecureStorageInterface_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCoinServiceAPI_18 extends _i1.SmartFake + implements _i20.CoinServiceAPI { + _FakeCoinServiceAPI_18( Object parent, Invocation parentInvocation, ) : super( @@ -238,7 +249,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 _i21.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -305,7 +316,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i21.Coin? coin}) => + List getWalletIdsFor({required _i22.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -315,21 +326,21 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValue: [], ) as List); @override - List<_i14.Tuple2<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> + List<_i15.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), returnValue: < - _i14.Tuple2<_i21.Coin, + _i15.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>[], ) as List< - _i14.Tuple2<_i21.Coin, + _i15.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i21.Coin? coin) => + _i22.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -393,17 +404,17 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - _i22.Future load(_i23.Prefs? prefs) => (super.noSuchMethod( + _i23.Future load(_i24.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future loadAfterStackRestore( - _i23.Prefs? prefs, + _i23.Future loadAfterStackRestore( + _i24.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -414,11 +425,11 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { managers, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -426,7 +437,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -452,19 +463,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i22.Future> get walletNames => + _i23.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i22.Future>.value( + returnValue: _i23.Future>.value( {}), - ) as _i22.Future>); + ) as _i23.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future renameWallet({ + _i23.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -479,8 +490,8 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( @@ -490,10 +501,10 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValue: {}, ) as Map); @override - _i22.Future addExistingStackWallet({ + _i23.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i21.Coin? coin, + required _i22.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -507,13 +518,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addNewWallet({ + _i23.Future addNewWallet({ required String? name, - required _i21.Coin? coin, + required _i22.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -526,46 +537,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i23.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future saveFavoriteWalletIds(List? walletIds) => + _i23.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i23.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i23.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future moveFavorite({ + _i23.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -578,48 +589,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i23.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i23.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future isMnemonicVerified({required String? walletId}) => + _i23.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future setMnemonicVerified({required String? walletId}) => + _i23.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future deleteWallet( + _i23.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -631,20 +642,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future refreshWallets(bool? shouldNotifyListeners) => + _i23.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -652,7 +663,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -680,13 +691,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 _i26.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i22.Timer? _timer) => super.noSuchMethod( + set timer(_i23.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -763,74 +774,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i16.UTXO>[]), + ) as _i23.Future>); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i16.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future get currentChangeAddress => (super.noSuchMethod( + _i23.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i23.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i23.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i23.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicString => (super.noSuchMethod( + _i23.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get chainHeight => (super.noSuchMethod( + _i23.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -902,6 +913,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override + _i23.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i23.Future.value(''), + ) as _i23.Future); + @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( Invocation.setter( @@ -927,26 +943,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i22.Future exit() => (super.noSuchMethod( + _i23.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i26.DerivePathType addressType({required String? address}) => + _i27.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i26.DerivePathType.bip44, - ) as _i26.DerivePathType); + returnValue: _i27.DerivePathType.bip44, + ) as _i27.DerivePathType); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -965,49 +981,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future getTransactionCacheEarly(List? allAddresses) => + _i23.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i23.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future getAllTxsToWatch() => (super.noSuchMethod( + _i23.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1016,31 +1032,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1058,33 +1074,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i23.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1094,35 +1110,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i23.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i22.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i23.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i22.Future<_i9.ElectrumXNode>); + ) as _i23.Future<_i9.ElectrumXNode>); @override - _i22.Future addDerivation({ + _i23.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i26.DerivePathType? derivePathType, + required _i27.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1136,13 +1152,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addDerivations({ + _i23.Future addDerivations({ required int? chain, - required _i26.DerivePathType? derivePathType, + required _i27.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1155,50 +1171,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future>> fastFetch( + _i23.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i22.Future>>.value( + returnValue: _i23.Future>>.value( >[]), - ) as _i22.Future>>); + ) as _i23.Future>>); @override - _i22.Future getTxCount({required String? address}) => + _i23.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future checkCurrentReceivingAddressesForTransactions() => + _i23.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkCurrentChangeAddressesForTransactions() => + _i23.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override int estimateTxFee({ required int? vSize, @@ -1223,7 +1239,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { required bool? coinControl, required bool? isSendAll, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => super.noSuchMethod(Invocation.method( #coinSelection, @@ -1239,19 +1255,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, )); @override - _i22.Future> fetchBuildTxData( - List<_i15.UTXO>? utxosToUse) => + _i23.Future> fetchBuildTxData( + List<_i16.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( #fetchBuildTxData, [utxosToUse], ), returnValue: - _i22.Future>.value(<_i27.SigningData>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i28.SigningData>[]), + ) as _i23.Future>); @override - _i22.Future> buildTransaction({ - required List<_i27.SigningData>? utxoSigningData, + _i23.Future> buildTransaction({ + required List<_i28.SigningData>? utxoSigningData, required List? recipients, required List? satoshiAmounts, }) => @@ -1266,10 +1282,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1281,26 +1297,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - int roughFeeEstimate( + _i14.Amount roughFeeEstimate( int? inputCount, int? outputCount, int? feeRatePerKB, @@ -1314,28 +1339,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { feeRatePerKB, ], ), - returnValue: 0, - ) as int); + returnValue: _FakeAmount_12( + this, + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + ), + ) as _i14.Amount); @override - _i22.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i23.Future<_i14.Amount> sweepAllEstimate(int? feeRate) => + (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override void initCache( String? walletId, - _i21.Coin? coin, + _i22.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1348,14 +1390,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future updateCachedId(String? id) => (super.noSuchMethod( + _i23.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1365,14 +1407,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i23.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1382,15 +1424,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateCachedIsFavorite(bool? isFavorite) => + _i23.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1406,15 +1448,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalance(_i11.Balance? balance) => + _i23.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1430,15 +1472,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i23.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override List getWalletTokenContractAddresses() => (super.noSuchMethod( Invocation.method( @@ -1448,16 +1490,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: [], ) as List); @override - _i22.Future updateWalletTokenContractAddresses( + _i23.Future updateWalletTokenContractAddresses( List? contractAddresses) => (super.noSuchMethod( Invocation.method( #updateWalletTokenContractAddresses, [contractAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1468,11 +1510,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction( Map? txData, dynamic electrumxClient, - List<_i15.Address>? myAddresses, - _i21.Coin? coin, + List<_i16.Address>? myAddresses, + _i22.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1489,8 +1531,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), returnValue: - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( - _FakeTuple2_12<_i15.Transaction, _i15.Address>( + _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value( + _FakeTuple2_13<_i16.Transaction, _i16.Address>( this, Invocation.method( #parseTransaction, @@ -1504,42 +1546,42 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), )), - ) as _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i21.Coin? coin, + required _i22.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i18.SecureStorageInterface? secureStorage, + required _i19.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i22.Future Function()? getMnemonicString, - required _i22.Future Function()? getMnemonicPassphrase, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function()? getCurrentChangeAddress, + required _i23.Future Function()? getMnemonicString, + required _i23.Future Function()? getMnemonicPassphrase, + required _i23.Future Function()? getChainHeight, + required _i23.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i22.Future> Function({ + required _i23.Future> Function({ required String address, - required int satoshiAmount, + required _i14.Amount amount, Map? args, })? prepareSend, - required _i22.Future Function({required String address})? getTxCount, - required _i22.Future> Function(List<_i15.UTXO>)? + required _i23.Future Function({required String address})? getTxCount, + required _i23.Future> Function(List<_i16.UTXO>)? fetchBuildTxData, - required _i22.Future Function()? refresh, - required _i22.Future Function()? checkChangeAddressForTransactions, - required _i22.Future Function({ + required _i23.Future Function()? refresh, + required _i23.Future Function()? checkChangeAddressForTransactions, + required _i23.Future Function({ required String address, required int chain, - required _i26.DerivePathType derivePathType, + required _i27.DerivePathType derivePathType, required String pubKey, required String wif, })? @@ -1576,44 +1618,44 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i23.Future<_i16.Address> currentReceivingPaynymAddress( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i23.Future checkCurrentPaynymReceivingAddressForTransactions( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i23.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i16.BIP32> deriveNotificationBip32Node({ + _i23.Future<_i17.BIP32> deriveNotificationBip32Node({ required String? mnemonic, required String? mnemonicPassphrase, }) => @@ -1626,7 +1668,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #mnemonicPassphrase: mnemonicPassphrase, }, ), - returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveNotificationBip32Node, @@ -1637,9 +1679,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.BIP32>); + ) as _i23.Future<_i17.BIP32>); @override - _i22.Future<_i16.BIP32> deriveReceivingPrivateKeyNode({ + _i23.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({ required String? mnemonic, required String? mnemonicPassphrase, required int? index, @@ -1654,7 +1696,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #index: index, }, ), - returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveReceivingPrivateKeyNode, @@ -1666,45 +1708,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.BIP32>); + ) as _i23.Future<_i17.BIP32>); @override - _i22.Future<_i17.PaymentCode> getPaymentCode( - _i26.DerivePathType? derivePathType) => + _i23.Future<_i18.PaymentCode> getPaymentCode( + _i27.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i22.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i23.Future<_i18.PaymentCode>.value(_FakePaymentCode_16( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i22.Future<_i17.PaymentCode>); + ) as _i23.Future<_i18.PaymentCode>); @override - _i22.Future<_i28.Uint8List> signWithNotificationKey(_i28.Uint8List? data) => + _i23.Future<_i29.Uint8List> signWithNotificationKey(_i29.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i22.Future<_i28.Uint8List>.value(_i28.Uint8List(0)), - ) as _i22.Future<_i28.Uint8List>); + returnValue: _i23.Future<_i29.Uint8List>.value(_i29.Uint8List(0)), + ) as _i23.Future<_i29.Uint8List>); @override - _i22.Future signStringWithNotificationKey(String? data) => + _i23.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, - required int? amount, + _i23.Future> preparePaymentCodeSend({ + required _i18.PaymentCode? paymentCode, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1713,17 +1755,17 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #paymentCode: paymentCode, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i16.BIP32? privateKeyNode, + _i23.Future<_i16.Address> nextUnusedSendAddressFrom({ + required _i18.PaymentCode? pCode, + required _i17.BIP32? privateKeyNode, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1736,7 +1778,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1748,13 +1790,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future> prepareNotificationTx({ + _i23.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => (super.noSuchMethod( Invocation.method( @@ -1768,10 +1810,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future broadcastNotificationTx( + _i23.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1779,21 +1821,21 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future hasConnected(String? paymentCodeString) => + _i23.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1804,12 +1846,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i17.PaymentCode?>.value(), - ) as _i22.Future<_i17.PaymentCode?>); + returnValue: _i23.Future<_i18.PaymentCode?>.value(), + ) as _i23.Future<_i18.PaymentCode?>); @override - _i22.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1820,31 +1862,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i17.PaymentCode?>.value(), - ) as _i22.Future<_i17.PaymentCode?>); + returnValue: _i23.Future<_i18.PaymentCode?>.value(), + ) as _i23.Future<_i18.PaymentCode?>); @override - _i22.Future> + _i23.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i22.Future>.value(<_i17.PaymentCode>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i18.PaymentCode>[]), + ) as _i23.Future>); @override - _i22.Future checkForNotificationTransactionsTo( + _i23.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future restoreAllHistory({ + _i23.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1859,12 +1901,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i23.Future restoreHistoryWith( + _i18.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1877,15 +1919,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i23.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i27.DerivePathType? derivePathType, + required _i18.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1898,7 +1940,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1911,13 +1953,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i23.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i27.DerivePathType? derivePathType, + required _i18.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1930,7 +1972,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1943,58 +1985,58 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future<_i15.Address> getMyNotificationAddress( - _i26.DerivePathType? derivePathType) => + _i23.Future<_i16.Address> getMyNotificationAddress( + _i27.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future> lookupKey(String? paymentCodeString) => + _i23.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future paymentCodeStringByKey(String? key) => + _i23.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future storeCode(String? paymentCodeString) => + _i23.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override void initCoinControlInterface({ required String? walletId, required String? walletName, - required _i21.Coin? coin, + required _i22.Coin? coin, required _i12.MainDB? db, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function(_i11.Balance)? refreshedBalanceCallback, + required _i23.Future Function()? getChainHeight, + required _i23.Future Function(_i11.Balance)? refreshedBalanceCallback, }) => super.noSuchMethod( Invocation.method( @@ -2012,22 +2054,22 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future refreshBalance({bool? notify = false}) => + _i23.Future refreshBalance({bool? notify = false}) => (super.noSuchMethod( Invocation.method( #refreshBalance, [], {#notify: notify}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.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 _i30.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -2043,17 +2085,17 @@ class MockLocaleService extends _i1.Mock implements _i29.LocaleService { returnValue: false, ) as bool); @override - _i22.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i23.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2061,7 +2103,7 @@ class MockLocaleService extends _i1.Mock implements _i29.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2091,41 +2133,41 @@ class MockLocaleService extends _i1.Mock implements _i29.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( + _i19.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_16( + returnValue: _FakeSecureStorageInterface_17( this, Invocation.getter(#secureStorageInterface), ), - ) as _i18.SecureStorageInterface); + ) as _i19.SecureStorageInterface); @override - List<_i30.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i31.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i30.NodeModel>[], - ) as List<_i30.NodeModel>); + returnValue: <_i31.NodeModel>[], + ) as List<_i31.NodeModel>); @override - List<_i30.NodeModel> get nodes => (super.noSuchMethod( + List<_i31.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i30.NodeModel>[], - ) as List<_i30.NodeModel>); + returnValue: <_i31.NodeModel>[], + ) as List<_i31.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateDefaults() => (super.noSuchMethod( + _i23.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future setPrimaryNodeFor({ - required _i21.Coin? coin, - required _i30.NodeModel? node, + _i23.Future setPrimaryNodeFor({ + required _i22.Coin? coin, + required _i31.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -2138,44 +2180,44 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i30.NodeModel? getPrimaryNodeFor({required _i21.Coin? coin}) => + _i31.NodeModel? getPrimaryNodeFor({required _i22.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i30.NodeModel?); + )) as _i31.NodeModel?); @override - List<_i30.NodeModel> getNodesFor(_i21.Coin? coin) => (super.noSuchMethod( + List<_i31.NodeModel> getNodesFor(_i22.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i30.NodeModel>[], - ) as List<_i30.NodeModel>); + returnValue: <_i31.NodeModel>[], + ) as List<_i31.NodeModel>); @override - _i30.NodeModel? getNodeById({required String? id}) => + _i31.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i30.NodeModel?); + )) as _i31.NodeModel?); @override - List<_i30.NodeModel> failoverNodesFor({required _i21.Coin? coin}) => + List<_i31.NodeModel> failoverNodesFor({required _i22.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i30.NodeModel>[], - ) as List<_i30.NodeModel>); + returnValue: <_i31.NodeModel>[], + ) as List<_i31.NodeModel>); @override - _i22.Future add( - _i30.NodeModel? node, + _i23.Future add( + _i31.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -2188,11 +2230,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future delete( + _i23.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -2204,11 +2246,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future setEnabledState( + _i23.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -2222,12 +2264,12 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future edit( - _i30.NodeModel? editedNode, + _i23.Future edit( + _i31.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -2240,20 +2282,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateCommunityNodes() => (super.noSuchMethod( + _i23.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2261,7 +2303,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2304,23 +2346,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i19.CoinServiceAPI get wallet => (super.noSuchMethod( + _i20.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_17( + returnValue: _FakeCoinServiceAPI_18( this, Invocation.getter(#wallet), ), - ) as _i19.CoinServiceAPI); + ) as _i20.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2353,23 +2395,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i23.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i23.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2379,16 +2421,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i16.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i16.UTXO>[]), + ) as _i23.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2408,15 +2450,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2453,19 +2495,29 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i23.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i23.Future.value(''), + ) as _i23.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2475,9 +2527,9 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -2486,32 +2538,32 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2521,33 +2573,33 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -2566,20 +2618,20 @@ class MockManager extends _i1.Mock implements _i6.Manager { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future exitCurrentWallet() => (super.noSuchMethod( + _i23.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2591,43 +2643,52 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future resetRescanOnOpen() => (super.noSuchMethod( + _i23.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2635,7 +2696,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2655,7 +2716,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 _i20.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -2666,10 +2727,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2702,23 +2763,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i23.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i23.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2728,16 +2789,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i16.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i16.UTXO>[]), + ) as _i23.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2757,20 +2818,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicString => (super.noSuchMethod( + _i23.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -2787,9 +2848,9 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: 0, ) as int); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -2798,41 +2859,41 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2842,15 +2903,15 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -2869,38 +2930,38 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future exit() => (super.noSuchMethod( + _i23.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2912,40 +2973,49 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i23.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); } diff --git a/test/widget_tests/table_view/table_view_row_test.dart b/test/widget_tests/table_view/table_view_row_test.dart index 9f732f51e..c8d17609b 100644 --- a/test/widget_tests/table_view/table_view_row_test.dart +++ b/test/widget_tests/table_view/table_view_row_test.dart @@ -11,6 +11,7 @@ import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/coins/manager.dart'; import 'package:stackwallet/services/wallets.dart'; import 'package:stackwallet/services/wallets_service.dart'; +import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; @@ -40,10 +41,10 @@ void main() { when(wallet.balance).thenAnswer( (_) => Balance( coin: Coin.bitcoin, - total: 0, - spendable: 0, - blockedTotal: 0, - pendingSpendable: 0, + total: Amount.zero, + spendable: Amount.zero, + blockedTotal: Amount.zero, + pendingSpendable: Amount.zero, ), ); 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 a3182a21f..f6e71d50f 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,12 @@ // 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 _i28; -import 'dart:ui' as _i23; +import 'dart:async' as _i22; +import 'dart:typed_data' as _i29; +import 'dart:ui' as _i24; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip32/bip32.dart' as _i17; +import 'package:bip47/bip47.dart' as _i18; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -17,23 +17,24 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12; 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/isar/models/isar_models.dart' as _i16; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/models/signing_data.dart' as _i26; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i24; -import 'package:stackwallet/services/coins/coin_service.dart' as _i18; +import 'package:stackwallet/models/signing_data.dart' as _i27; +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/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 _i20; 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/amount/amount.dart' as _i14; +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/flutter_secure_storage_interface.dart' - as _i27; -import 'package:stackwallet/utilities/prefs.dart' as _i22; -import 'package:tuple/tuple.dart' as _i14; + as _i28; +import 'package:stackwallet/utilities/prefs.dart' as _i23; +import 'package:tuple/tuple.dart' as _i15; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -170,9 +171,8 @@ class _FakeElectrumXNode_11 extends _i1.SmartFake implements _i9.ElectrumXNode { ); } -class _FakeTuple2_12 extends _i1.SmartFake - implements _i14.Tuple2 { - _FakeTuple2_12( +class _FakeAmount_12 extends _i1.SmartFake implements _i14.Amount { + _FakeAmount_12( Object parent, Invocation parentInvocation, ) : super( @@ -181,8 +181,9 @@ class _FakeTuple2_12 extends _i1.SmartFake ); } -class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { - _FakeAddress_13( +class _FakeTuple2_13 extends _i1.SmartFake + implements _i15.Tuple2 { + _FakeTuple2_13( Object parent, Invocation parentInvocation, ) : super( @@ -191,8 +192,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( +class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address { + _FakeAddress_14( Object parent, Invocation parentInvocation, ) : super( @@ -201,8 +202,8 @@ class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { ); } -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( +class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 { + _FakeBIP32_15( Object parent, Invocation parentInvocation, ) : super( @@ -211,9 +212,19 @@ class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { ); } -class _FakeCoinServiceAPI_16 extends _i1.SmartFake - implements _i18.CoinServiceAPI { - _FakeCoinServiceAPI_16( +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( Object parent, Invocation parentInvocation, ) : super( @@ -225,7 +236,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 _i20.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -292,7 +303,7 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i20.Coin? coin}) => + List getWalletIdsFor({required _i21.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -302,21 +313,21 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { returnValue: [], ) as List); @override - List<_i14.Tuple2<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> + List<_i15.Tuple2<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), returnValue: < - _i14.Tuple2<_i20.Coin, + _i15.Tuple2<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>[], ) as List< - _i14.Tuple2<_i20.Coin, + _i15.Tuple2<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i20.Coin? coin) => + _i21.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -380,17 +391,17 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { returnValueForMissingStub: null, ); @override - _i21.Future load(_i22.Prefs? prefs) => (super.noSuchMethod( + _i22.Future load(_i23.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future loadAfterStackRestore( - _i22.Prefs? prefs, + _i22.Future loadAfterStackRestore( + _i23.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -401,11 +412,11 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { managers, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -413,7 +424,7 @@ class MockWallets extends _i1.Mock implements _i19.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -439,19 +450,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i21.Future> get walletNames => + _i22.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i21.Future>.value( + returnValue: _i22.Future>.value( {}), - ) as _i21.Future>); + ) as _i22.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i21.Future renameWallet({ + _i22.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -466,8 +477,8 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( @@ -477,10 +488,10 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValue: {}, ) as Map); @override - _i21.Future addExistingStackWallet({ + _i22.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i20.Coin? coin, + required _i21.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -494,13 +505,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future addNewWallet({ + _i22.Future addNewWallet({ required String? name, - required _i20.Coin? coin, + required _i21.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -513,46 +524,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i22.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i22.Future>.value([]), + ) as _i22.Future>); @override - _i21.Future saveFavoriteWalletIds(List? walletIds) => + _i22.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i22.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i22.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future moveFavorite({ + _i22.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -565,48 +576,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i22.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override - _i21.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i22.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future isMnemonicVerified({required String? walletId}) => + _i22.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override - _i21.Future setMnemonicVerified({required String? walletId}) => + _i22.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future deleteWallet( + _i22.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -618,20 +629,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future.value(0), + ) as _i22.Future); @override - _i21.Future refreshWallets(bool? shouldNotifyListeners) => + _i22.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -639,7 +650,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -667,13 +678,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 _i25.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i21.Timer? _timer) => super.noSuchMethod( + set timer(_i22.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -750,74 +761,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: false, ) as bool); @override - _i20.Coin get coin => (super.noSuchMethod( + _i21.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i20.Coin.bitcoin, - ) as _i20.Coin); + returnValue: _i21.Coin.bitcoin, + ) as _i21.Coin); @override - _i21.Future> get utxos => (super.noSuchMethod( + _i22.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i21.Future>.value(<_i15.UTXO>[]), - ) as _i21.Future>); + returnValue: _i22.Future>.value(<_i16.UTXO>[]), + ) as _i22.Future>); @override - _i21.Future> get transactions => (super.noSuchMethod( + _i22.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i21.Future>.value(<_i15.Transaction>[]), - ) as _i21.Future>); + _i22.Future>.value(<_i16.Transaction>[]), + ) as _i22.Future>); @override - _i21.Future get currentReceivingAddress => (super.noSuchMethod( + _i22.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override - _i21.Future get currentChangeAddress => (super.noSuchMethod( + _i22.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override - _i21.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i22.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i21.Future<_i8.FeeObject>); + ) as _i22.Future<_i8.FeeObject>); @override - _i21.Future get maxFee => (super.noSuchMethod( + _i22.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future.value(0), + ) as _i22.Future); @override - _i21.Future> get mnemonic => (super.noSuchMethod( + _i22.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i22.Future>.value([]), + ) as _i22.Future>); @override - _i21.Future get mnemonicString => (super.noSuchMethod( + _i22.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + _i22.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future get chainHeight => (super.noSuchMethod( + _i22.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future.value(0), + ) as _i22.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -889,6 +900,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ), ) as _i11.Balance); @override + _i22.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i22.Future.value(''), + ) as _i22.Future); + @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( Invocation.setter( @@ -914,26 +930,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i21.Future exit() => (super.noSuchMethod( + _i22.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i25.DerivePathType addressType({required String? address}) => + _i26.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i25.DerivePathType.bip44, - ) as _i25.DerivePathType); + returnValue: _i26.DerivePathType.bip44, + ) as _i26.DerivePathType); @override - _i21.Future recoverFromMnemonic({ + _i22.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -952,49 +968,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #height: height, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future getTransactionCacheEarly(List? allAddresses) => + _i22.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i22.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override - _i21.Future getAllTxsToWatch() => (super.noSuchMethod( + _i22.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future refresh() => (super.noSuchMethod( + _i22.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future> prepareSend({ + _i22.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1003,31 +1019,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i22.Future>.value({}), + ) as _i22.Future>); @override - _i21.Future confirmSend({required Map? txData}) => + _i22.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override - _i21.Future testNetworkConnection() => (super.noSuchMethod( + _i22.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1045,33 +1061,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i21.Future initializeNew() => (super.noSuchMethod( + _i22.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future initializeExisting() => (super.noSuchMethod( + _i22.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future updateSentCachedTxData(Map? txData) => + _i22.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1081,35 +1097,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i22.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i21.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i22.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i21.Future<_i9.ElectrumXNode>); + ) as _i22.Future<_i9.ElectrumXNode>); @override - _i21.Future addDerivation({ + _i22.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i25.DerivePathType? derivePathType, + required _i26.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1123,13 +1139,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future addDerivations({ + _i22.Future addDerivations({ required int? chain, - required _i25.DerivePathType? derivePathType, + required _i26.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1142,50 +1158,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future>> fastFetch( + _i22.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i21.Future>>.value( + returnValue: _i22.Future>>.value( >[]), - ) as _i21.Future>>); + ) as _i22.Future>>); @override - _i21.Future getTxCount({required String? address}) => + _i22.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future.value(0), + ) as _i22.Future); @override - _i21.Future checkCurrentReceivingAddressesForTransactions() => + _i22.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future checkCurrentChangeAddressesForTransactions() => + _i22.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override int estimateTxFee({ required int? vSize, @@ -1210,7 +1226,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { required bool? coinControl, required bool? isSendAll, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => super.noSuchMethod(Invocation.method( #coinSelection, @@ -1226,19 +1242,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, )); @override - _i21.Future> fetchBuildTxData( - List<_i15.UTXO>? utxosToUse) => + _i22.Future> fetchBuildTxData( + List<_i16.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( #fetchBuildTxData, [utxosToUse], ), returnValue: - _i21.Future>.value(<_i26.SigningData>[]), - ) as _i21.Future>); + _i22.Future>.value(<_i27.SigningData>[]), + ) as _i22.Future>); @override - _i21.Future> buildTransaction({ - required List<_i26.SigningData>? utxoSigningData, + _i22.Future> buildTransaction({ + required List<_i27.SigningData>? utxoSigningData, required List? recipients, required List? satoshiAmounts, }) => @@ -1253,10 +1269,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i22.Future>.value({}), + ) as _i22.Future>); @override - _i21.Future fullRescan( + _i22.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1268,26 +1284,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future estimateFeeFor( - int? satoshiAmount, + _i22.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i22.Future<_i14.Amount>); @override - int roughFeeEstimate( + _i14.Amount roughFeeEstimate( int? inputCount, int? outputCount, int? feeRatePerKB, @@ -1301,28 +1326,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { feeRatePerKB, ], ), - returnValue: 0, - ) as int); + returnValue: _FakeAmount_12( + this, + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + ), + ) as _i14.Amount); @override - _i21.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i22.Future<_i14.Amount> sweepAllEstimate(int? feeRate) => + (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + )), + ) as _i22.Future<_i14.Amount>); @override - _i21.Future generateNewAddress() => (super.noSuchMethod( + _i22.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override void initCache( String? walletId, - _i20.Coin? coin, + _i21.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1335,14 +1377,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i21.Future updateCachedId(String? id) => (super.noSuchMethod( + _i22.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1352,14 +1394,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: 0, ) as int); @override - _i21.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i22.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1369,15 +1411,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Future updateCachedIsFavorite(bool? isFavorite) => + _i22.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1393,15 +1435,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ), ) as _i11.Balance); @override - _i21.Future updateCachedBalance(_i11.Balance? balance) => + _i22.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1417,15 +1459,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ), ) as _i11.Balance); @override - _i21.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i22.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override List getWalletTokenContractAddresses() => (super.noSuchMethod( Invocation.method( @@ -1435,16 +1477,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValue: [], ) as List); @override - _i21.Future updateWalletTokenContractAddresses( + _i22.Future updateWalletTokenContractAddresses( List? contractAddresses) => (super.noSuchMethod( Invocation.method( #updateWalletTokenContractAddresses, [contractAddresses], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1455,11 +1497,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction( Map? txData, dynamic electrumxClient, - List<_i15.Address>? myAddresses, - _i20.Coin? coin, + List<_i16.Address>? myAddresses, + _i21.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1476,8 +1518,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ], ), returnValue: - _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( - _FakeTuple2_12<_i15.Transaction, _i15.Address>( + _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value( + _FakeTuple2_13<_i16.Transaction, _i16.Address>( this, Invocation.method( #parseTransaction, @@ -1491,42 +1533,42 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { ], ), )), - ) as _i21.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i20.Coin? coin, + required _i21.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i27.SecureStorageInterface? secureStorage, + required _i28.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i21.Future Function()? getMnemonicString, - required _i21.Future Function()? getMnemonicPassphrase, - required _i21.Future Function()? getChainHeight, - required _i21.Future Function()? getCurrentChangeAddress, + required _i22.Future Function()? getMnemonicString, + required _i22.Future Function()? getMnemonicPassphrase, + required _i22.Future Function()? getChainHeight, + required _i22.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i21.Future> Function({ + required _i22.Future> Function({ required String address, - required int satoshiAmount, + required _i14.Amount amount, Map? args, })? prepareSend, - required _i21.Future Function({required String address})? getTxCount, - required _i21.Future> Function(List<_i15.UTXO>)? + required _i22.Future Function({required String address})? getTxCount, + required _i22.Future> Function(List<_i16.UTXO>)? fetchBuildTxData, - required _i21.Future Function()? refresh, - required _i21.Future Function()? checkChangeAddressForTransactions, - required _i21.Future Function({ + required _i22.Future Function()? refresh, + required _i22.Future Function()? checkChangeAddressForTransactions, + required _i22.Future Function({ required String address, required int chain, - required _i25.DerivePathType derivePathType, + required _i26.DerivePathType derivePathType, required String pubKey, required String wif, })? @@ -1563,44 +1605,44 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i21.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i22.Future<_i16.Address> currentReceivingPaynymAddress( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i21.Future<_i15.Address>); + ) as _i22.Future<_i16.Address>); @override - _i21.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i22.Future checkCurrentPaynymReceivingAddressForTransactions( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i22.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future<_i16.BIP32> deriveNotificationBip32Node({ + _i22.Future<_i17.BIP32> deriveNotificationBip32Node({ required String? mnemonic, required String? mnemonicPassphrase, }) => @@ -1613,7 +1655,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #mnemonicPassphrase: mnemonicPassphrase, }, ), - returnValue: _i21.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i22.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveNotificationBip32Node, @@ -1624,9 +1666,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), )), - ) as _i21.Future<_i16.BIP32>); + ) as _i22.Future<_i17.BIP32>); @override - _i21.Future<_i16.BIP32> deriveReceivingPrivateKeyNode({ + _i22.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({ required String? mnemonic, required String? mnemonicPassphrase, required int? index, @@ -1641,7 +1683,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #index: index, }, ), - returnValue: _i21.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i22.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveReceivingPrivateKeyNode, @@ -1653,45 +1695,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), )), - ) as _i21.Future<_i16.BIP32>); + ) as _i22.Future<_i17.BIP32>); @override - _i21.Future<_i17.PaymentCode> getPaymentCode( - _i25.DerivePathType? derivePathType) => + _i22.Future<_i18.PaymentCode> getPaymentCode( + _i26.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i21.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i22.Future<_i18.PaymentCode>.value(_FakePaymentCode_16( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i21.Future<_i17.PaymentCode>); + ) as _i22.Future<_i18.PaymentCode>); @override - _i21.Future<_i28.Uint8List> signWithNotificationKey(_i28.Uint8List? data) => + _i22.Future<_i29.Uint8List> signWithNotificationKey(_i29.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i21.Future<_i28.Uint8List>.value(_i28.Uint8List(0)), - ) as _i21.Future<_i28.Uint8List>); + returnValue: _i22.Future<_i29.Uint8List>.value(_i29.Uint8List(0)), + ) as _i22.Future<_i29.Uint8List>); @override - _i21.Future signStringWithNotificationKey(String? data) => + _i22.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override - _i21.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, - required int? amount, + _i22.Future> preparePaymentCodeSend({ + required _i18.PaymentCode? paymentCode, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1700,17 +1742,17 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { [], { #paymentCode: paymentCode, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i22.Future>.value({}), + ) as _i22.Future>); @override - _i21.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i16.BIP32? privateKeyNode, + _i22.Future<_i16.Address> nextUnusedSendAddressFrom({ + required _i18.PaymentCode? pCode, + required _i17.BIP32? privateKeyNode, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1723,7 +1765,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1735,13 +1777,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), )), - ) as _i21.Future<_i15.Address>); + ) as _i22.Future<_i16.Address>); @override - _i21.Future> prepareNotificationTx({ + _i22.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => (super.noSuchMethod( Invocation.method( @@ -1755,10 +1797,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i22.Future>.value({}), + ) as _i22.Future>); @override - _i21.Future broadcastNotificationTx( + _i22.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1766,21 +1808,21 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override - _i21.Future hasConnected(String? paymentCodeString) => + _i22.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override - _i21.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i22.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1791,12 +1833,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i21.Future<_i17.PaymentCode?>.value(), - ) as _i21.Future<_i17.PaymentCode?>); + returnValue: _i22.Future<_i18.PaymentCode?>.value(), + ) as _i22.Future<_i18.PaymentCode?>); @override - _i21.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i22.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1807,31 +1849,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i21.Future<_i17.PaymentCode?>.value(), - ) as _i21.Future<_i17.PaymentCode?>); + returnValue: _i22.Future<_i18.PaymentCode?>.value(), + ) as _i22.Future<_i18.PaymentCode?>); @override - _i21.Future> + _i22.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i21.Future>.value(<_i17.PaymentCode>[]), - ) as _i21.Future>); + _i22.Future>.value(<_i18.PaymentCode>[]), + ) as _i22.Future>); @override - _i21.Future checkForNotificationTransactionsTo( + _i22.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future restoreAllHistory({ + _i22.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1846,12 +1888,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i22.Future restoreHistoryWith( + _i18.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1864,15 +1906,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i22.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i25.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i26.DerivePathType? derivePathType, + required _i18.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1885,7 +1927,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1898,13 +1940,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), )), - ) as _i21.Future<_i15.Address>); + ) as _i22.Future<_i16.Address>); @override - _i21.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i22.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i25.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i26.DerivePathType? derivePathType, + required _i18.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1917,7 +1959,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1930,58 +1972,58 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { }, ), )), - ) as _i21.Future<_i15.Address>); + ) as _i22.Future<_i16.Address>); @override - _i21.Future<_i15.Address> getMyNotificationAddress( - _i25.DerivePathType? derivePathType) => + _i22.Future<_i16.Address> getMyNotificationAddress( + _i26.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i21.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i21.Future<_i15.Address>); + ) as _i22.Future<_i16.Address>); @override - _i21.Future> lookupKey(String? paymentCodeString) => + _i22.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i22.Future>.value([]), + ) as _i22.Future>); @override - _i21.Future paymentCodeStringByKey(String? key) => + _i22.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future storeCode(String? paymentCodeString) => + _i22.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override void initCoinControlInterface({ required String? walletId, required String? walletName, - required _i20.Coin? coin, + required _i21.Coin? coin, required _i12.MainDB? db, - required _i21.Future Function()? getChainHeight, - required _i21.Future Function(_i11.Balance)? refreshedBalanceCallback, + required _i22.Future Function()? getChainHeight, + required _i22.Future Function(_i11.Balance)? refreshedBalanceCallback, }) => super.noSuchMethod( Invocation.method( @@ -1999,16 +2041,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i21.Future refreshBalance({bool? notify = false}) => + _i22.Future refreshBalance({bool? notify = false}) => (super.noSuchMethod( Invocation.method( #refreshBalance, [], {#notify: notify}, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); } /// A class which mocks [Manager]. @@ -2029,23 +2071,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i18.CoinServiceAPI get wallet => (super.noSuchMethod( + _i19.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_16( + returnValue: _FakeCoinServiceAPI_17( this, Invocation.getter(#wallet), ), - ) as _i18.CoinServiceAPI); + ) as _i19.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i20.Coin get coin => (super.noSuchMethod( + _i21.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i20.Coin.bitcoin, - ) as _i20.Coin); + returnValue: _i21.Coin.bitcoin, + ) as _i21.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2078,23 +2120,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i21.Future<_i8.FeeObject>); + ) as _i22.Future<_i8.FeeObject>); @override - _i21.Future get maxFee => (super.noSuchMethod( + _i22.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future.value(0), + ) as _i22.Future); @override - _i21.Future get currentReceivingAddress => (super.noSuchMethod( + _i22.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2104,16 +2146,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i11.Balance); @override - _i21.Future> get transactions => (super.noSuchMethod( + _i22.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i21.Future>.value(<_i15.Transaction>[]), - ) as _i21.Future>); + _i22.Future>.value(<_i16.Transaction>[]), + ) as _i22.Future>); @override - _i21.Future> get utxos => (super.noSuchMethod( + _i22.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i21.Future>.value(<_i15.UTXO>[]), - ) as _i21.Future>); + returnValue: _i22.Future>.value(<_i16.UTXO>[]), + ) as _i22.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2133,15 +2175,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i21.Future> get mnemonic => (super.noSuchMethod( + _i22.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i22.Future>.value([]), + ) as _i22.Future>); @override - _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + _i22.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2178,19 +2220,29 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i22.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i22.Future.value(''), + ) as _i22.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2200,9 +2252,9 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i21.Future> prepareSend({ + _i22.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -2211,32 +2263,32 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i22.Future>.value({}), + ) as _i22.Future>); @override - _i21.Future confirmSend({required Map? txData}) => + _i22.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override - _i21.Future refresh() => (super.noSuchMethod( + _i22.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2246,33 +2298,33 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i21.Future testNetworkConnection() => (super.noSuchMethod( + _i22.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override - _i21.Future initializeNew() => (super.noSuchMethod( + _i22.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future initializeExisting() => (super.noSuchMethod( + _i22.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future recoverFromMnemonic({ + _i22.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -2291,20 +2343,20 @@ class MockManager extends _i1.Mock implements _i6.Manager { #height: height, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future exitCurrentWallet() => (super.noSuchMethod( + _i22.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future fullRescan( + _i22.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2316,43 +2368,52 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future estimateFeeFor( - int? satoshiAmount, + _i22.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i22.Future<_i14.Amount>); @override - _i21.Future generateNewAddress() => (super.noSuchMethod( + _i22.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override - _i21.Future resetRescanOnOpen() => (super.noSuchMethod( + _i22.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2360,7 +2421,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2380,7 +2441,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 _i19.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -2391,10 +2452,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i20.Coin get coin => (super.noSuchMethod( + _i21.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i20.Coin.bitcoin, - ) as _i20.Coin); + returnValue: _i21.Coin.bitcoin, + ) as _i21.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2427,23 +2488,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i21.Future<_i8.FeeObject>); + ) as _i22.Future<_i8.FeeObject>); @override - _i21.Future get maxFee => (super.noSuchMethod( + _i22.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future.value(0), + ) as _i22.Future); @override - _i21.Future get currentReceivingAddress => (super.noSuchMethod( + _i22.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2453,16 +2514,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { ), ) as _i11.Balance); @override - _i21.Future> get transactions => (super.noSuchMethod( + _i22.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i21.Future>.value(<_i15.Transaction>[]), - ) as _i21.Future>); + _i22.Future>.value(<_i16.Transaction>[]), + ) as _i22.Future>); @override - _i21.Future> get utxos => (super.noSuchMethod( + _i22.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i21.Future>.value(<_i15.UTXO>[]), - ) as _i21.Future>); + returnValue: _i22.Future>.value(<_i16.UTXO>[]), + ) as _i22.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2482,20 +2543,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValue: '', ) as String); @override - _i21.Future> get mnemonic => (super.noSuchMethod( + _i22.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i21.Future>.value([]), - ) as _i21.Future>); + returnValue: _i22.Future>.value([]), + ) as _i22.Future>); @override - _i21.Future get mnemonicString => (super.noSuchMethod( + _i22.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future get mnemonicPassphrase => (super.noSuchMethod( + _i22.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + ) as _i22.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -2512,9 +2573,9 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValue: 0, ) as int); @override - _i21.Future> prepareSend({ + _i22.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -2523,41 +2584,41 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i21.Future>.value({}), - ) as _i21.Future>); + _i22.Future>.value({}), + ) as _i22.Future>); @override - _i21.Future confirmSend({required Map? txData}) => + _i22.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i21.Future.value(''), - ) as _i21.Future); + returnValue: _i22.Future.value(''), + ) as _i22.Future); @override - _i21.Future refresh() => (super.noSuchMethod( + _i22.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2567,15 +2628,15 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { returnValue: false, ) as bool); @override - _i21.Future testNetworkConnection() => (super.noSuchMethod( + _i22.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override - _i21.Future recoverFromMnemonic({ + _i22.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -2594,38 +2655,38 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { #height: height, }, ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future initializeNew() => (super.noSuchMethod( + _i22.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future initializeExisting() => (super.noSuchMethod( + _i22.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future exit() => (super.noSuchMethod( + _i22.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future fullRescan( + _i22.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2637,40 +2698,49 @@ class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); @override - _i21.Future estimateFeeFor( - int? satoshiAmount, + _i22.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i21.Future.value(0), - ) as _i21.Future); + returnValue: _i22.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i22.Future<_i14.Amount>); @override - _i21.Future generateNewAddress() => (super.noSuchMethod( + _i22.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i21.Future.value(false), - ) as _i21.Future); + returnValue: _i22.Future.value(false), + ) as _i22.Future); @override - _i21.Future updateSentCachedTxData(Map? txData) => + _i22.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i21.Future.value(), - returnValueForMissingStub: _i21.Future.value(), - ) as _i21.Future); + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); } diff --git a/test/widget_tests/transaction_card_test.mocks.dart b/test/widget_tests/transaction_card_test.mocks.dart index 686f360b1..6f025270d 100644 --- a/test/widget_tests/transaction_card_test.mocks.dart +++ b/test/widget_tests/transaction_card_test.mocks.dart @@ -6,13 +6,13 @@ import 'dart:async' as _i18; import 'dart:ui' as _i20; -import 'package:decimal/decimal.dart' as _i14; +import 'package:decimal/decimal.dart' as _i29; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/isar/main_db.dart' as _i13; -import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i12; -import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i11; +import 'package:stackwallet/db/isar/main_db.dart' as _i14; +import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i13; +import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i12; import 'package:stackwallet/models/balance.dart' as _i9; import 'package:stackwallet/models/isar/models/isar_models.dart' as _i21; import 'package:stackwallet/models/models.dart' as _i8; @@ -22,12 +22,13 @@ import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as _i22; import 'package:stackwallet/services/coins/manager.dart' as _i6; import 'package:stackwallet/services/locale_service.dart' as _i24; import 'package:stackwallet/services/node_service.dart' as _i3; -import 'package:stackwallet/services/notes_service.dart' as _i29; +import 'package:stackwallet/services/notes_service.dart' as _i30; import 'package:stackwallet/services/price_service.dart' as _i28; import 'package:stackwallet/services/transaction_notification_tracker.dart' - as _i10; + as _i11; import 'package:stackwallet/services/wallets.dart' as _i16; import 'package:stackwallet/services/wallets_service.dart' as _i2; +import 'package:stackwallet/utilities/amount/amount.dart' as _i10; import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i26; import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i17; import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i25; @@ -119,9 +120,8 @@ class _FakeBalance_6 extends _i1.SmartFake implements _i9.Balance { ); } -class _FakeTransactionNotificationTracker_7 extends _i1.SmartFake - implements _i10.TransactionNotificationTracker { - _FakeTransactionNotificationTracker_7( +class _FakeAmount_7 extends _i1.SmartFake implements _i10.Amount { + _FakeAmount_7( Object parent, Invocation parentInvocation, ) : super( @@ -130,8 +130,9 @@ class _FakeTransactionNotificationTracker_7 extends _i1.SmartFake ); } -class _FakeElectrumX_8 extends _i1.SmartFake implements _i11.ElectrumX { - _FakeElectrumX_8( +class _FakeTransactionNotificationTracker_8 extends _i1.SmartFake + implements _i11.TransactionNotificationTracker { + _FakeTransactionNotificationTracker_8( Object parent, Invocation parentInvocation, ) : super( @@ -140,9 +141,8 @@ class _FakeElectrumX_8 extends _i1.SmartFake implements _i11.ElectrumX { ); } -class _FakeCachedElectrumX_9 extends _i1.SmartFake - implements _i12.CachedElectrumX { - _FakeCachedElectrumX_9( +class _FakeElectrumX_9 extends _i1.SmartFake implements _i12.ElectrumX { + _FakeElectrumX_9( Object parent, Invocation parentInvocation, ) : super( @@ -151,8 +151,9 @@ class _FakeCachedElectrumX_9 extends _i1.SmartFake ); } -class _FakeMainDB_10 extends _i1.SmartFake implements _i13.MainDB { - _FakeMainDB_10( +class _FakeCachedElectrumX_10 extends _i1.SmartFake + implements _i13.CachedElectrumX { + _FakeCachedElectrumX_10( Object parent, Invocation parentInvocation, ) : super( @@ -161,8 +162,8 @@ class _FakeMainDB_10 extends _i1.SmartFake implements _i13.MainDB { ); } -class _FakeDecimal_11 extends _i1.SmartFake implements _i14.Decimal { - _FakeDecimal_11( +class _FakeMainDB_11 extends _i1.SmartFake implements _i14.MainDB { + _FakeMainDB_11( Object parent, Invocation parentInvocation, ) : super( @@ -571,6 +572,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i18.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i18.Future.value(''), + ) as _i18.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, @@ -595,7 +606,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { @override _i18.Future> prepareSend({ required String? address, - required int? amount, + required _i10.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -604,7 +615,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), @@ -713,20 +724,29 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override - _i18.Future estimateFeeFor( - int? satoshiAmount, + _i18.Future<_i10.Amount> estimateFeeFor( + _i10.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i18.Future.value(0), - ) as _i18.Future); + returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i18.Future<_i10.Amount>); @override _i18.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( @@ -911,7 +931,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI { @override _i18.Future> prepareSend({ required String? address, - required int? amount, + required _i10.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -920,7 +940,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), @@ -1038,20 +1058,29 @@ class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI { returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override - _i18.Future estimateFeeFor( - int? satoshiAmount, + _i18.Future<_i10.Amount> estimateFeeFor( + _i10.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i18.Future.value(0), - ) as _i18.Future); + returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i18.Future<_i10.Amount>); @override _i18.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( @@ -1089,15 +1118,15 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { returnValueForMissingStub: null, ); @override - _i10.TransactionNotificationTracker get txTracker => (super.noSuchMethod( + _i11.TransactionNotificationTracker get txTracker => (super.noSuchMethod( Invocation.getter(#txTracker), - returnValue: _FakeTransactionNotificationTracker_7( + returnValue: _FakeTransactionNotificationTracker_8( this, Invocation.getter(#txTracker), ), - ) as _i10.TransactionNotificationTracker); + ) as _i11.TransactionNotificationTracker); @override - set txTracker(_i10.TransactionNotificationTracker? _txTracker) => + set txTracker(_i11.TransactionNotificationTracker? _txTracker) => super.noSuchMethod( Invocation.setter( #txTracker, @@ -1237,21 +1266,21 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { returnValue: false, ) as bool); @override - _i11.ElectrumX get electrumXClient => (super.noSuchMethod( + _i12.ElectrumX get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumX_8( + returnValue: _FakeElectrumX_9( this, Invocation.getter(#electrumXClient), ), - ) as _i11.ElectrumX); + ) as _i12.ElectrumX); @override - _i12.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod( + _i13.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod( Invocation.getter(#cachedElectrumXClient), - returnValue: _FakeCachedElectrumX_9( + returnValue: _FakeCachedElectrumX_10( this, Invocation.getter(#cachedElectrumXClient), ), - ) as _i12.CachedElectrumX); + ) as _i13.CachedElectrumX); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -1300,6 +1329,11 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { _i18.Future>.value(<_i21.Transaction>[]), ) as _i18.Future>); @override + _i18.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i18.Future.value(''), + ) as _i18.Future); + @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( Invocation.setter( @@ -1309,13 +1343,13 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { returnValueForMissingStub: null, ); @override - _i13.MainDB get db => (super.noSuchMethod( + _i14.MainDB get db => (super.noSuchMethod( Invocation.getter(#db), - returnValue: _FakeMainDB_10( + returnValue: _FakeMainDB_11( this, Invocation.getter(#db), ), - ) as _i13.MainDB); + ) as _i14.MainDB); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1361,7 +1395,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { @override _i18.Future> prepareSendPublic({ required String? address, - required int? amount, + required _i10.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1370,7 +1404,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), @@ -1390,7 +1424,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { @override _i18.Future> prepareSend({ required String? address, - required int? amount, + required _i10.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1399,7 +1433,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), @@ -1734,37 +1768,55 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { returnValue: _i18.Future.value(0), ) as _i18.Future); @override - _i18.Future estimateFeeFor( - int? satoshiAmount, + _i18.Future<_i10.Amount> estimateFeeFor( + _i10.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i18.Future.value(0), - ) as _i18.Future); + returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i18.Future<_i10.Amount>); @override - _i18.Future estimateFeeForPublic( - int? satoshiAmount, + _i18.Future<_i10.Amount> estimateFeeForPublic( + _i10.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeForPublic, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i18.Future.value(0), - ) as _i18.Future); + returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7( + this, + Invocation.method( + #estimateFeeForPublic, + [ + amount, + feeRate, + ], + ), + )), + ) as _i18.Future<_i10.Amount>); @override - int roughFeeEstimate( + _i10.Amount roughFeeEstimate( int? inputCount, int? outputCount, int? feeRatePerKB, @@ -1778,16 +1830,33 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { feeRatePerKB, ], ), - returnValue: 0, - ) as int); + returnValue: _FakeAmount_7( + this, + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + ), + ) as _i10.Amount); @override - _i18.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i18.Future<_i10.Amount> sweepAllEstimate(int? feeRate) => + (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i18.Future.value(0), - ) as _i18.Future); + returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7( + this, + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + )), + ) as _i18.Future<_i10.Amount>); @override _i18.Future>> fastFetch( List? allTxHashes) => @@ -1801,7 +1870,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { ) as _i18.Future>>); @override _i18.Future> getJMintTransactions( - _i12.CachedElectrumX? cachedClient, + _i13.CachedElectrumX? cachedClient, List? transactions, _i17.Coin? coin, ) => @@ -1826,33 +1895,33 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { returnValue: _i18.Future.value(false), ) as _i18.Future); @override - _i14.Decimal availablePrivateBalance() => (super.noSuchMethod( + _i10.Amount availablePrivateBalance() => (super.noSuchMethod( Invocation.method( #availablePrivateBalance, [], ), - returnValue: _FakeDecimal_11( + returnValue: _FakeAmount_7( this, Invocation.method( #availablePrivateBalance, [], ), ), - ) as _i14.Decimal); + ) as _i10.Amount); @override - _i14.Decimal availablePublicBalance() => (super.noSuchMethod( + _i10.Amount availablePublicBalance() => (super.noSuchMethod( Invocation.method( #availablePublicBalance, [], ), - returnValue: _FakeDecimal_11( + returnValue: _FakeAmount_7( this, Invocation.method( #availablePublicBalance, [], ), ), - ) as _i14.Decimal); + ) as _i10.Amount); @override void initCache( String? walletId, @@ -1980,7 +2049,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override - void initWalletDB({_i13.MainDB? mockableOverride}) => super.noSuchMethod( + void initWalletDB({_i14.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( #initWalletDB, [], @@ -2546,35 +2615,35 @@ class MockPriceService extends _i1.Mock implements _i28.PriceService { returnValue: false, ) as bool); @override - _i15.Tuple2<_i14.Decimal, double> getPrice(_i17.Coin? coin) => + _i15.Tuple2<_i29.Decimal, double> getPrice(_i17.Coin? coin) => (super.noSuchMethod( Invocation.method( #getPrice, [coin], ), - returnValue: _FakeTuple2_13<_i14.Decimal, double>( + returnValue: _FakeTuple2_13<_i29.Decimal, double>( this, Invocation.method( #getPrice, [coin], ), ), - ) as _i15.Tuple2<_i14.Decimal, double>); + ) as _i15.Tuple2<_i29.Decimal, double>); @override - _i15.Tuple2<_i14.Decimal, double> getTokenPrice(String? contractAddress) => + _i15.Tuple2<_i29.Decimal, double> getTokenPrice(String? contractAddress) => (super.noSuchMethod( Invocation.method( #getTokenPrice, [contractAddress], ), - returnValue: _FakeTuple2_13<_i14.Decimal, double>( + returnValue: _FakeTuple2_13<_i29.Decimal, double>( this, Invocation.method( #getTokenPrice, [contractAddress], ), ), - ) as _i15.Tuple2<_i14.Decimal, double>); + ) as _i15.Tuple2<_i29.Decimal, double>); @override _i18.Future updatePrice() => (super.noSuchMethod( Invocation.method( @@ -2637,7 +2706,7 @@ class MockPriceService extends _i1.Mock implements _i28.PriceService { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i29.NotesService { +class MockNotesService extends _i1.Mock implements _i30.NotesService { MockNotesService() { _i1.throwOnMissingStub(this); } diff --git a/test/widget_tests/wallet_card_test.dart b/test/widget_tests/wallet_card_test.dart index b2197d88a..c8d2231c8 100644 --- a/test/widget_tests/wallet_card_test.dart +++ b/test/widget_tests/wallet_card_test.dart @@ -1,3 +1,4 @@ +import 'package:decimal/decimal.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -11,6 +12,7 @@ import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/coins/manager.dart'; import 'package:stackwallet/services/locale_service.dart'; import 'package:stackwallet/services/wallets.dart'; +import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; @@ -19,7 +21,12 @@ import 'package:tuple/tuple.dart'; import 'wallet_card_test.mocks.dart'; -// class MockNavigatorObserver extends Mock implements NavigatorObserver {} +/// quick amount constructor wrapper. Using an int is bad practice but for +/// testing with small amounts this should be fine +Amount _a(int i) => Amount.fromDecimal( + Decimal.fromInt(i), + fractionDigits: 8, + ); @GenerateMocks([Wallets, BitcoinWallet, LocaleService]) void main() { @@ -33,10 +40,10 @@ void main() { mockito.when(wallet.balance).thenAnswer( (_) => Balance( coin: Coin.bitcoin, - total: 0, - spendable: 0, - blockedTotal: 0, - pendingSpendable: 0, + total: _a(0), + spendable: _a(0), + blockedTotal: _a(0), + pendingSpendable: _a(0), ), ); @@ -102,10 +109,10 @@ void main() { mockito.when(wallet.balance).thenAnswer( (_) => Balance( coin: Coin.bitcoin, - total: 0, - spendable: 0, - blockedTotal: 0, - pendingSpendable: 0, + total: _a(0), + spendable: _a(0), + blockedTotal: _a(0), + pendingSpendable: _a(0), ), ); diff --git a/test/widget_tests/wallet_card_test.mocks.dart b/test/widget_tests/wallet_card_test.mocks.dart index 5e55a5020..4a2474191 100644 --- a/test/widget_tests/wallet_card_test.mocks.dart +++ b/test/widget_tests/wallet_card_test.mocks.dart @@ -3,12 +3,12 @@ // 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 _i27; -import 'dart:ui' as _i22; +import 'dart:async' as _i21; +import 'dart:typed_data' as _i28; +import 'dart:ui' as _i23; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip32/bip32.dart' as _i17; +import 'package:bip47/bip47.dart' as _i18; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -17,23 +17,24 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12; 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/isar/models/isar_models.dart' as _i16; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/models/signing_data.dart' as _i25; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i23; +import 'package:stackwallet/models/signing_data.dart' as _i26; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i24; 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 _i29; 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 _i19; 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/amount/amount.dart' as _i14; +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 _i26; -import 'package:stackwallet/utilities/prefs.dart' as _i21; -import 'package:tuple/tuple.dart' as _i14; + as _i27; +import 'package:stackwallet/utilities/prefs.dart' as _i22; +import 'package:tuple/tuple.dart' as _i15; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -170,9 +171,8 @@ class _FakeElectrumXNode_11 extends _i1.SmartFake implements _i9.ElectrumXNode { ); } -class _FakeTuple2_12 extends _i1.SmartFake - implements _i14.Tuple2 { - _FakeTuple2_12( +class _FakeAmount_12 extends _i1.SmartFake implements _i14.Amount { + _FakeAmount_12( Object parent, Invocation parentInvocation, ) : super( @@ -181,8 +181,9 @@ class _FakeTuple2_12 extends _i1.SmartFake ); } -class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { - _FakeAddress_13( +class _FakeTuple2_13 extends _i1.SmartFake + implements _i15.Tuple2 { + _FakeTuple2_13( Object parent, Invocation parentInvocation, ) : super( @@ -191,8 +192,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( +class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address { + _FakeAddress_14( Object parent, Invocation parentInvocation, ) : super( @@ -201,8 +202,18 @@ class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { ); } -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( +class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 { + _FakeBIP32_15( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePaymentCode_16 extends _i1.SmartFake implements _i18.PaymentCode { + _FakePaymentCode_16( Object parent, Invocation parentInvocation, ) : super( @@ -214,7 +225,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 _i19.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -281,7 +292,7 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i19.Coin? coin}) => + List getWalletIdsFor({required _i20.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -291,21 +302,21 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { returnValue: [], ) as List); @override - List<_i14.Tuple2<_i19.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> + List<_i15.Tuple2<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), returnValue: < - _i14.Tuple2<_i19.Coin, + _i15.Tuple2<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>[], ) as List< - _i14.Tuple2<_i19.Coin, + _i15.Tuple2<_i20.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i19.Coin? coin) => + _i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -369,17 +380,17 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { returnValueForMissingStub: null, ); @override - _i20.Future load(_i21.Prefs? prefs) => (super.noSuchMethod( + _i21.Future load(_i22.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future loadAfterStackRestore( - _i21.Prefs? prefs, + _i21.Future loadAfterStackRestore( + _i22.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -390,11 +401,11 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { managers, ], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -402,7 +413,7 @@ class MockWallets extends _i1.Mock implements _i18.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -422,13 +433,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 _i24.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i20.Timer? _timer) => super.noSuchMethod( + set timer(_i21.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -505,74 +516,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: false, ) as bool); @override - _i19.Coin get coin => (super.noSuchMethod( + _i20.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i19.Coin.bitcoin, - ) as _i19.Coin); + returnValue: _i20.Coin.bitcoin, + ) as _i20.Coin); @override - _i20.Future> get utxos => (super.noSuchMethod( + _i21.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i20.Future>.value(<_i15.UTXO>[]), - ) as _i20.Future>); + returnValue: _i21.Future>.value(<_i16.UTXO>[]), + ) as _i21.Future>); @override - _i20.Future> get transactions => (super.noSuchMethod( + _i21.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i20.Future>.value(<_i15.Transaction>[]), - ) as _i20.Future>); + _i21.Future>.value(<_i16.Transaction>[]), + ) as _i21.Future>); @override - _i20.Future get currentReceivingAddress => (super.noSuchMethod( + _i21.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i20.Future get currentChangeAddress => (super.noSuchMethod( + _i21.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i20.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i21.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i20.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i21.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i20.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i21.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i20.Future<_i8.FeeObject>); + ) as _i21.Future<_i8.FeeObject>); @override - _i20.Future get maxFee => (super.noSuchMethod( + _i21.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i20.Future> get mnemonic => (super.noSuchMethod( + _i21.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i20.Future>.value([]), - ) as _i20.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i20.Future get mnemonicString => (super.noSuchMethod( + _i21.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future get mnemonicPassphrase => (super.noSuchMethod( + _i21.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future get chainHeight => (super.noSuchMethod( + _i21.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -644,6 +655,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ), ) as _i11.Balance); @override + _i21.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i21.Future.value(''), + ) as _i21.Future); + @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( Invocation.setter( @@ -669,26 +685,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i20.Future exit() => (super.noSuchMethod( + _i21.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i24.DerivePathType addressType({required String? address}) => + _i25.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i24.DerivePathType.bip44, - ) as _i24.DerivePathType); + returnValue: _i25.DerivePathType.bip44, + ) as _i25.DerivePathType); @override - _i20.Future recoverFromMnemonic({ + _i21.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -707,49 +723,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #height: height, }, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future getTransactionCacheEarly(List? allAddresses) => + _i21.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i21.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i20.Future.value(false), - ) as _i20.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i20.Future getAllTxsToWatch() => (super.noSuchMethod( + _i21.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future refresh() => (super.noSuchMethod( + _i21.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future> prepareSend({ + _i21.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -758,31 +774,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i20.Future>.value({}), - ) as _i20.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i20.Future confirmSend({required Map? txData}) => + _i21.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i20.Future testNetworkConnection() => (super.noSuchMethod( + _i21.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i20.Future.value(false), - ) as _i20.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -800,33 +816,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i20.Future initializeNew() => (super.noSuchMethod( + _i21.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future initializeExisting() => (super.noSuchMethod( + _i21.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future updateSentCachedTxData(Map? txData) => + _i21.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -836,35 +852,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: false, ) as bool); @override - _i20.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i21.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i21.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i20.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i21.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i20.Future<_i9.ElectrumXNode>); + ) as _i21.Future<_i9.ElectrumXNode>); @override - _i20.Future addDerivation({ + _i21.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i24.DerivePathType? derivePathType, + required _i25.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -878,13 +894,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future addDerivations({ + _i21.Future addDerivations({ required int? chain, - required _i24.DerivePathType? derivePathType, + required _i25.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -897,50 +913,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future>> fastFetch( + _i21.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i20.Future>>.value( + returnValue: _i21.Future>>.value( >[]), - ) as _i20.Future>>); + ) as _i21.Future>>); @override - _i20.Future getTxCount({required String? address}) => + _i21.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i21.Future.value(0), + ) as _i21.Future); @override - _i20.Future checkCurrentReceivingAddressesForTransactions() => + _i21.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future checkCurrentChangeAddressesForTransactions() => + _i21.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int estimateTxFee({ required int? vSize, @@ -965,7 +981,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { required bool? coinControl, required bool? isSendAll, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => super.noSuchMethod(Invocation.method( #coinSelection, @@ -981,19 +997,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, )); @override - _i20.Future> fetchBuildTxData( - List<_i15.UTXO>? utxosToUse) => + _i21.Future> fetchBuildTxData( + List<_i16.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( #fetchBuildTxData, [utxosToUse], ), returnValue: - _i20.Future>.value(<_i25.SigningData>[]), - ) as _i20.Future>); + _i21.Future>.value(<_i26.SigningData>[]), + ) as _i21.Future>); @override - _i20.Future> buildTransaction({ - required List<_i25.SigningData>? utxoSigningData, + _i21.Future> buildTransaction({ + required List<_i26.SigningData>? utxoSigningData, required List? recipients, required List? satoshiAmounts, }) => @@ -1008,10 +1024,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), returnValue: - _i20.Future>.value({}), - ) as _i20.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i20.Future fullRescan( + _i21.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1023,26 +1039,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future estimateFeeFor( - int? satoshiAmount, + _i21.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i21.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i21.Future<_i14.Amount>); @override - int roughFeeEstimate( + _i14.Amount roughFeeEstimate( int? inputCount, int? outputCount, int? feeRatePerKB, @@ -1056,28 +1081,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { feeRatePerKB, ], ), - returnValue: 0, - ) as int); + returnValue: _FakeAmount_12( + this, + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + ), + ) as _i14.Amount); @override - _i20.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i21.Future<_i14.Amount> sweepAllEstimate(int? feeRate) => + (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i20.Future.value(0), - ) as _i20.Future); + returnValue: _i21.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + )), + ) as _i21.Future<_i14.Amount>); @override - _i20.Future generateNewAddress() => (super.noSuchMethod( + _i21.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i20.Future.value(false), - ) as _i20.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override void initCache( String? walletId, - _i19.Coin? coin, + _i20.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1090,14 +1132,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i20.Future updateCachedId(String? id) => (super.noSuchMethod( + _i21.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1107,14 +1149,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: 0, ) as int); @override - _i20.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i21.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1124,15 +1166,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: false, ) as bool); @override - _i20.Future updateCachedIsFavorite(bool? isFavorite) => + _i21.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1148,15 +1190,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ), ) as _i11.Balance); @override - _i20.Future updateCachedBalance(_i11.Balance? balance) => + _i21.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1172,15 +1214,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ), ) as _i11.Balance); @override - _i20.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i21.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override List getWalletTokenContractAddresses() => (super.noSuchMethod( Invocation.method( @@ -1190,16 +1232,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValue: [], ) as List); @override - _i20.Future updateWalletTokenContractAddresses( + _i21.Future updateWalletTokenContractAddresses( List? contractAddresses) => (super.noSuchMethod( Invocation.method( #updateWalletTokenContractAddresses, [contractAddresses], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1210,11 +1252,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i20.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i21.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction( Map? txData, dynamic electrumxClient, - List<_i15.Address>? myAddresses, - _i19.Coin? coin, + List<_i16.Address>? myAddresses, + _i20.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1231,8 +1273,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ], ), returnValue: - _i20.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( - _FakeTuple2_12<_i15.Transaction, _i15.Address>( + _i21.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value( + _FakeTuple2_13<_i16.Transaction, _i16.Address>( this, Invocation.method( #parseTransaction, @@ -1246,42 +1288,42 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { ], ), )), - ) as _i20.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i21.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i19.Coin? coin, + required _i20.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i26.SecureStorageInterface? secureStorage, + required _i27.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i20.Future Function()? getMnemonicString, - required _i20.Future Function()? getMnemonicPassphrase, - required _i20.Future Function()? getChainHeight, - required _i20.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 _i20.Future> Function({ + required _i21.Future> Function({ required String address, - required int satoshiAmount, + required _i14.Amount amount, Map? args, })? prepareSend, - required _i20.Future Function({required String address})? getTxCount, - required _i20.Future> Function(List<_i15.UTXO>)? + required _i21.Future Function({required String address})? getTxCount, + required _i21.Future> Function(List<_i16.UTXO>)? fetchBuildTxData, - required _i20.Future Function()? refresh, - required _i20.Future Function()? checkChangeAddressForTransactions, - required _i20.Future Function({ + required _i21.Future Function()? refresh, + required _i21.Future Function()? checkChangeAddressForTransactions, + required _i21.Future Function({ required String address, required int chain, - required _i24.DerivePathType derivePathType, + required _i25.DerivePathType derivePathType, required String pubKey, required String wif, })? @@ -1318,44 +1360,44 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i20.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i21.Future<_i16.Address> currentReceivingPaynymAddress( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i20.Future<_i15.Address>); + ) as _i21.Future<_i16.Address>); @override - _i20.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i21.Future checkCurrentPaynymReceivingAddressForTransactions( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i21.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future<_i16.BIP32> deriveNotificationBip32Node({ + _i21.Future<_i17.BIP32> deriveNotificationBip32Node({ required String? mnemonic, required String? mnemonicPassphrase, }) => @@ -1368,7 +1410,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #mnemonicPassphrase: mnemonicPassphrase, }, ), - returnValue: _i20.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i21.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveNotificationBip32Node, @@ -1379,9 +1421,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), )), - ) as _i20.Future<_i16.BIP32>); + ) as _i21.Future<_i17.BIP32>); @override - _i20.Future<_i16.BIP32> deriveReceivingPrivateKeyNode({ + _i21.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({ required String? mnemonic, required String? mnemonicPassphrase, required int? index, @@ -1396,7 +1438,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #index: index, }, ), - returnValue: _i20.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i21.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveReceivingPrivateKeyNode, @@ -1408,45 +1450,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), )), - ) as _i20.Future<_i16.BIP32>); + ) as _i21.Future<_i17.BIP32>); @override - _i20.Future<_i17.PaymentCode> getPaymentCode( - _i24.DerivePathType? derivePathType) => + _i21.Future<_i18.PaymentCode> getPaymentCode( + _i25.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i20.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i21.Future<_i18.PaymentCode>.value(_FakePaymentCode_16( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i20.Future<_i17.PaymentCode>); + ) as _i21.Future<_i18.PaymentCode>); @override - _i20.Future<_i27.Uint8List> signWithNotificationKey(_i27.Uint8List? data) => + _i21.Future<_i28.Uint8List> signWithNotificationKey(_i28.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i20.Future<_i27.Uint8List>.value(_i27.Uint8List(0)), - ) as _i20.Future<_i27.Uint8List>); + returnValue: _i21.Future<_i28.Uint8List>.value(_i28.Uint8List(0)), + ) as _i21.Future<_i28.Uint8List>); @override - _i20.Future signStringWithNotificationKey(String? data) => + _i21.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i20.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, - required int? amount, + _i21.Future> preparePaymentCodeSend({ + required _i18.PaymentCode? paymentCode, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1455,17 +1497,17 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { [], { #paymentCode: paymentCode, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i20.Future>.value({}), - ) as _i20.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i20.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i16.BIP32? privateKeyNode, + _i21.Future<_i16.Address> nextUnusedSendAddressFrom({ + required _i18.PaymentCode? pCode, + required _i17.BIP32? privateKeyNode, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1478,7 +1520,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1490,13 +1532,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), )), - ) as _i20.Future<_i15.Address>); + ) as _i21.Future<_i16.Address>); @override - _i20.Future> prepareNotificationTx({ + _i21.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => (super.noSuchMethod( Invocation.method( @@ -1510,10 +1552,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), returnValue: - _i20.Future>.value({}), - ) as _i20.Future>); + _i21.Future>.value({}), + ) as _i21.Future>); @override - _i20.Future broadcastNotificationTx( + _i21.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1521,21 +1563,21 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override - _i20.Future hasConnected(String? paymentCodeString) => + _i21.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i20.Future.value(false), - ) as _i20.Future); + returnValue: _i21.Future.value(false), + ) as _i21.Future); @override - _i20.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i21.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1546,12 +1588,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i20.Future<_i17.PaymentCode?>.value(), - ) as _i20.Future<_i17.PaymentCode?>); + returnValue: _i21.Future<_i18.PaymentCode?>.value(), + ) as _i21.Future<_i18.PaymentCode?>); @override - _i20.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i21.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1562,31 +1604,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i20.Future<_i17.PaymentCode?>.value(), - ) as _i20.Future<_i17.PaymentCode?>); + returnValue: _i21.Future<_i18.PaymentCode?>.value(), + ) as _i21.Future<_i18.PaymentCode?>); @override - _i20.Future> + _i21.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i20.Future>.value(<_i17.PaymentCode>[]), - ) as _i20.Future>); + _i21.Future>.value(<_i18.PaymentCode>[]), + ) as _i21.Future>); @override - _i20.Future checkForNotificationTransactionsTo( + _i21.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future restoreAllHistory({ + _i21.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1601,12 +1643,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i21.Future restoreHistoryWith( + _i18.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1619,15 +1661,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i21.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i24.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i25.DerivePathType? derivePathType, + required _i18.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1640,7 +1682,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1653,13 +1695,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), )), - ) as _i20.Future<_i15.Address>); + ) as _i21.Future<_i16.Address>); @override - _i20.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i21.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i24.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i25.DerivePathType? derivePathType, + required _i18.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1672,7 +1714,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1685,58 +1727,58 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { }, ), )), - ) as _i20.Future<_i15.Address>); + ) as _i21.Future<_i16.Address>); @override - _i20.Future<_i15.Address> getMyNotificationAddress( - _i24.DerivePathType? derivePathType) => + _i21.Future<_i16.Address> getMyNotificationAddress( + _i25.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i20.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i20.Future<_i15.Address>); + ) as _i21.Future<_i16.Address>); @override - _i20.Future> lookupKey(String? paymentCodeString) => + _i21.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i20.Future>.value([]), - ) as _i20.Future>); + returnValue: _i21.Future>.value([]), + ) as _i21.Future>); @override - _i20.Future paymentCodeStringByKey(String? key) => + _i21.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + ) as _i21.Future); @override - _i20.Future storeCode(String? paymentCodeString) => + _i21.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i20.Future.value(''), - ) as _i20.Future); + returnValue: _i21.Future.value(''), + ) as _i21.Future); @override void initCoinControlInterface({ required String? walletId, required String? walletName, - required _i19.Coin? coin, + required _i20.Coin? coin, required _i12.MainDB? db, - required _i20.Future Function()? getChainHeight, - required _i20.Future Function(_i11.Balance)? refreshedBalanceCallback, + required _i21.Future Function()? getChainHeight, + required _i21.Future Function(_i11.Balance)? refreshedBalanceCallback, }) => super.noSuchMethod( Invocation.method( @@ -1754,22 +1796,22 @@ class MockBitcoinWallet extends _i1.Mock implements _i23.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i20.Future refreshBalance({bool? notify = false}) => + _i21.Future refreshBalance({bool? notify = false}) => (super.noSuchMethod( Invocation.method( #refreshBalance, [], {#notify: notify}, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _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 _i29.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -1785,17 +1827,17 @@ class MockLocaleService extends _i1.Mock implements _i28.LocaleService { returnValue: false, ) as bool); @override - _i20.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i21.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i20.Future.value(), - returnValueForMissingStub: _i20.Future.value(), - ) as _i20.Future); + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); @override - void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i23.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1803,7 +1845,7 @@ class MockLocaleService extends _i1.Mock implements _i28.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i23.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.dart b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.dart index 2d4800a36..943a02e99 100644 --- a/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.dart +++ b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.dart @@ -11,6 +11,7 @@ import 'package:stackwallet/services/coins/manager.dart'; import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/wallets.dart'; import 'package:stackwallet/services/wallets_service.dart'; +import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; @@ -39,10 +40,10 @@ void main() { when(wallet.balance).thenAnswer( (_) => Balance( coin: Coin.bitcoin, - total: 0, - spendable: 0, - blockedTotal: 0, - pendingSpendable: 0, + total: Amount.zero, + spendable: Amount.zero, + blockedTotal: Amount.zero, + pendingSpendable: Amount.zero, ), ); 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 9d99f22ed..9af377170 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,12 @@ // 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 _i23; +import 'dart:typed_data' as _i29; +import 'dart:ui' as _i25; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip32/bip32.dart' as _i17; +import 'package:bip47/bip47.dart' as _i18; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -17,24 +17,25 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12; 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/isar/models/isar_models.dart' as _i16; +import 'package:stackwallet/models/node_model.dart' as _i30; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/models/signing_data.dart' as _i27; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i25; -import 'package:stackwallet/services/coins/coin_service.dart' as _i19; +import 'package:stackwallet/models/signing_data.dart' as _i28; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i26; +import 'package:stackwallet/services/coins/coin_service.dart' as _i20; 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 _i21; 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/amount/amount.dart' as _i14; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i22; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i27; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i18; -import 'package:stackwallet/utilities/prefs.dart' as _i23; -import 'package:tuple/tuple.dart' as _i14; + as _i19; +import 'package:stackwallet/utilities/prefs.dart' as _i24; +import 'package:tuple/tuple.dart' as _i15; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -171,9 +172,8 @@ class _FakeElectrumXNode_11 extends _i1.SmartFake implements _i9.ElectrumXNode { ); } -class _FakeTuple2_12 extends _i1.SmartFake - implements _i14.Tuple2 { - _FakeTuple2_12( +class _FakeAmount_12 extends _i1.SmartFake implements _i14.Amount { + _FakeAmount_12( Object parent, Invocation parentInvocation, ) : super( @@ -182,8 +182,9 @@ class _FakeTuple2_12 extends _i1.SmartFake ); } -class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { - _FakeAddress_13( +class _FakeTuple2_13 extends _i1.SmartFake + implements _i15.Tuple2 { + _FakeTuple2_13( Object parent, Invocation parentInvocation, ) : super( @@ -192,8 +193,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( +class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address { + _FakeAddress_14( Object parent, Invocation parentInvocation, ) : super( @@ -202,8 +203,8 @@ class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { ); } -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( +class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 { + _FakeBIP32_15( Object parent, Invocation parentInvocation, ) : super( @@ -212,9 +213,8 @@ class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { ); } -class _FakeSecureStorageInterface_16 extends _i1.SmartFake - implements _i18.SecureStorageInterface { - _FakeSecureStorageInterface_16( +class _FakePaymentCode_16 extends _i1.SmartFake implements _i18.PaymentCode { + _FakePaymentCode_16( Object parent, Invocation parentInvocation, ) : super( @@ -223,9 +223,20 @@ class _FakeSecureStorageInterface_16 extends _i1.SmartFake ); } -class _FakeCoinServiceAPI_17 extends _i1.SmartFake - implements _i19.CoinServiceAPI { - _FakeCoinServiceAPI_17( +class _FakeSecureStorageInterface_17 extends _i1.SmartFake + implements _i19.SecureStorageInterface { + _FakeSecureStorageInterface_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCoinServiceAPI_18 extends _i1.SmartFake + implements _i20.CoinServiceAPI { + _FakeCoinServiceAPI_18( Object parent, Invocation parentInvocation, ) : super( @@ -237,7 +248,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 _i21.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -304,7 +315,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i21.Coin? coin}) => + List getWalletIdsFor({required _i22.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -314,21 +325,21 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValue: [], ) as List); @override - List<_i14.Tuple2<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> + List<_i15.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), returnValue: < - _i14.Tuple2<_i21.Coin, + _i15.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>[], ) as List< - _i14.Tuple2<_i21.Coin, + _i15.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i21.Coin? coin) => + _i22.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -392,17 +403,17 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - _i22.Future load(_i23.Prefs? prefs) => (super.noSuchMethod( + _i23.Future load(_i24.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future loadAfterStackRestore( - _i23.Prefs? prefs, + _i23.Future loadAfterStackRestore( + _i24.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -413,11 +424,11 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { managers, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -425,7 +436,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -451,19 +462,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i22.Future> get walletNames => + _i23.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i22.Future>.value( + returnValue: _i23.Future>.value( {}), - ) as _i22.Future>); + ) as _i23.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future renameWallet({ + _i23.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -478,8 +489,8 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( @@ -489,10 +500,10 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValue: {}, ) as Map); @override - _i22.Future addExistingStackWallet({ + _i23.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i21.Coin? coin, + required _i22.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -506,13 +517,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addNewWallet({ + _i23.Future addNewWallet({ required String? name, - required _i21.Coin? coin, + required _i22.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -525,46 +536,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i23.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future saveFavoriteWalletIds(List? walletIds) => + _i23.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i23.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i23.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future moveFavorite({ + _i23.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -577,48 +588,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i23.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i23.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future isMnemonicVerified({required String? walletId}) => + _i23.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future setMnemonicVerified({required String? walletId}) => + _i23.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future deleteWallet( + _i23.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -630,20 +641,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future refreshWallets(bool? shouldNotifyListeners) => + _i23.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -651,7 +662,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -679,13 +690,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 _i26.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i22.Timer? _timer) => super.noSuchMethod( + set timer(_i23.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -762,74 +773,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i16.UTXO>[]), + ) as _i23.Future>); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i16.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future get currentChangeAddress => (super.noSuchMethod( + _i23.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i23.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i23.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i23.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicString => (super.noSuchMethod( + _i23.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get chainHeight => (super.noSuchMethod( + _i23.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -901,6 +912,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override + _i23.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i23.Future.value(''), + ) as _i23.Future); + @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( Invocation.setter( @@ -926,26 +942,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i22.Future exit() => (super.noSuchMethod( + _i23.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i26.DerivePathType addressType({required String? address}) => + _i27.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i26.DerivePathType.bip44, - ) as _i26.DerivePathType); + returnValue: _i27.DerivePathType.bip44, + ) as _i27.DerivePathType); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -964,49 +980,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future getTransactionCacheEarly(List? allAddresses) => + _i23.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i23.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future getAllTxsToWatch() => (super.noSuchMethod( + _i23.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1015,31 +1031,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1057,33 +1073,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i23.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1093,35 +1109,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i23.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i22.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i23.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i22.Future<_i9.ElectrumXNode>); + ) as _i23.Future<_i9.ElectrumXNode>); @override - _i22.Future addDerivation({ + _i23.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i26.DerivePathType? derivePathType, + required _i27.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1135,13 +1151,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addDerivations({ + _i23.Future addDerivations({ required int? chain, - required _i26.DerivePathType? derivePathType, + required _i27.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1154,50 +1170,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future>> fastFetch( + _i23.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i22.Future>>.value( + returnValue: _i23.Future>>.value( >[]), - ) as _i22.Future>>); + ) as _i23.Future>>); @override - _i22.Future getTxCount({required String? address}) => + _i23.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future checkCurrentReceivingAddressesForTransactions() => + _i23.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkCurrentChangeAddressesForTransactions() => + _i23.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override int estimateTxFee({ required int? vSize, @@ -1222,7 +1238,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { required bool? coinControl, required bool? isSendAll, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => super.noSuchMethod(Invocation.method( #coinSelection, @@ -1238,19 +1254,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, )); @override - _i22.Future> fetchBuildTxData( - List<_i15.UTXO>? utxosToUse) => + _i23.Future> fetchBuildTxData( + List<_i16.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( #fetchBuildTxData, [utxosToUse], ), returnValue: - _i22.Future>.value(<_i27.SigningData>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i28.SigningData>[]), + ) as _i23.Future>); @override - _i22.Future> buildTransaction({ - required List<_i27.SigningData>? utxoSigningData, + _i23.Future> buildTransaction({ + required List<_i28.SigningData>? utxoSigningData, required List? recipients, required List? satoshiAmounts, }) => @@ -1265,10 +1281,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1280,26 +1296,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - int roughFeeEstimate( + _i14.Amount roughFeeEstimate( int? inputCount, int? outputCount, int? feeRatePerKB, @@ -1313,28 +1338,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { feeRatePerKB, ], ), - returnValue: 0, - ) as int); + returnValue: _FakeAmount_12( + this, + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + ), + ) as _i14.Amount); @override - _i22.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i23.Future<_i14.Amount> sweepAllEstimate(int? feeRate) => + (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override void initCache( String? walletId, - _i21.Coin? coin, + _i22.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1347,14 +1389,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future updateCachedId(String? id) => (super.noSuchMethod( + _i23.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1364,14 +1406,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i23.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1381,15 +1423,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateCachedIsFavorite(bool? isFavorite) => + _i23.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1405,15 +1447,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalance(_i11.Balance? balance) => + _i23.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1429,15 +1471,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i23.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override List getWalletTokenContractAddresses() => (super.noSuchMethod( Invocation.method( @@ -1447,16 +1489,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: [], ) as List); @override - _i22.Future updateWalletTokenContractAddresses( + _i23.Future updateWalletTokenContractAddresses( List? contractAddresses) => (super.noSuchMethod( Invocation.method( #updateWalletTokenContractAddresses, [contractAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1467,11 +1509,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction( Map? txData, dynamic electrumxClient, - List<_i15.Address>? myAddresses, - _i21.Coin? coin, + List<_i16.Address>? myAddresses, + _i22.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1488,8 +1530,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), returnValue: - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( - _FakeTuple2_12<_i15.Transaction, _i15.Address>( + _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value( + _FakeTuple2_13<_i16.Transaction, _i16.Address>( this, Invocation.method( #parseTransaction, @@ -1503,42 +1545,42 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), )), - ) as _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i21.Coin? coin, + required _i22.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i18.SecureStorageInterface? secureStorage, + required _i19.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i22.Future Function()? getMnemonicString, - required _i22.Future Function()? getMnemonicPassphrase, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function()? getCurrentChangeAddress, + required _i23.Future Function()? getMnemonicString, + required _i23.Future Function()? getMnemonicPassphrase, + required _i23.Future Function()? getChainHeight, + required _i23.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i22.Future> Function({ + required _i23.Future> Function({ required String address, - required int satoshiAmount, + required _i14.Amount amount, Map? args, })? prepareSend, - required _i22.Future Function({required String address})? getTxCount, - required _i22.Future> Function(List<_i15.UTXO>)? + required _i23.Future Function({required String address})? getTxCount, + required _i23.Future> Function(List<_i16.UTXO>)? fetchBuildTxData, - required _i22.Future Function()? refresh, - required _i22.Future Function()? checkChangeAddressForTransactions, - required _i22.Future Function({ + required _i23.Future Function()? refresh, + required _i23.Future Function()? checkChangeAddressForTransactions, + required _i23.Future Function({ required String address, required int chain, - required _i26.DerivePathType derivePathType, + required _i27.DerivePathType derivePathType, required String pubKey, required String wif, })? @@ -1575,44 +1617,44 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i23.Future<_i16.Address> currentReceivingPaynymAddress( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i23.Future checkCurrentPaynymReceivingAddressForTransactions( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i23.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i16.BIP32> deriveNotificationBip32Node({ + _i23.Future<_i17.BIP32> deriveNotificationBip32Node({ required String? mnemonic, required String? mnemonicPassphrase, }) => @@ -1625,7 +1667,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #mnemonicPassphrase: mnemonicPassphrase, }, ), - returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveNotificationBip32Node, @@ -1636,9 +1678,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.BIP32>); + ) as _i23.Future<_i17.BIP32>); @override - _i22.Future<_i16.BIP32> deriveReceivingPrivateKeyNode({ + _i23.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({ required String? mnemonic, required String? mnemonicPassphrase, required int? index, @@ -1653,7 +1695,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #index: index, }, ), - returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveReceivingPrivateKeyNode, @@ -1665,45 +1707,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.BIP32>); + ) as _i23.Future<_i17.BIP32>); @override - _i22.Future<_i17.PaymentCode> getPaymentCode( - _i26.DerivePathType? derivePathType) => + _i23.Future<_i18.PaymentCode> getPaymentCode( + _i27.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i22.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i23.Future<_i18.PaymentCode>.value(_FakePaymentCode_16( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i22.Future<_i17.PaymentCode>); + ) as _i23.Future<_i18.PaymentCode>); @override - _i22.Future<_i28.Uint8List> signWithNotificationKey(_i28.Uint8List? data) => + _i23.Future<_i29.Uint8List> signWithNotificationKey(_i29.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i22.Future<_i28.Uint8List>.value(_i28.Uint8List(0)), - ) as _i22.Future<_i28.Uint8List>); + returnValue: _i23.Future<_i29.Uint8List>.value(_i29.Uint8List(0)), + ) as _i23.Future<_i29.Uint8List>); @override - _i22.Future signStringWithNotificationKey(String? data) => + _i23.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, - required int? amount, + _i23.Future> preparePaymentCodeSend({ + required _i18.PaymentCode? paymentCode, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1712,17 +1754,17 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #paymentCode: paymentCode, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i16.BIP32? privateKeyNode, + _i23.Future<_i16.Address> nextUnusedSendAddressFrom({ + required _i18.PaymentCode? pCode, + required _i17.BIP32? privateKeyNode, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1735,7 +1777,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1747,13 +1789,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future> prepareNotificationTx({ + _i23.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => (super.noSuchMethod( Invocation.method( @@ -1767,10 +1809,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future broadcastNotificationTx( + _i23.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1778,21 +1820,21 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future hasConnected(String? paymentCodeString) => + _i23.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1803,12 +1845,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i17.PaymentCode?>.value(), - ) as _i22.Future<_i17.PaymentCode?>); + returnValue: _i23.Future<_i18.PaymentCode?>.value(), + ) as _i23.Future<_i18.PaymentCode?>); @override - _i22.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1819,31 +1861,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i17.PaymentCode?>.value(), - ) as _i22.Future<_i17.PaymentCode?>); + returnValue: _i23.Future<_i18.PaymentCode?>.value(), + ) as _i23.Future<_i18.PaymentCode?>); @override - _i22.Future> + _i23.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i22.Future>.value(<_i17.PaymentCode>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i18.PaymentCode>[]), + ) as _i23.Future>); @override - _i22.Future checkForNotificationTransactionsTo( + _i23.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future restoreAllHistory({ + _i23.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1858,12 +1900,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i23.Future restoreHistoryWith( + _i18.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1876,15 +1918,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i23.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i27.DerivePathType? derivePathType, + required _i18.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1897,7 +1939,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1910,13 +1952,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i23.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i27.DerivePathType? derivePathType, + required _i18.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1929,7 +1971,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1942,58 +1984,58 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future<_i15.Address> getMyNotificationAddress( - _i26.DerivePathType? derivePathType) => + _i23.Future<_i16.Address> getMyNotificationAddress( + _i27.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future> lookupKey(String? paymentCodeString) => + _i23.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future paymentCodeStringByKey(String? key) => + _i23.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future storeCode(String? paymentCodeString) => + _i23.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override void initCoinControlInterface({ required String? walletId, required String? walletName, - required _i21.Coin? coin, + required _i22.Coin? coin, required _i12.MainDB? db, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function(_i11.Balance)? refreshedBalanceCallback, + required _i23.Future Function()? getChainHeight, + required _i23.Future Function(_i11.Balance)? refreshedBalanceCallback, }) => super.noSuchMethod( Invocation.method( @@ -2011,16 +2053,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future refreshBalance({bool? notify = false}) => + _i23.Future refreshBalance({bool? notify = false}) => (super.noSuchMethod( Invocation.method( #refreshBalance, [], {#notify: notify}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); } /// A class which mocks [NodeService]. @@ -2028,41 +2070,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( + _i19.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_16( + returnValue: _FakeSecureStorageInterface_17( this, Invocation.getter(#secureStorageInterface), ), - ) as _i18.SecureStorageInterface); + ) as _i19.SecureStorageInterface); @override - List<_i29.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i30.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i30.NodeModel>[], + ) as List<_i30.NodeModel>); @override - List<_i29.NodeModel> get nodes => (super.noSuchMethod( + List<_i30.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i30.NodeModel>[], + ) as List<_i30.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateDefaults() => (super.noSuchMethod( + _i23.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future setPrimaryNodeFor({ - required _i21.Coin? coin, - required _i29.NodeModel? node, + _i23.Future setPrimaryNodeFor({ + required _i22.Coin? coin, + required _i30.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -2075,44 +2117,44 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i29.NodeModel? getPrimaryNodeFor({required _i21.Coin? coin}) => + _i30.NodeModel? getPrimaryNodeFor({required _i22.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i29.NodeModel?); + )) as _i30.NodeModel?); @override - List<_i29.NodeModel> getNodesFor(_i21.Coin? coin) => (super.noSuchMethod( + List<_i30.NodeModel> getNodesFor(_i22.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i30.NodeModel>[], + ) as List<_i30.NodeModel>); @override - _i29.NodeModel? getNodeById({required String? id}) => + _i30.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i29.NodeModel?); + )) as _i30.NodeModel?); @override - List<_i29.NodeModel> failoverNodesFor({required _i21.Coin? coin}) => + List<_i30.NodeModel> failoverNodesFor({required _i22.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i30.NodeModel>[], + ) as List<_i30.NodeModel>); @override - _i22.Future add( - _i29.NodeModel? node, + _i23.Future add( + _i30.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -2125,11 +2167,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future delete( + _i23.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -2141,11 +2183,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future setEnabledState( + _i23.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -2159,12 +2201,12 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future edit( - _i29.NodeModel? editedNode, + _i23.Future edit( + _i30.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -2177,20 +2219,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateCommunityNodes() => (super.noSuchMethod( + _i23.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2198,7 +2240,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2241,23 +2283,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i19.CoinServiceAPI get wallet => (super.noSuchMethod( + _i20.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_17( + returnValue: _FakeCoinServiceAPI_18( this, Invocation.getter(#wallet), ), - ) as _i19.CoinServiceAPI); + ) as _i20.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2290,23 +2332,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i23.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i23.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2316,16 +2358,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i16.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i16.UTXO>[]), + ) as _i23.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2345,15 +2387,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2390,19 +2432,29 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i23.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i23.Future.value(''), + ) as _i23.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2412,9 +2464,9 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -2423,32 +2475,32 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2458,33 +2510,33 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -2503,20 +2555,20 @@ class MockManager extends _i1.Mock implements _i6.Manager { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future exitCurrentWallet() => (super.noSuchMethod( + _i23.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2528,43 +2580,52 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future resetRescanOnOpen() => (super.noSuchMethod( + _i23.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2572,7 +2633,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2592,7 +2653,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 _i20.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -2603,10 +2664,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2639,23 +2700,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i23.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i23.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2665,16 +2726,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i16.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i16.UTXO>[]), + ) as _i23.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2694,20 +2755,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicString => (super.noSuchMethod( + _i23.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -2724,9 +2785,9 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: 0, ) as int); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -2735,41 +2796,41 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2779,15 +2840,15 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -2806,38 +2867,38 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future exit() => (super.noSuchMethod( + _i23.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2849,40 +2910,49 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i23.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); } diff --git a/test/widget_tests/wallet_info_row/wallet_info_row_test.dart b/test/widget_tests/wallet_info_row/wallet_info_row_test.dart index c14cbb896..4308ac273 100644 --- a/test/widget_tests/wallet_info_row/wallet_info_row_test.dart +++ b/test/widget_tests/wallet_info_row/wallet_info_row_test.dart @@ -11,6 +11,7 @@ import 'package:stackwallet/services/coins/manager.dart'; import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/wallets.dart'; import 'package:stackwallet/services/wallets_service.dart'; +import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; @@ -39,10 +40,10 @@ void main() { when(wallet.balance).thenAnswer( (_) => Balance( coin: Coin.bitcoin, - total: 0, - spendable: 0, - blockedTotal: 0, - pendingSpendable: 0, + total: Amount.zero, + spendable: Amount.zero, + blockedTotal: Amount.zero, + pendingSpendable: Amount.zero, ), ); 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 e4daea467..6f7afb7fc 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,12 @@ // 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 _i23; +import 'dart:typed_data' as _i29; +import 'dart:ui' as _i25; -import 'package:bip32/bip32.dart' as _i16; -import 'package:bip47/bip47.dart' as _i17; +import 'package:bip32/bip32.dart' as _i17; +import 'package:bip47/bip47.dart' as _i18; import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; @@ -17,24 +17,25 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12; 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/isar/models/isar_models.dart' as _i16; +import 'package:stackwallet/models/node_model.dart' as _i30; import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; -import 'package:stackwallet/models/signing_data.dart' as _i27; -import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i25; -import 'package:stackwallet/services/coins/coin_service.dart' as _i19; +import 'package:stackwallet/models/signing_data.dart' as _i28; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i26; +import 'package:stackwallet/services/coins/coin_service.dart' as _i20; 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 _i21; 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/amount/amount.dart' as _i14; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i22; +import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart' as _i27; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i18; -import 'package:stackwallet/utilities/prefs.dart' as _i23; -import 'package:tuple/tuple.dart' as _i14; + as _i19; +import 'package:stackwallet/utilities/prefs.dart' as _i24; +import 'package:tuple/tuple.dart' as _i15; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -171,9 +172,8 @@ class _FakeElectrumXNode_11 extends _i1.SmartFake implements _i9.ElectrumXNode { ); } -class _FakeTuple2_12 extends _i1.SmartFake - implements _i14.Tuple2 { - _FakeTuple2_12( +class _FakeAmount_12 extends _i1.SmartFake implements _i14.Amount { + _FakeAmount_12( Object parent, Invocation parentInvocation, ) : super( @@ -182,8 +182,9 @@ class _FakeTuple2_12 extends _i1.SmartFake ); } -class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { - _FakeAddress_13( +class _FakeTuple2_13 extends _i1.SmartFake + implements _i15.Tuple2 { + _FakeTuple2_13( Object parent, Invocation parentInvocation, ) : super( @@ -192,8 +193,8 @@ class _FakeAddress_13 extends _i1.SmartFake implements _i15.Address { ); } -class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { - _FakeBIP32_14( +class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address { + _FakeAddress_14( Object parent, Invocation parentInvocation, ) : super( @@ -202,8 +203,8 @@ class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 { ); } -class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { - _FakePaymentCode_15( +class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 { + _FakeBIP32_15( Object parent, Invocation parentInvocation, ) : super( @@ -212,9 +213,8 @@ class _FakePaymentCode_15 extends _i1.SmartFake implements _i17.PaymentCode { ); } -class _FakeSecureStorageInterface_16 extends _i1.SmartFake - implements _i18.SecureStorageInterface { - _FakeSecureStorageInterface_16( +class _FakePaymentCode_16 extends _i1.SmartFake implements _i18.PaymentCode { + _FakePaymentCode_16( Object parent, Invocation parentInvocation, ) : super( @@ -223,9 +223,20 @@ class _FakeSecureStorageInterface_16 extends _i1.SmartFake ); } -class _FakeCoinServiceAPI_17 extends _i1.SmartFake - implements _i19.CoinServiceAPI { - _FakeCoinServiceAPI_17( +class _FakeSecureStorageInterface_17 extends _i1.SmartFake + implements _i19.SecureStorageInterface { + _FakeSecureStorageInterface_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCoinServiceAPI_18 extends _i1.SmartFake + implements _i20.CoinServiceAPI { + _FakeCoinServiceAPI_18( Object parent, Invocation parentInvocation, ) : super( @@ -237,7 +248,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 _i21.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -304,7 +315,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - List getWalletIdsFor({required _i21.Coin? coin}) => + List getWalletIdsFor({required _i22.Coin? coin}) => (super.noSuchMethod( Invocation.method( #getWalletIdsFor, @@ -314,21 +325,21 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValue: [], ) as List); @override - List<_i14.Tuple2<_i21.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> + List<_i15.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>> getManagerProvidersByCoin() => (super.noSuchMethod( Invocation.method( #getManagerProvidersByCoin, [], ), returnValue: < - _i14.Tuple2<_i21.Coin, + _i15.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>[], ) as List< - _i14.Tuple2<_i21.Coin, + _i15.Tuple2<_i22.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>>); @override List<_i5.ChangeNotifierProvider<_i6.Manager>> getManagerProvidersForCoin( - _i21.Coin? coin) => + _i22.Coin? coin) => (super.noSuchMethod( Invocation.method( #getManagerProvidersForCoin, @@ -392,17 +403,17 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - _i22.Future load(_i23.Prefs? prefs) => (super.noSuchMethod( + _i23.Future load(_i24.Prefs? prefs) => (super.noSuchMethod( Invocation.method( #load, [prefs], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future loadAfterStackRestore( - _i23.Prefs? prefs, + _i23.Future loadAfterStackRestore( + _i24.Prefs? prefs, List<_i6.Manager>? managers, ) => (super.noSuchMethod( @@ -413,11 +424,11 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { managers, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -425,7 +436,7 @@ class MockWallets extends _i1.Mock implements _i20.Wallets { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -451,19 +462,19 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { } @override - _i22.Future> get walletNames => + _i23.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i22.Future>.value( + returnValue: _i23.Future>.value( {}), - ) as _i22.Future>); + ) as _i23.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future renameWallet({ + _i23.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -478,8 +489,8 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( @@ -489,10 +500,10 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValue: {}, ) as Map); @override - _i22.Future addExistingStackWallet({ + _i23.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i21.Coin? coin, + required _i22.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -506,13 +517,13 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addNewWallet({ + _i23.Future addNewWallet({ required String? name, - required _i21.Coin? coin, + required _i22.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -525,46 +536,46 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i23.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future saveFavoriteWalletIds(List? walletIds) => + _i23.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i23.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i23.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future moveFavorite({ + _i23.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -577,48 +588,48 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i23.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i23.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future isMnemonicVerified({required String? walletId}) => + _i23.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future setMnemonicVerified({required String? walletId}) => + _i23.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future deleteWallet( + _i23.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -630,20 +641,20 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future refreshWallets(bool? shouldNotifyListeners) => + _i23.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -651,7 +662,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -679,13 +690,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 _i26.BitcoinWallet { MockBitcoinWallet() { _i1.throwOnMissingStub(this); } @override - set timer(_i22.Timer? _timer) => super.noSuchMethod( + set timer(_i23.Timer? _timer) => super.noSuchMethod( Invocation.setter( #timer, _timer, @@ -762,74 +773,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i16.UTXO>[]), + ) as _i23.Future>); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i16.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future get currentChangeAddress => (super.noSuchMethod( + _i23.Future get currentChangeAddress => (super.noSuchMethod( Invocation.getter(#currentChangeAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future get currentChangeAddressP2PKH => (super.noSuchMethod( + _i23.Future get currentChangeAddressP2PKH => (super.noSuchMethod( Invocation.getter(#currentChangeAddressP2PKH), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), returnValue: false, ) as bool); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i23.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i23.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicString => (super.noSuchMethod( + _i23.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get chainHeight => (super.noSuchMethod( + _i23.Future get chainHeight => (super.noSuchMethod( Invocation.getter(#chainHeight), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override int get storedChainHeight => (super.noSuchMethod( Invocation.getter(#storedChainHeight), @@ -901,6 +912,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override + _i23.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i23.Future.value(''), + ) as _i23.Future); + @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( Invocation.setter( @@ -926,26 +942,26 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i13.NetworkType); @override - _i22.Future exit() => (super.noSuchMethod( + _i23.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i26.DerivePathType addressType({required String? address}) => + _i27.DerivePathType addressType({required String? address}) => (super.noSuchMethod( Invocation.method( #addressType, [], {#address: address}, ), - returnValue: _i26.DerivePathType.bip44, - ) as _i26.DerivePathType); + returnValue: _i27.DerivePathType.bip44, + ) as _i27.DerivePathType); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -964,49 +980,49 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future getTransactionCacheEarly(List? allAddresses) => + _i23.Future getTransactionCacheEarly(List? allAddresses) => (super.noSuchMethod( Invocation.method( #getTransactionCacheEarly, [allAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future refreshIfThereIsNewData() => (super.noSuchMethod( + _i23.Future refreshIfThereIsNewData() => (super.noSuchMethod( Invocation.method( #refreshIfThereIsNewData, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future getAllTxsToWatch() => (super.noSuchMethod( + _i23.Future getAllTxsToWatch() => (super.noSuchMethod( Invocation.method( #getAllTxsToWatch, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1015,31 +1031,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override void startNetworkAlivePinging() => super.noSuchMethod( Invocation.method( @@ -1057,33 +1073,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i23.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -1093,35 +1109,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + _i23.Future<_i9.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( Invocation.method( #getCurrentNode, [], ), - returnValue: _i22.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( + returnValue: _i23.Future<_i9.ElectrumXNode>.value(_FakeElectrumXNode_11( this, Invocation.method( #getCurrentNode, [], ), )), - ) as _i22.Future<_i9.ElectrumXNode>); + ) as _i23.Future<_i9.ElectrumXNode>); @override - _i22.Future addDerivation({ + _i23.Future addDerivation({ required int? chain, required String? address, required String? pubKey, required String? wif, - required _i26.DerivePathType? derivePathType, + required _i27.DerivePathType? derivePathType, }) => (super.noSuchMethod( Invocation.method( @@ -1135,13 +1151,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivePathType: derivePathType, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future addDerivations({ + _i23.Future addDerivations({ required int? chain, - required _i26.DerivePathType? derivePathType, + required _i27.DerivePathType? derivePathType, required Map? derivationsToAdd, }) => (super.noSuchMethod( @@ -1154,50 +1170,50 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #derivationsToAdd: derivationsToAdd, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future>> fastFetch( + _i23.Future>> fastFetch( List? allTxHashes) => (super.noSuchMethod( Invocation.method( #fastFetch, [allTxHashes], ), - returnValue: _i22.Future>>.value( + returnValue: _i23.Future>>.value( >[]), - ) as _i22.Future>>); + ) as _i23.Future>>); @override - _i22.Future getTxCount({required String? address}) => + _i23.Future getTxCount({required String? address}) => (super.noSuchMethod( Invocation.method( #getTxCount, [], {#address: address}, ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future checkCurrentReceivingAddressesForTransactions() => + _i23.Future checkCurrentReceivingAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentReceivingAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkCurrentChangeAddressesForTransactions() => + _i23.Future checkCurrentChangeAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkCurrentChangeAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override int estimateTxFee({ required int? vSize, @@ -1222,7 +1238,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { required bool? coinControl, required bool? isSendAll, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => super.noSuchMethod(Invocation.method( #coinSelection, @@ -1238,19 +1254,19 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, )); @override - _i22.Future> fetchBuildTxData( - List<_i15.UTXO>? utxosToUse) => + _i23.Future> fetchBuildTxData( + List<_i16.UTXO>? utxosToUse) => (super.noSuchMethod( Invocation.method( #fetchBuildTxData, [utxosToUse], ), returnValue: - _i22.Future>.value(<_i27.SigningData>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i28.SigningData>[]), + ) as _i23.Future>); @override - _i22.Future> buildTransaction({ - required List<_i27.SigningData>? utxoSigningData, + _i23.Future> buildTransaction({ + required List<_i28.SigningData>? utxoSigningData, required List? recipients, required List? satoshiAmounts, }) => @@ -1265,10 +1281,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1280,26 +1296,35 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - int roughFeeEstimate( + _i14.Amount roughFeeEstimate( int? inputCount, int? outputCount, int? feeRatePerKB, @@ -1313,28 +1338,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { feeRatePerKB, ], ), - returnValue: 0, - ) as int); + returnValue: _FakeAmount_12( + this, + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + ), + ) as _i14.Amount); @override - _i22.Future sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + _i23.Future<_i14.Amount> sweepAllEstimate(int? feeRate) => + (super.noSuchMethod( Invocation.method( #sweepAllEstimate, [feeRate], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override void initCache( String? walletId, - _i21.Coin? coin, + _i22.Coin? coin, ) => super.noSuchMethod( Invocation.method( @@ -1347,14 +1389,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future updateCachedId(String? id) => (super.noSuchMethod( + _i23.Future updateCachedId(String? id) => (super.noSuchMethod( Invocation.method( #updateCachedId, [id], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override int getCachedChainHeight() => (super.noSuchMethod( Invocation.method( @@ -1364,14 +1406,14 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: 0, ) as int); @override - _i22.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( + _i23.Future updateCachedChainHeight(int? height) => (super.noSuchMethod( Invocation.method( #updateCachedChainHeight, [height], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool getCachedIsFavorite() => (super.noSuchMethod( Invocation.method( @@ -1381,15 +1423,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: false, ) as bool); @override - _i22.Future updateCachedIsFavorite(bool? isFavorite) => + _i23.Future updateCachedIsFavorite(bool? isFavorite) => (super.noSuchMethod( Invocation.method( #updateCachedIsFavorite, [isFavorite], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override _i11.Balance getCachedBalance() => (super.noSuchMethod( Invocation.method( @@ -1405,15 +1447,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalance(_i11.Balance? balance) => + _i23.Future updateCachedBalance(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalance, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override _i11.Balance getCachedBalanceSecondary() => (super.noSuchMethod( Invocation.method( @@ -1429,15 +1471,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ), ) as _i11.Balance); @override - _i22.Future updateCachedBalanceSecondary(_i11.Balance? balance) => + _i23.Future updateCachedBalanceSecondary(_i11.Balance? balance) => (super.noSuchMethod( Invocation.method( #updateCachedBalanceSecondary, [balance], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override List getWalletTokenContractAddresses() => (super.noSuchMethod( Invocation.method( @@ -1447,16 +1489,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValue: [], ) as List); @override - _i22.Future updateWalletTokenContractAddresses( + _i23.Future updateWalletTokenContractAddresses( List? contractAddresses) => (super.noSuchMethod( Invocation.method( #updateWalletTokenContractAddresses, [contractAddresses], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( @@ -1467,11 +1509,11 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>> parseTransaction( + _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction( Map? txData, dynamic electrumxClient, - List<_i15.Address>? myAddresses, - _i21.Coin? coin, + List<_i16.Address>? myAddresses, + _i22.Coin? coin, int? minConfirms, String? walletId, ) => @@ -1488,8 +1530,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), returnValue: - _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>.value( - _FakeTuple2_12<_i15.Transaction, _i15.Address>( + _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value( + _FakeTuple2_13<_i16.Transaction, _i16.Address>( this, Invocation.method( #parseTransaction, @@ -1503,42 +1545,42 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { ], ), )), - ) as _i22.Future<_i14.Tuple2<_i15.Transaction, _i15.Address>>); + ) as _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>); @override void initPaynymWalletInterface({ required String? walletId, required String? walletName, required _i13.NetworkType? network, - required _i21.Coin? coin, + required _i22.Coin? coin, required _i12.MainDB? db, required _i9.ElectrumX? electrumXClient, - required _i18.SecureStorageInterface? secureStorage, + required _i19.SecureStorageInterface? secureStorage, required int? dustLimitP2PKH, required int? minConfirms, - required _i22.Future Function()? getMnemonicString, - required _i22.Future Function()? getMnemonicPassphrase, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function()? getCurrentChangeAddress, + required _i23.Future Function()? getMnemonicString, + required _i23.Future Function()? getMnemonicPassphrase, + required _i23.Future Function()? getChainHeight, + required _i23.Future Function()? getCurrentChangeAddress, required int Function({ required int feeRatePerKB, required int vSize, })? estimateTxFee, - required _i22.Future> Function({ + required _i23.Future> Function({ required String address, - required int satoshiAmount, + required _i14.Amount amount, Map? args, })? prepareSend, - required _i22.Future Function({required String address})? getTxCount, - required _i22.Future> Function(List<_i15.UTXO>)? + required _i23.Future Function({required String address})? getTxCount, + required _i23.Future> Function(List<_i16.UTXO>)? fetchBuildTxData, - required _i22.Future Function()? refresh, - required _i22.Future Function()? checkChangeAddressForTransactions, - required _i22.Future Function({ + required _i23.Future Function()? refresh, + required _i23.Future Function()? checkChangeAddressForTransactions, + required _i23.Future Function({ required String address, required int chain, - required _i26.DerivePathType derivePathType, + required _i27.DerivePathType derivePathType, required String pubKey, required String wif, })? @@ -1575,44 +1617,44 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future<_i15.Address> currentReceivingPaynymAddress( - _i17.PaymentCode? sender) => + _i23.Future<_i16.Address> currentReceivingPaynymAddress( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #currentReceivingPaynymAddress, [sender], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #currentReceivingPaynymAddress, [sender], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future checkCurrentPaynymReceivingAddressForTransactions( - _i17.PaymentCode? sender) => + _i23.Future checkCurrentPaynymReceivingAddressForTransactions( + _i18.PaymentCode? sender) => (super.noSuchMethod( Invocation.method( #checkCurrentPaynymReceivingAddressForTransactions, [sender], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => + _i23.Future checkAllCurrentReceivingPaynymAddressesForTransactions() => (super.noSuchMethod( Invocation.method( #checkAllCurrentReceivingPaynymAddressesForTransactions, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i16.BIP32> deriveNotificationBip32Node({ + _i23.Future<_i17.BIP32> deriveNotificationBip32Node({ required String? mnemonic, required String? mnemonicPassphrase, }) => @@ -1625,7 +1667,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #mnemonicPassphrase: mnemonicPassphrase, }, ), - returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveNotificationBip32Node, @@ -1636,9 +1678,9 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.BIP32>); + ) as _i23.Future<_i17.BIP32>); @override - _i22.Future<_i16.BIP32> deriveReceivingPrivateKeyNode({ + _i23.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({ required String? mnemonic, required String? mnemonicPassphrase, required int? index, @@ -1653,7 +1695,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #index: index, }, ), - returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14( + returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15( this, Invocation.method( #deriveReceivingPrivateKeyNode, @@ -1665,45 +1707,45 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i16.BIP32>); + ) as _i23.Future<_i17.BIP32>); @override - _i22.Future<_i17.PaymentCode> getPaymentCode( - _i26.DerivePathType? derivePathType) => + _i23.Future<_i18.PaymentCode> getPaymentCode( + _i27.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getPaymentCode, [derivePathType], ), - returnValue: _i22.Future<_i17.PaymentCode>.value(_FakePaymentCode_15( + returnValue: _i23.Future<_i18.PaymentCode>.value(_FakePaymentCode_16( this, Invocation.method( #getPaymentCode, [derivePathType], ), )), - ) as _i22.Future<_i17.PaymentCode>); + ) as _i23.Future<_i18.PaymentCode>); @override - _i22.Future<_i28.Uint8List> signWithNotificationKey(_i28.Uint8List? data) => + _i23.Future<_i29.Uint8List> signWithNotificationKey(_i29.Uint8List? data) => (super.noSuchMethod( Invocation.method( #signWithNotificationKey, [data], ), - returnValue: _i22.Future<_i28.Uint8List>.value(_i28.Uint8List(0)), - ) as _i22.Future<_i28.Uint8List>); + returnValue: _i23.Future<_i29.Uint8List>.value(_i29.Uint8List(0)), + ) as _i23.Future<_i29.Uint8List>); @override - _i22.Future signStringWithNotificationKey(String? data) => + _i23.Future signStringWithNotificationKey(String? data) => (super.noSuchMethod( Invocation.method( #signStringWithNotificationKey, [data], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future> preparePaymentCodeSend({ - required _i17.PaymentCode? paymentCode, - required int? amount, + _i23.Future> preparePaymentCodeSend({ + required _i18.PaymentCode? paymentCode, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -1712,17 +1754,17 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], { #paymentCode: paymentCode, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future<_i15.Address> nextUnusedSendAddressFrom({ - required _i17.PaymentCode? pCode, - required _i16.BIP32? privateKeyNode, + _i23.Future<_i16.Address> nextUnusedSendAddressFrom({ + required _i18.PaymentCode? pCode, + required _i17.BIP32? privateKeyNode, int? startIndex = 0, }) => (super.noSuchMethod( @@ -1735,7 +1777,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #startIndex: startIndex, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #nextUnusedSendAddressFrom, @@ -1747,13 +1789,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future> prepareNotificationTx({ + _i23.Future> prepareNotificationTx({ required int? selectedTxFeeRate, required String? targetPaymentCodeString, int? additionalOutputs = 0, - List<_i15.UTXO>? utxos, + List<_i16.UTXO>? utxos, }) => (super.noSuchMethod( Invocation.method( @@ -1767,10 +1809,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future broadcastNotificationTx( + _i23.Future broadcastNotificationTx( {required Map? preparedTx}) => (super.noSuchMethod( Invocation.method( @@ -1778,21 +1820,21 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { [], {#preparedTx: preparedTx}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future hasConnected(String? paymentCodeString) => + _i23.Future hasConnected(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #hasConnected, [paymentCodeString], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransaction({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1803,12 +1845,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i17.PaymentCode?>.value(), - ) as _i22.Future<_i17.PaymentCode?>); + returnValue: _i23.Future<_i18.PaymentCode?>.value(), + ) as _i23.Future<_i18.PaymentCode?>); @override - _i22.Future<_i17.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ - required _i15.Transaction? transaction, - required _i15.Address? myNotificationAddress, + _i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({ + required _i16.Transaction? transaction, + required _i16.Address? myNotificationAddress, }) => (super.noSuchMethod( Invocation.method( @@ -1819,31 +1861,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #myNotificationAddress: myNotificationAddress, }, ), - returnValue: _i22.Future<_i17.PaymentCode?>.value(), - ) as _i22.Future<_i17.PaymentCode?>); + returnValue: _i23.Future<_i18.PaymentCode?>.value(), + ) as _i23.Future<_i18.PaymentCode?>); @override - _i22.Future> + _i23.Future> getAllPaymentCodesFromNotificationTransactions() => (super.noSuchMethod( Invocation.method( #getAllPaymentCodesFromNotificationTransactions, [], ), returnValue: - _i22.Future>.value(<_i17.PaymentCode>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i18.PaymentCode>[]), + ) as _i23.Future>); @override - _i22.Future checkForNotificationTransactionsTo( + _i23.Future checkForNotificationTransactionsTo( Set? otherCodeStrings) => (super.noSuchMethod( Invocation.method( #checkForNotificationTransactionsTo, [otherCodeStrings], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future restoreAllHistory({ + _i23.Future restoreAllHistory({ required int? maxUnusedAddressGap, required int? maxNumberOfIndexesToCheck, required Set? paymentCodeStrings, @@ -1858,12 +1900,12 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #paymentCodeStrings: paymentCodeStrings, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future restoreHistoryWith( - _i17.PaymentCode? other, + _i23.Future restoreHistoryWith( + _i18.PaymentCode? other, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -1876,15 +1918,15 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future<_i15.Address> generatePaynymSendAddressFromKeyPair({ + _i23.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? toPaymentCode, + required _i27.DerivePathType? derivePathType, + required _i18.PaymentCode? toPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1897,7 +1939,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #toPaymentCode: toPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymSendAddressFromKeyPair, @@ -1910,13 +1952,13 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future<_i15.Address> generatePaynymReceivingAddressFromKeyPair({ + _i23.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({ required _i13.ECPair? pair, required int? derivationIndex, - required _i26.DerivePathType? derivePathType, - required _i17.PaymentCode? fromPaymentCode, + required _i27.DerivePathType? derivePathType, + required _i18.PaymentCode? fromPaymentCode, }) => (super.noSuchMethod( Invocation.method( @@ -1929,7 +1971,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { #fromPaymentCode: fromPaymentCode, }, ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #generatePaynymReceivingAddressFromKeyPair, @@ -1942,58 +1984,58 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { }, ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future<_i15.Address> getMyNotificationAddress( - _i26.DerivePathType? derivePathType) => + _i23.Future<_i16.Address> getMyNotificationAddress( + _i27.DerivePathType? derivePathType) => (super.noSuchMethod( Invocation.method( #getMyNotificationAddress, [derivePathType], ), - returnValue: _i22.Future<_i15.Address>.value(_FakeAddress_13( + returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14( this, Invocation.method( #getMyNotificationAddress, [derivePathType], ), )), - ) as _i22.Future<_i15.Address>); + ) as _i23.Future<_i16.Address>); @override - _i22.Future> lookupKey(String? paymentCodeString) => + _i23.Future> lookupKey(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #lookupKey, [paymentCodeString], ), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future paymentCodeStringByKey(String? key) => + _i23.Future paymentCodeStringByKey(String? key) => (super.noSuchMethod( Invocation.method( #paymentCodeStringByKey, [key], ), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future storeCode(String? paymentCodeString) => + _i23.Future storeCode(String? paymentCodeString) => (super.noSuchMethod( Invocation.method( #storeCode, [paymentCodeString], ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override void initCoinControlInterface({ required String? walletId, required String? walletName, - required _i21.Coin? coin, + required _i22.Coin? coin, required _i12.MainDB? db, - required _i22.Future Function()? getChainHeight, - required _i22.Future Function(_i11.Balance)? refreshedBalanceCallback, + required _i23.Future Function()? getChainHeight, + required _i23.Future Function(_i11.Balance)? refreshedBalanceCallback, }) => super.noSuchMethod( Invocation.method( @@ -2011,16 +2053,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: null, ); @override - _i22.Future refreshBalance({bool? notify = false}) => + _i23.Future refreshBalance({bool? notify = false}) => (super.noSuchMethod( Invocation.method( #refreshBalance, [], {#notify: notify}, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); } /// A class which mocks [NodeService]. @@ -2028,41 +2070,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( + _i19.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod( Invocation.getter(#secureStorageInterface), - returnValue: _FakeSecureStorageInterface_16( + returnValue: _FakeSecureStorageInterface_17( this, Invocation.getter(#secureStorageInterface), ), - ) as _i18.SecureStorageInterface); + ) as _i19.SecureStorageInterface); @override - List<_i29.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i30.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i30.NodeModel>[], + ) as List<_i30.NodeModel>); @override - List<_i29.NodeModel> get nodes => (super.noSuchMethod( + List<_i30.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i30.NodeModel>[], + ) as List<_i30.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateDefaults() => (super.noSuchMethod( + _i23.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future setPrimaryNodeFor({ - required _i21.Coin? coin, - required _i29.NodeModel? node, + _i23.Future setPrimaryNodeFor({ + required _i22.Coin? coin, + required _i30.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -2075,44 +2117,44 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i29.NodeModel? getPrimaryNodeFor({required _i21.Coin? coin}) => + _i30.NodeModel? getPrimaryNodeFor({required _i22.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i29.NodeModel?); + )) as _i30.NodeModel?); @override - List<_i29.NodeModel> getNodesFor(_i21.Coin? coin) => (super.noSuchMethod( + List<_i30.NodeModel> getNodesFor(_i22.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i30.NodeModel>[], + ) as List<_i30.NodeModel>); @override - _i29.NodeModel? getNodeById({required String? id}) => + _i30.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i29.NodeModel?); + )) as _i30.NodeModel?); @override - List<_i29.NodeModel> failoverNodesFor({required _i21.Coin? coin}) => + List<_i30.NodeModel> failoverNodesFor({required _i22.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i29.NodeModel>[], - ) as List<_i29.NodeModel>); + returnValue: <_i30.NodeModel>[], + ) as List<_i30.NodeModel>); @override - _i22.Future add( - _i29.NodeModel? node, + _i23.Future add( + _i30.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -2125,11 +2167,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future delete( + _i23.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -2141,11 +2183,11 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future setEnabledState( + _i23.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -2159,12 +2201,12 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future edit( - _i29.NodeModel? editedNode, + _i23.Future edit( + _i30.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -2177,20 +2219,20 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { shouldNotifyListeners, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateCommunityNodes() => (super.noSuchMethod( + _i23.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2198,7 +2240,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2241,23 +2283,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i19.CoinServiceAPI get wallet => (super.noSuchMethod( + _i20.CoinServiceAPI get wallet => (super.noSuchMethod( Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_17( + returnValue: _FakeCoinServiceAPI_18( this, Invocation.getter(#wallet), ), - ) as _i19.CoinServiceAPI); + ) as _i20.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod( Invocation.getter(#hasBackgroundRefreshListener), returnValue: false, ) as bool); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2290,23 +2332,23 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i23.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i23.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2316,16 +2358,16 @@ class MockManager extends _i1.Mock implements _i6.Manager { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i16.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i16.UTXO>[]), + ) as _i23.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2345,15 +2387,15 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override bool get isConnected => (super.noSuchMethod( Invocation.getter(#isConnected), @@ -2390,19 +2432,29 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: 0, ) as int); @override + bool get hasXPub => (super.noSuchMethod( + Invocation.getter(#hasXPub), + returnValue: false, + ) as bool); + @override + _i23.Future get xpub => (super.noSuchMethod( + Invocation.getter(#xpub), + returnValue: _i23.Future.value(''), + ) as _i23.Future); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override void dispose() => super.noSuchMethod( Invocation.method( @@ -2412,9 +2464,9 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -2423,32 +2475,32 @@ class MockManager extends _i1.Mock implements _i6.Manager { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2458,33 +2510,33 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -2503,20 +2555,20 @@ class MockManager extends _i1.Mock implements _i6.Manager { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future exitCurrentWallet() => (super.noSuchMethod( + _i23.Future exitCurrentWallet() => (super.noSuchMethod( Invocation.method( #exitCurrentWallet, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2528,43 +2580,52 @@ class MockManager extends _i1.Mock implements _i6.Manager { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future resetRescanOnOpen() => (super.noSuchMethod( + _i23.Future resetRescanOnOpen() => (super.noSuchMethod( Invocation.method( #resetRescanOnOpen, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - void addListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -2572,7 +2633,7 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValueForMissingStub: null, ); @override - void removeListener(_i24.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i25.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -2592,7 +2653,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 _i20.CoinServiceAPI { @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( @@ -2603,10 +2664,10 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i21.Coin get coin => (super.noSuchMethod( + _i22.Coin get coin => (super.noSuchMethod( Invocation.getter(#coin), - returnValue: _i21.Coin.bitcoin, - ) as _i21.Coin); + returnValue: _i22.Coin.bitcoin, + ) as _i22.Coin); @override bool get isRefreshing => (super.noSuchMethod( Invocation.getter(#isRefreshing), @@ -2639,23 +2700,23 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValueForMissingStub: null, ); @override - _i22.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + _i23.Future<_i8.FeeObject> get fees => (super.noSuchMethod( Invocation.getter(#fees), - returnValue: _i22.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + returnValue: _i23.Future<_i8.FeeObject>.value(_FakeFeeObject_5( this, Invocation.getter(#fees), )), - ) as _i22.Future<_i8.FeeObject>); + ) as _i23.Future<_i8.FeeObject>); @override - _i22.Future get maxFee => (super.noSuchMethod( + _i23.Future get maxFee => (super.noSuchMethod( Invocation.getter(#maxFee), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future.value(0), + ) as _i23.Future); @override - _i22.Future get currentReceivingAddress => (super.noSuchMethod( + _i23.Future get currentReceivingAddress => (super.noSuchMethod( Invocation.getter(#currentReceivingAddress), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override _i11.Balance get balance => (super.noSuchMethod( Invocation.getter(#balance), @@ -2665,16 +2726,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { ), ) as _i11.Balance); @override - _i22.Future> get transactions => (super.noSuchMethod( + _i23.Future> get transactions => (super.noSuchMethod( Invocation.getter(#transactions), returnValue: - _i22.Future>.value(<_i15.Transaction>[]), - ) as _i22.Future>); + _i23.Future>.value(<_i16.Transaction>[]), + ) as _i23.Future>); @override - _i22.Future> get utxos => (super.noSuchMethod( + _i23.Future> get utxos => (super.noSuchMethod( Invocation.getter(#utxos), - returnValue: _i22.Future>.value(<_i15.UTXO>[]), - ) as _i22.Future>); + returnValue: _i23.Future>.value(<_i16.UTXO>[]), + ) as _i23.Future>); @override set walletName(String? newName) => super.noSuchMethod( Invocation.setter( @@ -2694,20 +2755,20 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: '', ) as String); @override - _i22.Future> get mnemonic => (super.noSuchMethod( + _i23.Future> get mnemonic => (super.noSuchMethod( Invocation.getter(#mnemonic), - returnValue: _i22.Future>.value([]), - ) as _i22.Future>); + returnValue: _i23.Future>.value([]), + ) as _i23.Future>); @override - _i22.Future get mnemonicString => (super.noSuchMethod( + _i23.Future get mnemonicString => (super.noSuchMethod( Invocation.getter(#mnemonicString), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future get mnemonicPassphrase => (super.noSuchMethod( + _i23.Future get mnemonicPassphrase => (super.noSuchMethod( Invocation.getter(#mnemonicPassphrase), - returnValue: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + ) as _i23.Future); @override bool get hasCalledExit => (super.noSuchMethod( Invocation.getter(#hasCalledExit), @@ -2724,9 +2785,9 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: 0, ) as int); @override - _i22.Future> prepareSend({ + _i23.Future> prepareSend({ required String? address, - required int? amount, + required _i14.Amount? amount, Map? args, }) => (super.noSuchMethod( @@ -2735,41 +2796,41 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { [], { #address: address, - #satoshiAmount: amount, + #amount: amount, #args: args, }, ), returnValue: - _i22.Future>.value({}), - ) as _i22.Future>); + _i23.Future>.value({}), + ) as _i23.Future>); @override - _i22.Future confirmSend({required Map? txData}) => + _i23.Future confirmSend({required Map? txData}) => (super.noSuchMethod( Invocation.method( #confirmSend, [], {#txData: txData}, ), - returnValue: _i22.Future.value(''), - ) as _i22.Future); + returnValue: _i23.Future.value(''), + ) as _i23.Future); @override - _i22.Future refresh() => (super.noSuchMethod( + _i23.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + _i23.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( Invocation.method( #updateNode, [shouldRefresh], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override bool validateAddress(String? address) => (super.noSuchMethod( Invocation.method( @@ -2779,15 +2840,15 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { returnValue: false, ) as bool); @override - _i22.Future testNetworkConnection() => (super.noSuchMethod( + _i23.Future testNetworkConnection() => (super.noSuchMethod( Invocation.method( #testNetworkConnection, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future recoverFromMnemonic({ + _i23.Future recoverFromMnemonic({ required String? mnemonic, String? mnemonicPassphrase, required int? maxUnusedAddressGap, @@ -2806,38 +2867,38 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { #height: height, }, ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeNew() => (super.noSuchMethod( + _i23.Future initializeNew() => (super.noSuchMethod( Invocation.method( #initializeNew, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future initializeExisting() => (super.noSuchMethod( + _i23.Future initializeExisting() => (super.noSuchMethod( Invocation.method( #initializeExisting, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future exit() => (super.noSuchMethod( + _i23.Future exit() => (super.noSuchMethod( Invocation.method( #exit, [], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future fullRescan( + _i23.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, ) => @@ -2849,40 +2910,49 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI { maxNumberOfIndexesToCheck, ], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); @override - _i22.Future estimateFeeFor( - int? satoshiAmount, + _i23.Future<_i14.Amount> estimateFeeFor( + _i14.Amount? amount, int? feeRate, ) => (super.noSuchMethod( Invocation.method( #estimateFeeFor, [ - satoshiAmount, + amount, feeRate, ], ), - returnValue: _i22.Future.value(0), - ) as _i22.Future); + returnValue: _i23.Future<_i14.Amount>.value(_FakeAmount_12( + this, + Invocation.method( + #estimateFeeFor, + [ + amount, + feeRate, + ], + ), + )), + ) as _i23.Future<_i14.Amount>); @override - _i22.Future generateNewAddress() => (super.noSuchMethod( + _i23.Future generateNewAddress() => (super.noSuchMethod( Invocation.method( #generateNewAddress, [], ), - returnValue: _i22.Future.value(false), - ) as _i22.Future); + returnValue: _i23.Future.value(false), + ) as _i23.Future); @override - _i22.Future updateSentCachedTxData(Map? txData) => + _i23.Future updateSentCachedTxData(Map? txData) => (super.noSuchMethod( Invocation.method( #updateSentCachedTxData, [txData], ), - returnValue: _i22.Future.value(), - returnValueForMissingStub: _i22.Future.value(), - ) as _i22.Future); + returnValue: _i23.Future.value(), + returnValueForMissingStub: _i23.Future.value(), + ) as _i23.Future); }