From 7c990f4f8ff1f1a3a80a87375b88768e515cd711 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 12 Jan 2024 17:13:10 -0600 Subject: [PATCH] add ordinal tx subtype and clean up build runner issues --- .../models/blockchain_data/transaction.dart | 3 +- .../models/blockchain_data/transaction.g.dart | 2 + .../blockchain_data/v2/transaction_v2.g.dart | 2 + test/pages/send_view/send_view_test.dart | 5 +- .../pages/send_view/send_view_test.mocks.dart | 778 ++++-------- .../services/coins/fake_coin_service_api.dart | 183 --- test/widget_tests/managed_favorite_test.dart | 2 - .../managed_favorite_test.mocks.dart | 778 ++++-------- .../table_view/table_view_row_test.dart | 5 +- .../table_view/table_view_row_test.mocks.dart | 580 ++------- test/widget_tests/transaction_card_test.dart | 2 - .../transaction_card_test.mocks.dart | 1045 ++++++----------- .../wallet_info_row_balance_future_test.dart | 2 - ...et_info_row_balance_future_test.mocks.dart | 614 +++------- .../wallet_info_row/wallet_info_row_test.dart | 2 - .../wallet_info_row_test.mocks.dart | 678 +++-------- 16 files changed, 1210 insertions(+), 3471 deletions(-) delete mode 100644 test/services/coins/fake_coin_service_api.dart diff --git a/lib/models/isar/models/blockchain_data/transaction.dart b/lib/models/isar/models/blockchain_data/transaction.dart index 0991624a8..59848b1fd 100644 --- a/lib/models/isar/models/blockchain_data/transaction.dart +++ b/lib/models/isar/models/blockchain_data/transaction.dart @@ -254,5 +254,6 @@ enum TransactionSubType { ethToken, // eth token cashFusion, sparkMint, // firo specific - sparkSpend; // firo specific + sparkSpend, // firo specific + ordinal; } diff --git a/lib/models/isar/models/blockchain_data/transaction.g.dart b/lib/models/isar/models/blockchain_data/transaction.g.dart index 2c37f365b..965a64870 100644 --- a/lib/models/isar/models/blockchain_data/transaction.g.dart +++ b/lib/models/isar/models/blockchain_data/transaction.g.dart @@ -367,6 +367,7 @@ const _TransactionsubTypeEnumValueMap = { 'cashFusion': 5, 'sparkMint': 6, 'sparkSpend': 7, + 'ordinal': 8, }; const _TransactionsubTypeValueEnumMap = { 0: TransactionSubType.none, @@ -377,6 +378,7 @@ const _TransactionsubTypeValueEnumMap = { 5: TransactionSubType.cashFusion, 6: TransactionSubType.sparkMint, 7: TransactionSubType.sparkSpend, + 8: TransactionSubType.ordinal, }; const _TransactiontypeEnumValueMap = { 'outgoing': 0, diff --git a/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart b/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart index 5af5d7166..83006da89 100644 --- a/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart +++ b/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart @@ -388,6 +388,7 @@ const _TransactionV2subTypeEnumValueMap = { 'cashFusion': 5, 'sparkMint': 6, 'sparkSpend': 7, + 'ordinal': 8, }; const _TransactionV2subTypeValueEnumMap = { 0: TransactionSubType.none, @@ -398,6 +399,7 @@ const _TransactionV2subTypeValueEnumMap = { 5: TransactionSubType.cashFusion, 6: TransactionSubType.sparkMint, 7: TransactionSubType.sparkSpend, + 8: TransactionSubType.ordinal, }; const _TransactionV2typeEnumValueMap = { 'outgoing': 0, diff --git a/test/pages/send_view/send_view_test.dart b/test/pages/send_view/send_view_test.dart index 236d56c2a..0bc36e0d4 100644 --- a/test/pages/send_view/send_view_test.dart +++ b/test/pages/send_view/send_view_test.dart @@ -1,5 +1,4 @@ import 'package:mockito/annotations.dart'; -import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/locale_service.dart'; import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/wallets.dart'; @@ -14,9 +13,7 @@ import 'package:stackwallet/utilities/prefs.dart'; LocaleService, ThemeService, Prefs, -], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) +], customMocks: []) void main() { // testWidgets("Send to valid address", (widgetTester) async { // final mockWallets = MockWallets(); diff --git a/test/pages/send_view/send_view_test.mocks.dart b/test/pages/send_view/send_view_test.mocks.dart index cd7eefb8b..e809b127b 100644 --- a/test/pages/send_view/send_view_test.mocks.dart +++ b/test/pages/send_view/send_view_test.mocks.dart @@ -3,35 +3,30 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i13; -import 'dart:typed_data' as _i23; -import 'dart:ui' as _i18; +import 'dart:async' as _i10; +import 'dart:typed_data' as _i20; +import 'dart:ui' as _i15; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/db/isar/main_db.dart' as _i3; -import 'package:stackwallet/models/balance.dart' as _i10; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i28; -import 'package:stackwallet/models/isar/stack_theme.dart' as _i22; -import 'package:stackwallet/models/node_model.dart' as _i19; -import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i9; +import 'package:stackwallet/models/isar/stack_theme.dart' as _i19; +import 'package:stackwallet/models/node_model.dart' as _i16; import 'package:stackwallet/networking/http.dart' as _i7; -import 'package:stackwallet/services/coins/coin_service.dart' as _i27; -import 'package:stackwallet/services/locale_service.dart' as _i20; +import 'package:stackwallet/services/locale_service.dart' as _i17; import 'package:stackwallet/services/node_service.dart' as _i2; -import 'package:stackwallet/services/wallets.dart' as _i12; -import 'package:stackwallet/services/wallets_service.dart' as _i16; -import 'package:stackwallet/themes/theme_service.dart' as _i21; -import 'package:stackwallet/utilities/amount/amount.dart' as _i11; -import 'package:stackwallet/utilities/amount/amount_unit.dart' as _i26; -import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i25; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i17; -import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i24; +import 'package:stackwallet/services/wallets.dart' as _i9; +import 'package:stackwallet/services/wallets_service.dart' as _i13; +import 'package:stackwallet/themes/theme_service.dart' as _i18; +import 'package:stackwallet/utilities/amount/amount_unit.dart' as _i23; +import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i22; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i14; +import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i21; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i6; -import 'package:stackwallet/utilities/prefs.dart' as _i15; +import 'package:stackwallet/utilities/prefs.dart' as _i12; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i4; -import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i14; +import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i11; import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/cash_fusion_interface.dart' as _i8; @@ -109,40 +104,10 @@ class _FakeFusionInfo_5 extends _i1.SmartFake implements _i8.FusionInfo { ); } -class _FakeFeeObject_6 extends _i1.SmartFake implements _i9.FeeObject { - _FakeFeeObject_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeBalance_7 extends _i1.SmartFake implements _i10.Balance { - _FakeBalance_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAmount_8 extends _i1.SmartFake implements _i11.Amount { - _FakeAmount_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i12.Wallets { +class MockWallets extends _i1.Mock implements _i9.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -208,8 +173,8 @@ class MockWallets extends _i1.Mock implements _i12.Wallets { returnValueForMissingStub: null, ); @override - _i13.Future deleteWallet( - _i14.WalletInfo? info, + _i10.Future deleteWallet( + _i11.WalletInfo? info, _i6.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( @@ -220,12 +185,12 @@ class MockWallets extends _i1.Mock implements _i12.Wallets { secureStorage, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future load( - _i15.Prefs? prefs, + _i10.Future load( + _i12.Prefs? prefs, _i3.MainDB? mainDB, ) => (super.noSuchMethod( @@ -236,12 +201,12 @@ class MockWallets extends _i1.Mock implements _i12.Wallets { mainDB, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future loadAfterStackRestore( - _i15.Prefs? prefs, + _i10.Future loadAfterStackRestore( + _i12.Prefs? prefs, List<_i5.Wallet<_i4.CryptoCurrency>>? wallets, ) => (super.noSuchMethod( @@ -252,33 +217,33 @@ class MockWallets extends _i1.Mock implements _i12.Wallets { wallets, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); } /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i16.WalletsService { +class MockWalletsService extends _i1.Mock implements _i13.WalletsService { MockWalletsService() { _i1.throwOnMissingStub(this); } @override - _i13.Future> get walletNames => + _i10.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i13.Future>.value( - {}), - ) as _i13.Future>); + returnValue: _i10.Future>.value( + {}), + ) as _i10.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i13.Future renameWallet({ + _i10.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -293,21 +258,21 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i13.Future addExistingStackWallet({ + _i10.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i17.Coin? coin, + required _i14.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -321,13 +286,13 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future addNewWallet({ + _i10.Future addNewWallet({ required String? name, - required _i17.Coin? coin, + required _i14.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -340,46 +305,46 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i10.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i13.Future>.value([]), - ) as _i13.Future>); + returnValue: _i10.Future>.value([]), + ) as _i10.Future>); @override - _i13.Future saveFavoriteWalletIds(List? walletIds) => + _i10.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i10.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i10.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future moveFavorite({ + _i10.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -392,48 +357,48 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i10.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - _i13.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i10.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future isMnemonicVerified({required String? walletId}) => + _i10.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - _i13.Future setMnemonicVerified({required String? walletId}) => + _i10.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future deleteWallet( + _i10.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -445,20 +410,20 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(0), - ) as _i13.Future); + returnValue: _i10.Future.value(0), + ) as _i10.Future); @override - _i13.Future refreshWallets(bool? shouldNotifyListeners) => + _i10.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -466,7 +431,7 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -508,33 +473,33 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { ), ) as _i6.SecureStorageInterface); @override - List<_i19.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i16.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i19.NodeModel>[], - ) as List<_i19.NodeModel>); + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); @override - List<_i19.NodeModel> get nodes => (super.noSuchMethod( + List<_i16.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i19.NodeModel>[], - ) as List<_i19.NodeModel>); + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i13.Future updateDefaults() => (super.noSuchMethod( + _i10.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future setPrimaryNodeFor({ - required _i17.Coin? coin, - required _i19.NodeModel? node, + _i10.Future setPrimaryNodeFor({ + required _i14.Coin? coin, + required _i16.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -547,44 +512,44 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i19.NodeModel? getPrimaryNodeFor({required _i17.Coin? coin}) => + _i16.NodeModel? getPrimaryNodeFor({required _i14.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i19.NodeModel?); + )) as _i16.NodeModel?); @override - List<_i19.NodeModel> getNodesFor(_i17.Coin? coin) => (super.noSuchMethod( + List<_i16.NodeModel> getNodesFor(_i14.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i19.NodeModel>[], - ) as List<_i19.NodeModel>); + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); @override - _i19.NodeModel? getNodeById({required String? id}) => + _i16.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i19.NodeModel?); + )) as _i16.NodeModel?); @override - List<_i19.NodeModel> failoverNodesFor({required _i17.Coin? coin}) => + List<_i16.NodeModel> failoverNodesFor({required _i14.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i19.NodeModel>[], - ) as List<_i19.NodeModel>); + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); @override - _i13.Future add( - _i19.NodeModel? node, + _i10.Future add( + _i16.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -597,11 +562,11 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future delete( + _i10.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -613,11 +578,11 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future setEnabledState( + _i10.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -631,12 +596,12 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future edit( - _i19.NodeModel? editedNode, + _i10.Future edit( + _i16.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -649,20 +614,20 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future updateCommunityNodes() => (super.noSuchMethod( + _i10.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -670,7 +635,7 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -698,7 +663,7 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i20.LocaleService { +class MockLocaleService extends _i1.Mock implements _i17.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -714,17 +679,17 @@ class MockLocaleService extends _i1.Mock implements _i20.LocaleService { returnValue: false, ) as bool); @override - _i13.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i10.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -732,7 +697,7 @@ class MockLocaleService extends _i1.Mock implements _i20.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -760,7 +725,7 @@ class MockLocaleService extends _i1.Mock implements _i20.LocaleService { /// A class which mocks [ThemeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockThemeService extends _i1.Mock implements _i21.ThemeService { +class MockThemeService extends _i1.Mock implements _i18.ThemeService { MockThemeService() { _i1.throwOnMissingStub(this); } @@ -790,10 +755,10 @@ class MockThemeService extends _i1.Mock implements _i21.ThemeService { ), ) as _i3.MainDB); @override - List<_i22.StackTheme> get installedThemes => (super.noSuchMethod( + List<_i19.StackTheme> get installedThemes => (super.noSuchMethod( Invocation.getter(#installedThemes), - returnValue: <_i22.StackTheme>[], - ) as List<_i22.StackTheme>); + returnValue: <_i19.StackTheme>[], + ) as List<_i19.StackTheme>); @override void init(_i3.MainDB? db) => super.noSuchMethod( Invocation.method( @@ -803,79 +768,79 @@ class MockThemeService extends _i1.Mock implements _i21.ThemeService { returnValueForMissingStub: null, ); @override - _i13.Future install({required _i23.Uint8List? themeArchiveData}) => + _i10.Future install({required _i20.Uint8List? themeArchiveData}) => (super.noSuchMethod( Invocation.method( #install, [], {#themeArchiveData: themeArchiveData}, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future remove({required String? themeId}) => (super.noSuchMethod( + _i10.Future remove({required String? themeId}) => (super.noSuchMethod( Invocation.method( #remove, [], {#themeId: themeId}, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( + _i10.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( Invocation.method( #checkDefaultThemesOnStartup, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future verifyInstalled({required String? themeId}) => + _i10.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( Invocation.method( #verifyInstalled, [], {#themeId: themeId}, ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - _i13.Future> fetchThemes() => + _i10.Future> fetchThemes() => (super.noSuchMethod( Invocation.method( #fetchThemes, [], ), - returnValue: _i13.Future>.value( - <_i21.StackThemeMetaData>[]), - ) as _i13.Future>); + returnValue: _i10.Future>.value( + <_i18.StackThemeMetaData>[]), + ) as _i10.Future>); @override - _i13.Future<_i23.Uint8List> fetchTheme( - {required _i21.StackThemeMetaData? themeMetaData}) => + _i10.Future<_i20.Uint8List> fetchTheme( + {required _i18.StackThemeMetaData? themeMetaData}) => (super.noSuchMethod( Invocation.method( #fetchTheme, [], {#themeMetaData: themeMetaData}, ), - returnValue: _i13.Future<_i23.Uint8List>.value(_i23.Uint8List(0)), - ) as _i13.Future<_i23.Uint8List>); + returnValue: _i10.Future<_i20.Uint8List>.value(_i20.Uint8List(0)), + ) as _i10.Future<_i20.Uint8List>); @override - _i22.StackTheme? getTheme({required String? themeId}) => + _i19.StackTheme? getTheme({required String? themeId}) => (super.noSuchMethod(Invocation.method( #getTheme, [], {#themeId: themeId}, - )) as _i22.StackTheme?); + )) as _i19.StackTheme?); } /// A class which mocks [Prefs]. /// /// See the documentation for Mockito's code generation for more information. -class MockPrefs extends _i1.Mock implements _i15.Prefs { +class MockPrefs extends _i1.Mock implements _i12.Prefs { MockPrefs() { _i1.throwOnMissingStub(this); } @@ -931,12 +896,12 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - _i24.SyncingType get syncType => (super.noSuchMethod( + _i21.SyncingType get syncType => (super.noSuchMethod( Invocation.getter(#syncType), - returnValue: _i24.SyncingType.currentWalletOnly, - ) as _i24.SyncingType); + returnValue: _i21.SyncingType.currentWalletOnly, + ) as _i21.SyncingType); @override - set syncType(_i24.SyncingType? syncType) => super.noSuchMethod( + set syncType(_i21.SyncingType? syncType) => super.noSuchMethod( Invocation.setter( #syncType, syncType, @@ -1095,12 +1060,12 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - _i25.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + _i22.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( Invocation.getter(#backupFrequencyType), - returnValue: _i25.BackupFrequencyType.everyTenMinutes, - ) as _i25.BackupFrequencyType); + returnValue: _i22.BackupFrequencyType.everyTenMinutes, + ) as _i22.BackupFrequencyType); @override - set backupFrequencyType(_i25.BackupFrequencyType? backupFrequencyType) => + set backupFrequencyType(_i22.BackupFrequencyType? backupFrequencyType) => super.noSuchMethod( Invocation.setter( #backupFrequencyType, @@ -1251,61 +1216,61 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValue: false, ) as bool); @override - _i13.Future init() => (super.noSuchMethod( + _i10.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( + _i10.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( Invocation.method( #incrementCurrentNotificationIndex, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future isExternalCallsSet() => (super.noSuchMethod( + _i10.Future isExternalCallsSet() => (super.noSuchMethod( Invocation.method( #isExternalCallsSet, [], ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - _i13.Future saveUserID(String? userId) => (super.noSuchMethod( + _i10.Future saveUserID(String? userId) => (super.noSuchMethod( Invocation.method( #saveUserID, [userId], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( + _i10.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( Invocation.method( #saveSignupEpoch, [signupEpoch], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i26.AmountUnit amountUnit(_i17.Coin? coin) => (super.noSuchMethod( + _i23.AmountUnit amountUnit(_i14.Coin? coin) => (super.noSuchMethod( Invocation.method( #amountUnit, [coin], ), - returnValue: _i26.AmountUnit.normal, - ) as _i26.AmountUnit); + returnValue: _i23.AmountUnit.normal, + ) as _i23.AmountUnit); @override void updateAmountUnit({ - required _i17.Coin? coin, - required _i26.AmountUnit? amountUnit, + required _i14.Coin? coin, + required _i23.AmountUnit? amountUnit, }) => super.noSuchMethod( Invocation.method( @@ -1319,7 +1284,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - int maxDecimals(_i17.Coin? coin) => (super.noSuchMethod( + int maxDecimals(_i14.Coin? coin) => (super.noSuchMethod( Invocation.method( #maxDecimals, [coin], @@ -1328,7 +1293,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { ) as int); @override void updateMaxDecimals({ - required _i17.Coin? coin, + required _i14.Coin? coin, required int? maxDecimals, }) => super.noSuchMethod( @@ -1343,7 +1308,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - _i8.FusionInfo getFusionServerInfo(_i17.Coin? coin) => (super.noSuchMethod( + _i8.FusionInfo getFusionServerInfo(_i14.Coin? coin) => (super.noSuchMethod( Invocation.method( #getFusionServerInfo, [coin], @@ -1358,7 +1323,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { ) as _i8.FusionInfo); @override void setFusionServerInfo( - _i17.Coin? coin, + _i14.Coin? coin, _i8.FusionInfo? fusionServerInfo, ) => super.noSuchMethod( @@ -1372,7 +1337,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1380,7 +1345,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -1404,312 +1369,3 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); } - -/// A class which mocks [CoinServiceAPI]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i27.CoinServiceAPI { - @override - set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => - super.noSuchMethod( - Invocation.setter( - #onIsActiveWalletChanged, - _onIsActiveWalletChanged, - ), - returnValueForMissingStub: null, - ); - @override - _i17.Coin get coin => (super.noSuchMethod( - Invocation.getter(#coin), - returnValue: _i17.Coin.bitcoin, - ) as _i17.Coin); - @override - bool get isRefreshing => (super.noSuchMethod( - Invocation.getter(#isRefreshing), - returnValue: false, - ) as bool); - @override - bool get shouldAutoSync => (super.noSuchMethod( - Invocation.getter(#shouldAutoSync), - returnValue: false, - ) as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( - Invocation.setter( - #shouldAutoSync, - shouldAutoSync, - ), - returnValueForMissingStub: null, - ); - @override - bool get isFavorite => (super.noSuchMethod( - Invocation.getter(#isFavorite), - returnValue: false, - ) as bool); - @override - set isFavorite(bool? markFavorite) => super.noSuchMethod( - Invocation.setter( - #isFavorite, - markFavorite, - ), - returnValueForMissingStub: null, - ); - @override - _i13.Future<_i9.FeeObject> get fees => (super.noSuchMethod( - Invocation.getter(#fees), - returnValue: _i13.Future<_i9.FeeObject>.value(_FakeFeeObject_6( - this, - Invocation.getter(#fees), - )), - ) as _i13.Future<_i9.FeeObject>); - @override - _i13.Future get maxFee => (super.noSuchMethod( - Invocation.getter(#maxFee), - returnValue: _i13.Future.value(0), - ) as _i13.Future); - @override - _i13.Future get currentReceivingAddress => (super.noSuchMethod( - Invocation.getter(#currentReceivingAddress), - returnValue: _i13.Future.value(''), - ) as _i13.Future); - @override - _i10.Balance get balance => (super.noSuchMethod( - Invocation.getter(#balance), - returnValue: _FakeBalance_7( - this, - Invocation.getter(#balance), - ), - ) as _i10.Balance); - @override - _i13.Future> get transactions => (super.noSuchMethod( - Invocation.getter(#transactions), - returnValue: - _i13.Future>.value(<_i28.Transaction>[]), - ) as _i13.Future>); - @override - _i13.Future> get utxos => (super.noSuchMethod( - Invocation.getter(#utxos), - returnValue: _i13.Future>.value(<_i28.UTXO>[]), - ) as _i13.Future>); - @override - set walletName(String? newName) => super.noSuchMethod( - Invocation.setter( - #walletName, - newName, - ), - returnValueForMissingStub: null, - ); - @override - String get walletName => (super.noSuchMethod( - Invocation.getter(#walletName), - returnValue: '', - ) as String); - @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: '', - ) as String); - @override - _i13.Future> get mnemonic => (super.noSuchMethod( - Invocation.getter(#mnemonic), - returnValue: _i13.Future>.value([]), - ) as _i13.Future>); - @override - _i13.Future get mnemonicString => (super.noSuchMethod( - Invocation.getter(#mnemonicString), - returnValue: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future get mnemonicPassphrase => (super.noSuchMethod( - Invocation.getter(#mnemonicPassphrase), - returnValue: _i13.Future.value(), - ) as _i13.Future); - @override - bool get hasCalledExit => (super.noSuchMethod( - Invocation.getter(#hasCalledExit), - returnValue: false, - ) as bool); - @override - bool get isConnected => (super.noSuchMethod( - Invocation.getter(#isConnected), - returnValue: false, - ) as bool); - @override - int get storedChainHeight => (super.noSuchMethod( - Invocation.getter(#storedChainHeight), - returnValue: 0, - ) as int); - @override - _i13.Future> prepareSend({ - required String? address, - required _i11.Amount? amount, - Map? args, - }) => - (super.noSuchMethod( - Invocation.method( - #prepareSend, - [], - { - #address: address, - #amount: amount, - #args: args, - }, - ), - returnValue: - _i13.Future>.value({}), - ) as _i13.Future>); - @override - _i13.Future confirmSend({required Map? txData}) => - (super.noSuchMethod( - Invocation.method( - #confirmSend, - [], - {#txData: txData}, - ), - returnValue: _i13.Future.value(''), - ) as _i13.Future); - @override - _i13.Future refresh() => (super.noSuchMethod( - Invocation.method( - #refresh, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( - Invocation.method( - #updateNode, - [shouldRefresh], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - bool validateAddress(String? address) => (super.noSuchMethod( - Invocation.method( - #validateAddress, - [address], - ), - returnValue: false, - ) as bool); - @override - _i13.Future testNetworkConnection() => (super.noSuchMethod( - Invocation.method( - #testNetworkConnection, - [], - ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); - @override - _i13.Future recoverFromMnemonic({ - required String? mnemonic, - String? mnemonicPassphrase, - required int? maxUnusedAddressGap, - required int? maxNumberOfIndexesToCheck, - required int? height, - }) => - (super.noSuchMethod( - Invocation.method( - #recoverFromMnemonic, - [], - { - #mnemonic: mnemonic, - #mnemonicPassphrase: mnemonicPassphrase, - #maxUnusedAddressGap: maxUnusedAddressGap, - #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height, - }, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future initializeNew( - ({String mnemonicPassphrase, int wordCount})? data) => - (super.noSuchMethod( - Invocation.method( - #initializeNew, - [data], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future initializeExisting() => (super.noSuchMethod( - Invocation.method( - #initializeExisting, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future exit() => (super.noSuchMethod( - Invocation.method( - #exit, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future fullRescan( - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - ) => - (super.noSuchMethod( - Invocation.method( - #fullRescan, - [ - maxUnusedAddressGap, - maxNumberOfIndexesToCheck, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future<_i11.Amount> estimateFeeFor( - _i11.Amount? amount, - int? feeRate, - ) => - (super.noSuchMethod( - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - returnValue: _i13.Future<_i11.Amount>.value(_FakeAmount_8( - this, - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - )), - ) as _i13.Future<_i11.Amount>); - @override - _i13.Future generateNewAddress() => (super.noSuchMethod( - Invocation.method( - #generateNewAddress, - [], - ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); - @override - _i13.Future updateSentCachedTxData(Map? txData) => - (super.noSuchMethod( - Invocation.method( - #updateSentCachedTxData, - [txData], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); -} diff --git a/test/services/coins/fake_coin_service_api.dart b/test/services/coins/fake_coin_service_api.dart deleted file mode 100644 index 413c493ab..000000000 --- a/test/services/coins/fake_coin_service_api.dart +++ /dev/null @@ -1,183 +0,0 @@ -import 'package:stackwallet/models/balance.dart'; -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 { - @override - // TODO: implement currentReceivingAddress - Future get currentReceivingAddress => throw UnimplementedError(); - - @override - Future exit() { - // TODO: implement exit - throw UnimplementedError(); - } - - @override - // TODO: implement maxFee - Future get maxFee => throw UnimplementedError(); - - @override - // TODO: implement mnemonic - Future> get mnemonic => throw UnimplementedError(); - - @override - Future refresh() { - // TODO: implement refresh - throw UnimplementedError(); - } - - @override - bool validateAddress(String address) { - // TODO: implement validateAddress - throw UnimplementedError(); - } - - @override - // TODO: implement walletId - String get walletId => throw UnimplementedError(); - - @override - // TODO: implement walletName - String get walletName => throw UnimplementedError(); - - @override - Future fullRescan( - int maxUnusedAddressGap, int maxNumberOfIndexesToCheck) { - // TODO: implement fullRescan - throw UnimplementedError(); - } - - @override - bool get isFavorite => throw UnimplementedError(); - - @override - set isFavorite(bool isFavorite) => throw UnimplementedError(); - - @override - late bool shouldAutoSync; - - @override - // TODO: implement coin - Coin get coin => throw UnimplementedError(); - - @override - Future confirmSend({required Map txData}) { - // TODO: implement confirmSend - throw UnimplementedError(); - } - - @override - Future estimateFeeFor(Amount amount, int feeRate) { - // TODO: implement estimateFeeFor - throw UnimplementedError(); - } - - @override - // TODO: implement hasCalledExit - bool get hasCalledExit => throw UnimplementedError(); - - @override - Future initializeExisting() { - // TODO: implement initializeExisting - throw UnimplementedError(); - } - - @override - Future initializeNew( - ({String mnemonicPassphrase, int wordCount})? data, - ) { - // TODO: implement initializeNew - throw UnimplementedError(); - } - - @override - // TODO: implement isConnected - bool get isConnected => throw UnimplementedError(); - - @override - // TODO: implement isRefreshing - bool get isRefreshing => throw UnimplementedError(); - - @override - Future> prepareSend( - {required String address, - required Amount amount, - Map? args}) { - // TODO: implement prepareSend - throw UnimplementedError(); - } - - @override - Future updateNode(bool shouldRefresh) { - // TODO: implement updateNode - throw UnimplementedError(); - } - - @override - set walletName(String newName) { - // TODO: implement walletName - } - - @override - // TODO: implement fees - Future get fees => throw UnimplementedError(); - - @override - Future recoverFromMnemonic({ - required String mnemonic, - String? mnemonicPassphrase, - required int maxUnusedAddressGap, - required int maxNumberOfIndexesToCheck, - required int height, - }) { - // TODO: implement recoverFromMnemonic - throw UnimplementedError(); - } - - @override - Future testNetworkConnection() { - // TODO: implement testNetworkConnection - throw UnimplementedError(); - } - - @override - Future generateNewAddress() { - // TODO: implement generateNewAddress - throw UnimplementedError(); - } - - @override - Future updateSentCachedTxData(Map txData) { - // TODO: implement updateSentCachedTxData - throw UnimplementedError(); - } - - @override - // TODO: implement balance - Balance get balance => throw UnimplementedError(); - - @override - // TODO: implement storedChainHeight - int get storedChainHeight => throw UnimplementedError(); - - @override - // TODO: implement transactions - Future> get transactions => throw UnimplementedError(); - - @override - // TODO: implement utxos - Future> get utxos => throw UnimplementedError(); - - @override - // TODO: implement mnemonicPassphrase - Future get mnemonicPassphrase => throw UnimplementedError(); - - @override - // TODO: implement mnemonicString - Future get mnemonicString => throw UnimplementedError(); -} diff --git a/test/widget_tests/managed_favorite_test.dart b/test/widget_tests/managed_favorite_test.dart index 464bfdb32..3db3f458f 100644 --- a/test/widget_tests/managed_favorite_test.dart +++ b/test/widget_tests/managed_favorite_test.dart @@ -1,6 +1,5 @@ import 'package:decimal/decimal.dart'; import 'package:mockito/annotations.dart'; -import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/locale_service.dart'; import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/wallets.dart'; @@ -24,7 +23,6 @@ Amount _a(int i) => Amount.fromDecimal( LocaleService ], customMocks: [ MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), ]) void main() { // testWidgets("Test wallet info row displays correctly", (widgetTester) async { diff --git a/test/widget_tests/managed_favorite_test.mocks.dart b/test/widget_tests/managed_favorite_test.mocks.dart index 7d11a5814..46d50b6b4 100644 --- a/test/widget_tests/managed_favorite_test.mocks.dart +++ b/test/widget_tests/managed_favorite_test.mocks.dart @@ -3,35 +3,30 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i13; -import 'dart:typed_data' as _i21; -import 'dart:ui' as _i18; +import 'dart:async' as _i10; +import 'dart:typed_data' as _i18; +import 'dart:ui' as _i15; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/db/isar/main_db.dart' as _i3; -import 'package:stackwallet/models/balance.dart' as _i10; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i28; -import 'package:stackwallet/models/isar/stack_theme.dart' as _i20; -import 'package:stackwallet/models/node_model.dart' as _i26; -import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i9; +import 'package:stackwallet/models/isar/stack_theme.dart' as _i17; +import 'package:stackwallet/models/node_model.dart' as _i23; import 'package:stackwallet/networking/http.dart' as _i6; -import 'package:stackwallet/services/coins/coin_service.dart' as _i27; -import 'package:stackwallet/services/locale_service.dart' as _i25; +import 'package:stackwallet/services/locale_service.dart' as _i22; import 'package:stackwallet/services/node_service.dart' as _i2; -import 'package:stackwallet/services/wallets.dart' as _i12; -import 'package:stackwallet/services/wallets_service.dart' as _i16; -import 'package:stackwallet/themes/theme_service.dart' as _i19; -import 'package:stackwallet/utilities/amount/amount.dart' as _i11; -import 'package:stackwallet/utilities/amount/amount_unit.dart' as _i24; -import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i23; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i17; -import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i22; +import 'package:stackwallet/services/wallets.dart' as _i9; +import 'package:stackwallet/services/wallets_service.dart' as _i13; +import 'package:stackwallet/themes/theme_service.dart' as _i16; +import 'package:stackwallet/utilities/amount/amount_unit.dart' as _i21; +import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i20; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i14; +import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i19; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i8; -import 'package:stackwallet/utilities/prefs.dart' as _i15; +import 'package:stackwallet/utilities/prefs.dart' as _i12; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i4; -import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i14; +import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i11; import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/cash_fusion_interface.dart' as _i7; @@ -109,40 +104,10 @@ class _FakeSecureStorageInterface_5 extends _i1.SmartFake ); } -class _FakeFeeObject_6 extends _i1.SmartFake implements _i9.FeeObject { - _FakeFeeObject_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeBalance_7 extends _i1.SmartFake implements _i10.Balance { - _FakeBalance_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAmount_8 extends _i1.SmartFake implements _i11.Amount { - _FakeAmount_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i12.Wallets { +class MockWallets extends _i1.Mock implements _i9.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -208,8 +173,8 @@ class MockWallets extends _i1.Mock implements _i12.Wallets { returnValueForMissingStub: null, ); @override - _i13.Future deleteWallet( - _i14.WalletInfo? info, + _i10.Future deleteWallet( + _i11.WalletInfo? info, _i8.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( @@ -220,12 +185,12 @@ class MockWallets extends _i1.Mock implements _i12.Wallets { secureStorage, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future load( - _i15.Prefs? prefs, + _i10.Future load( + _i12.Prefs? prefs, _i3.MainDB? mainDB, ) => (super.noSuchMethod( @@ -236,12 +201,12 @@ class MockWallets extends _i1.Mock implements _i12.Wallets { mainDB, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future loadAfterStackRestore( - _i15.Prefs? prefs, + _i10.Future loadAfterStackRestore( + _i12.Prefs? prefs, List<_i5.Wallet<_i4.CryptoCurrency>>? wallets, ) => (super.noSuchMethod( @@ -252,33 +217,33 @@ class MockWallets extends _i1.Mock implements _i12.Wallets { wallets, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); } /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i16.WalletsService { +class MockWalletsService extends _i1.Mock implements _i13.WalletsService { MockWalletsService() { _i1.throwOnMissingStub(this); } @override - _i13.Future> get walletNames => + _i10.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i13.Future>.value( - {}), - ) as _i13.Future>); + returnValue: _i10.Future>.value( + {}), + ) as _i10.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i13.Future renameWallet({ + _i10.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -293,21 +258,21 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - Map fetchWalletsData() => (super.noSuchMethod( + Map fetchWalletsData() => (super.noSuchMethod( Invocation.method( #fetchWalletsData, [], ), - returnValue: {}, - ) as Map); + returnValue: {}, + ) as Map); @override - _i13.Future addExistingStackWallet({ + _i10.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i17.Coin? coin, + required _i14.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -321,13 +286,13 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future addNewWallet({ + _i10.Future addNewWallet({ required String? name, - required _i17.Coin? coin, + required _i14.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -340,46 +305,46 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i10.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i13.Future>.value([]), - ) as _i13.Future>); + returnValue: _i10.Future>.value([]), + ) as _i10.Future>); @override - _i13.Future saveFavoriteWalletIds(List? walletIds) => + _i10.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i10.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i10.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future moveFavorite({ + _i10.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -392,48 +357,48 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i10.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - _i13.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i10.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future isMnemonicVerified({required String? walletId}) => + _i10.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - _i13.Future setMnemonicVerified({required String? walletId}) => + _i10.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future deleteWallet( + _i10.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -445,20 +410,20 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(0), - ) as _i13.Future); + returnValue: _i10.Future.value(0), + ) as _i10.Future); @override - _i13.Future refreshWallets(bool? shouldNotifyListeners) => + _i10.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -466,7 +431,7 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -494,7 +459,7 @@ class MockWalletsService extends _i1.Mock implements _i16.WalletsService { /// A class which mocks [ThemeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockThemeService extends _i1.Mock implements _i19.ThemeService { +class MockThemeService extends _i1.Mock implements _i16.ThemeService { MockThemeService() { _i1.throwOnMissingStub(this); } @@ -524,10 +489,10 @@ class MockThemeService extends _i1.Mock implements _i19.ThemeService { ), ) as _i3.MainDB); @override - List<_i20.StackTheme> get installedThemes => (super.noSuchMethod( + List<_i17.StackTheme> get installedThemes => (super.noSuchMethod( Invocation.getter(#installedThemes), - returnValue: <_i20.StackTheme>[], - ) as List<_i20.StackTheme>); + returnValue: <_i17.StackTheme>[], + ) as List<_i17.StackTheme>); @override void init(_i3.MainDB? db) => super.noSuchMethod( Invocation.method( @@ -537,79 +502,79 @@ class MockThemeService extends _i1.Mock implements _i19.ThemeService { returnValueForMissingStub: null, ); @override - _i13.Future install({required _i21.Uint8List? themeArchiveData}) => + _i10.Future install({required _i18.Uint8List? themeArchiveData}) => (super.noSuchMethod( Invocation.method( #install, [], {#themeArchiveData: themeArchiveData}, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future remove({required String? themeId}) => (super.noSuchMethod( + _i10.Future remove({required String? themeId}) => (super.noSuchMethod( Invocation.method( #remove, [], {#themeId: themeId}, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( + _i10.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( Invocation.method( #checkDefaultThemesOnStartup, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future verifyInstalled({required String? themeId}) => + _i10.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( Invocation.method( #verifyInstalled, [], {#themeId: themeId}, ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - _i13.Future> fetchThemes() => + _i10.Future> fetchThemes() => (super.noSuchMethod( Invocation.method( #fetchThemes, [], ), - returnValue: _i13.Future>.value( - <_i19.StackThemeMetaData>[]), - ) as _i13.Future>); + returnValue: _i10.Future>.value( + <_i16.StackThemeMetaData>[]), + ) as _i10.Future>); @override - _i13.Future<_i21.Uint8List> fetchTheme( - {required _i19.StackThemeMetaData? themeMetaData}) => + _i10.Future<_i18.Uint8List> fetchTheme( + {required _i16.StackThemeMetaData? themeMetaData}) => (super.noSuchMethod( Invocation.method( #fetchTheme, [], {#themeMetaData: themeMetaData}, ), - returnValue: _i13.Future<_i21.Uint8List>.value(_i21.Uint8List(0)), - ) as _i13.Future<_i21.Uint8List>); + returnValue: _i10.Future<_i18.Uint8List>.value(_i18.Uint8List(0)), + ) as _i10.Future<_i18.Uint8List>); @override - _i20.StackTheme? getTheme({required String? themeId}) => + _i17.StackTheme? getTheme({required String? themeId}) => (super.noSuchMethod(Invocation.method( #getTheme, [], {#themeId: themeId}, - )) as _i20.StackTheme?); + )) as _i17.StackTheme?); } /// A class which mocks [Prefs]. /// /// See the documentation for Mockito's code generation for more information. -class MockPrefs extends _i1.Mock implements _i15.Prefs { +class MockPrefs extends _i1.Mock implements _i12.Prefs { MockPrefs() { _i1.throwOnMissingStub(this); } @@ -665,12 +630,12 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - _i22.SyncingType get syncType => (super.noSuchMethod( + _i19.SyncingType get syncType => (super.noSuchMethod( Invocation.getter(#syncType), - returnValue: _i22.SyncingType.currentWalletOnly, - ) as _i22.SyncingType); + returnValue: _i19.SyncingType.currentWalletOnly, + ) as _i19.SyncingType); @override - set syncType(_i22.SyncingType? syncType) => super.noSuchMethod( + set syncType(_i19.SyncingType? syncType) => super.noSuchMethod( Invocation.setter( #syncType, syncType, @@ -829,12 +794,12 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - _i23.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + _i20.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( Invocation.getter(#backupFrequencyType), - returnValue: _i23.BackupFrequencyType.everyTenMinutes, - ) as _i23.BackupFrequencyType); + returnValue: _i20.BackupFrequencyType.everyTenMinutes, + ) as _i20.BackupFrequencyType); @override - set backupFrequencyType(_i23.BackupFrequencyType? backupFrequencyType) => + set backupFrequencyType(_i20.BackupFrequencyType? backupFrequencyType) => super.noSuchMethod( Invocation.setter( #backupFrequencyType, @@ -985,61 +950,61 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValue: false, ) as bool); @override - _i13.Future init() => (super.noSuchMethod( + _i10.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( + _i10.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( Invocation.method( #incrementCurrentNotificationIndex, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future isExternalCallsSet() => (super.noSuchMethod( + _i10.Future isExternalCallsSet() => (super.noSuchMethod( Invocation.method( #isExternalCallsSet, [], ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); + returnValue: _i10.Future.value(false), + ) as _i10.Future); @override - _i13.Future saveUserID(String? userId) => (super.noSuchMethod( + _i10.Future saveUserID(String? userId) => (super.noSuchMethod( Invocation.method( #saveUserID, [userId], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( + _i10.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( Invocation.method( #saveSignupEpoch, [signupEpoch], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i24.AmountUnit amountUnit(_i17.Coin? coin) => (super.noSuchMethod( + _i21.AmountUnit amountUnit(_i14.Coin? coin) => (super.noSuchMethod( Invocation.method( #amountUnit, [coin], ), - returnValue: _i24.AmountUnit.normal, - ) as _i24.AmountUnit); + returnValue: _i21.AmountUnit.normal, + ) as _i21.AmountUnit); @override void updateAmountUnit({ - required _i17.Coin? coin, - required _i24.AmountUnit? amountUnit, + required _i14.Coin? coin, + required _i21.AmountUnit? amountUnit, }) => super.noSuchMethod( Invocation.method( @@ -1053,7 +1018,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - int maxDecimals(_i17.Coin? coin) => (super.noSuchMethod( + int maxDecimals(_i14.Coin? coin) => (super.noSuchMethod( Invocation.method( #maxDecimals, [coin], @@ -1062,7 +1027,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { ) as int); @override void updateMaxDecimals({ - required _i17.Coin? coin, + required _i14.Coin? coin, required int? maxDecimals, }) => super.noSuchMethod( @@ -1077,7 +1042,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - _i7.FusionInfo getFusionServerInfo(_i17.Coin? coin) => (super.noSuchMethod( + _i7.FusionInfo getFusionServerInfo(_i14.Coin? coin) => (super.noSuchMethod( Invocation.method( #getFusionServerInfo, [coin], @@ -1092,7 +1057,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { ) as _i7.FusionInfo); @override void setFusionServerInfo( - _i17.Coin? coin, + _i14.Coin? coin, _i7.FusionInfo? fusionServerInfo, ) => super.noSuchMethod( @@ -1106,7 +1071,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1114,7 +1079,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { returnValueForMissingStub: null, ); @override - void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -1142,7 +1107,7 @@ class MockPrefs extends _i1.Mock implements _i15.Prefs { /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i25.LocaleService { +class MockLocaleService extends _i1.Mock implements _i22.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -1158,17 +1123,17 @@ class MockLocaleService extends _i1.Mock implements _i25.LocaleService { returnValue: false, ) as bool); @override - _i13.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i10.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1176,7 +1141,7 @@ class MockLocaleService extends _i1.Mock implements _i25.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -1214,33 +1179,33 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { ), ) as _i8.SecureStorageInterface); @override - List<_i26.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i23.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i26.NodeModel>[], - ) as List<_i26.NodeModel>); + returnValue: <_i23.NodeModel>[], + ) as List<_i23.NodeModel>); @override - List<_i26.NodeModel> get nodes => (super.noSuchMethod( + List<_i23.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i26.NodeModel>[], - ) as List<_i26.NodeModel>); + returnValue: <_i23.NodeModel>[], + ) as List<_i23.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i13.Future updateDefaults() => (super.noSuchMethod( + _i10.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future setPrimaryNodeFor({ - required _i17.Coin? coin, - required _i26.NodeModel? node, + _i10.Future setPrimaryNodeFor({ + required _i14.Coin? coin, + required _i23.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -1253,44 +1218,44 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i26.NodeModel? getPrimaryNodeFor({required _i17.Coin? coin}) => + _i23.NodeModel? getPrimaryNodeFor({required _i14.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i26.NodeModel?); + )) as _i23.NodeModel?); @override - List<_i26.NodeModel> getNodesFor(_i17.Coin? coin) => (super.noSuchMethod( + List<_i23.NodeModel> getNodesFor(_i14.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i26.NodeModel>[], - ) as List<_i26.NodeModel>); + returnValue: <_i23.NodeModel>[], + ) as List<_i23.NodeModel>); @override - _i26.NodeModel? getNodeById({required String? id}) => + _i23.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i26.NodeModel?); + )) as _i23.NodeModel?); @override - List<_i26.NodeModel> failoverNodesFor({required _i17.Coin? coin}) => + List<_i23.NodeModel> failoverNodesFor({required _i14.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i26.NodeModel>[], - ) as List<_i26.NodeModel>); + returnValue: <_i23.NodeModel>[], + ) as List<_i23.NodeModel>); @override - _i13.Future add( - _i26.NodeModel? node, + _i10.Future add( + _i23.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -1303,11 +1268,11 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future delete( + _i10.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -1319,11 +1284,11 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future setEnabledState( + _i10.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -1337,12 +1302,12 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future edit( - _i26.NodeModel? editedNode, + _i10.Future edit( + _i23.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -1355,20 +1320,20 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - _i13.Future updateCommunityNodes() => (super.noSuchMethod( + _i10.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1376,7 +1341,7 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -1400,312 +1365,3 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { returnValueForMissingStub: null, ); } - -/// A class which mocks [CoinServiceAPI]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i27.CoinServiceAPI { - @override - set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => - super.noSuchMethod( - Invocation.setter( - #onIsActiveWalletChanged, - _onIsActiveWalletChanged, - ), - returnValueForMissingStub: null, - ); - @override - _i17.Coin get coin => (super.noSuchMethod( - Invocation.getter(#coin), - returnValue: _i17.Coin.bitcoin, - ) as _i17.Coin); - @override - bool get isRefreshing => (super.noSuchMethod( - Invocation.getter(#isRefreshing), - returnValue: false, - ) as bool); - @override - bool get shouldAutoSync => (super.noSuchMethod( - Invocation.getter(#shouldAutoSync), - returnValue: false, - ) as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( - Invocation.setter( - #shouldAutoSync, - shouldAutoSync, - ), - returnValueForMissingStub: null, - ); - @override - bool get isFavorite => (super.noSuchMethod( - Invocation.getter(#isFavorite), - returnValue: false, - ) as bool); - @override - set isFavorite(bool? markFavorite) => super.noSuchMethod( - Invocation.setter( - #isFavorite, - markFavorite, - ), - returnValueForMissingStub: null, - ); - @override - _i13.Future<_i9.FeeObject> get fees => (super.noSuchMethod( - Invocation.getter(#fees), - returnValue: _i13.Future<_i9.FeeObject>.value(_FakeFeeObject_6( - this, - Invocation.getter(#fees), - )), - ) as _i13.Future<_i9.FeeObject>); - @override - _i13.Future get maxFee => (super.noSuchMethod( - Invocation.getter(#maxFee), - returnValue: _i13.Future.value(0), - ) as _i13.Future); - @override - _i13.Future get currentReceivingAddress => (super.noSuchMethod( - Invocation.getter(#currentReceivingAddress), - returnValue: _i13.Future.value(''), - ) as _i13.Future); - @override - _i10.Balance get balance => (super.noSuchMethod( - Invocation.getter(#balance), - returnValue: _FakeBalance_7( - this, - Invocation.getter(#balance), - ), - ) as _i10.Balance); - @override - _i13.Future> get transactions => (super.noSuchMethod( - Invocation.getter(#transactions), - returnValue: - _i13.Future>.value(<_i28.Transaction>[]), - ) as _i13.Future>); - @override - _i13.Future> get utxos => (super.noSuchMethod( - Invocation.getter(#utxos), - returnValue: _i13.Future>.value(<_i28.UTXO>[]), - ) as _i13.Future>); - @override - set walletName(String? newName) => super.noSuchMethod( - Invocation.setter( - #walletName, - newName, - ), - returnValueForMissingStub: null, - ); - @override - String get walletName => (super.noSuchMethod( - Invocation.getter(#walletName), - returnValue: '', - ) as String); - @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: '', - ) as String); - @override - _i13.Future> get mnemonic => (super.noSuchMethod( - Invocation.getter(#mnemonic), - returnValue: _i13.Future>.value([]), - ) as _i13.Future>); - @override - _i13.Future get mnemonicString => (super.noSuchMethod( - Invocation.getter(#mnemonicString), - returnValue: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future get mnemonicPassphrase => (super.noSuchMethod( - Invocation.getter(#mnemonicPassphrase), - returnValue: _i13.Future.value(), - ) as _i13.Future); - @override - bool get hasCalledExit => (super.noSuchMethod( - Invocation.getter(#hasCalledExit), - returnValue: false, - ) as bool); - @override - bool get isConnected => (super.noSuchMethod( - Invocation.getter(#isConnected), - returnValue: false, - ) as bool); - @override - int get storedChainHeight => (super.noSuchMethod( - Invocation.getter(#storedChainHeight), - returnValue: 0, - ) as int); - @override - _i13.Future> prepareSend({ - required String? address, - required _i11.Amount? amount, - Map? args, - }) => - (super.noSuchMethod( - Invocation.method( - #prepareSend, - [], - { - #address: address, - #amount: amount, - #args: args, - }, - ), - returnValue: - _i13.Future>.value({}), - ) as _i13.Future>); - @override - _i13.Future confirmSend({required Map? txData}) => - (super.noSuchMethod( - Invocation.method( - #confirmSend, - [], - {#txData: txData}, - ), - returnValue: _i13.Future.value(''), - ) as _i13.Future); - @override - _i13.Future refresh() => (super.noSuchMethod( - Invocation.method( - #refresh, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( - Invocation.method( - #updateNode, - [shouldRefresh], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - bool validateAddress(String? address) => (super.noSuchMethod( - Invocation.method( - #validateAddress, - [address], - ), - returnValue: false, - ) as bool); - @override - _i13.Future testNetworkConnection() => (super.noSuchMethod( - Invocation.method( - #testNetworkConnection, - [], - ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); - @override - _i13.Future recoverFromMnemonic({ - required String? mnemonic, - String? mnemonicPassphrase, - required int? maxUnusedAddressGap, - required int? maxNumberOfIndexesToCheck, - required int? height, - }) => - (super.noSuchMethod( - Invocation.method( - #recoverFromMnemonic, - [], - { - #mnemonic: mnemonic, - #mnemonicPassphrase: mnemonicPassphrase, - #maxUnusedAddressGap: maxUnusedAddressGap, - #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height, - }, - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future initializeNew( - ({String mnemonicPassphrase, int wordCount})? data) => - (super.noSuchMethod( - Invocation.method( - #initializeNew, - [data], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future initializeExisting() => (super.noSuchMethod( - Invocation.method( - #initializeExisting, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future exit() => (super.noSuchMethod( - Invocation.method( - #exit, - [], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future fullRescan( - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - ) => - (super.noSuchMethod( - Invocation.method( - #fullRescan, - [ - maxUnusedAddressGap, - maxNumberOfIndexesToCheck, - ], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.Future); - @override - _i13.Future<_i11.Amount> estimateFeeFor( - _i11.Amount? amount, - int? feeRate, - ) => - (super.noSuchMethod( - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - returnValue: _i13.Future<_i11.Amount>.value(_FakeAmount_8( - this, - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - )), - ) as _i13.Future<_i11.Amount>); - @override - _i13.Future generateNewAddress() => (super.noSuchMethod( - Invocation.method( - #generateNewAddress, - [], - ), - returnValue: _i13.Future.value(false), - ) as _i13.Future); - @override - _i13.Future updateSentCachedTxData(Map? txData) => - (super.noSuchMethod( - Invocation.method( - #updateSentCachedTxData, - [txData], - ), - returnValue: _i13.Future.value(), - returnValueForMissingStub: _i13.Future.value(), - ) as _i13.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 6c9fd9e71..70c36b8aa 100644 --- a/test/widget_tests/table_view/table_view_row_test.dart +++ b/test/widget_tests/table_view/table_view_row_test.dart @@ -1,5 +1,4 @@ import 'package:mockito/annotations.dart'; -import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/wallets.dart'; import 'package:stackwallet/services/wallets_service.dart'; import 'package:stackwallet/themes/theme_service.dart'; @@ -8,9 +7,7 @@ import 'package:stackwallet/themes/theme_service.dart'; Wallets, WalletsService, ThemeService, -], customMocks: [ - MockSpec(returnNullOnMissingStub: true) -]) +], customMocks: []) void main() { // testWidgets('Test table view row', (widgetTester) async { // widgetTester.binding.window.physicalSizeTestValue = const Size(2500, 1800); 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 fbeb71012..25720f6ed 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,30 +3,25 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i11; -import 'dart:typed_data' as _i20; -import 'dart:ui' as _i17; +import 'dart:async' as _i8; +import 'dart:typed_data' as _i17; +import 'dart:ui' as _i14; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/db/isar/main_db.dart' as _i3; -import 'package:stackwallet/models/balance.dart' as _i8; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i22; -import 'package:stackwallet/models/isar/stack_theme.dart' as _i19; -import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i7; +import 'package:stackwallet/models/isar/stack_theme.dart' as _i16; import 'package:stackwallet/networking/http.dart' as _i6; -import 'package:stackwallet/services/coins/coin_service.dart' as _i21; import 'package:stackwallet/services/node_service.dart' as _i2; -import 'package:stackwallet/services/wallets.dart' as _i10; -import 'package:stackwallet/services/wallets_service.dart' as _i15; -import 'package:stackwallet/themes/theme_service.dart' as _i18; -import 'package:stackwallet/utilities/amount/amount.dart' as _i9; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i16; +import 'package:stackwallet/services/wallets.dart' as _i7; +import 'package:stackwallet/services/wallets_service.dart' as _i12; +import 'package:stackwallet/themes/theme_service.dart' as _i15; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i13; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i13; -import 'package:stackwallet/utilities/prefs.dart' as _i14; + as _i10; +import 'package:stackwallet/utilities/prefs.dart' as _i11; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i4; -import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i12; +import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i9; import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: type=lint @@ -81,40 +76,10 @@ class _FakeHTTP_3 extends _i1.SmartFake implements _i6.HTTP { ); } -class _FakeFeeObject_4 extends _i1.SmartFake implements _i7.FeeObject { - _FakeFeeObject_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeBalance_5 extends _i1.SmartFake implements _i8.Balance { - _FakeBalance_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAmount_6 extends _i1.SmartFake implements _i9.Amount { - _FakeAmount_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i10.Wallets { +class MockWallets extends _i1.Mock implements _i7.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -180,9 +145,9 @@ class MockWallets extends _i1.Mock implements _i10.Wallets { returnValueForMissingStub: null, ); @override - _i11.Future deleteWallet( - _i12.WalletInfo? info, - _i13.SecureStorageInterface? secureStorage, + _i8.Future deleteWallet( + _i9.WalletInfo? info, + _i10.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( Invocation.method( @@ -192,12 +157,12 @@ class MockWallets extends _i1.Mock implements _i10.Wallets { secureStorage, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future load( - _i14.Prefs? prefs, + _i8.Future load( + _i11.Prefs? prefs, _i3.MainDB? mainDB, ) => (super.noSuchMethod( @@ -208,12 +173,12 @@ class MockWallets extends _i1.Mock implements _i10.Wallets { mainDB, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future loadAfterStackRestore( - _i14.Prefs? prefs, + _i8.Future loadAfterStackRestore( + _i11.Prefs? prefs, List<_i5.Wallet<_i4.CryptoCurrency>>? wallets, ) => (super.noSuchMethod( @@ -224,33 +189,33 @@ class MockWallets extends _i1.Mock implements _i10.Wallets { wallets, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i15.WalletsService { +class MockWalletsService extends _i1.Mock implements _i12.WalletsService { MockWalletsService() { _i1.throwOnMissingStub(this); } @override - _i11.Future> get walletNames => + _i8.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i11.Future>.value( - {}), - ) as _i11.Future>); + returnValue: _i8.Future>.value( + {}), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i11.Future renameWallet({ + _i8.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -265,21 +230,21 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i11.Future.value(false), - ) as _i11.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 - _i11.Future addExistingStackWallet({ + _i8.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i16.Coin? coin, + required _i13.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -293,13 +258,13 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future addNewWallet({ + _i8.Future addNewWallet({ required String? name, - required _i16.Coin? coin, + required _i13.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -312,46 +277,46 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i8.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i11.Future>.value([]), - ) as _i11.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i11.Future saveFavoriteWalletIds(List? walletIds) => + _i8.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i8.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i8.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future moveFavorite({ + _i8.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -364,48 +329,48 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i8.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i11.Future.value(false), - ) as _i11.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i11.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i8.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future isMnemonicVerified({required String? walletId}) => + _i8.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i11.Future.value(false), - ) as _i11.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i11.Future setMnemonicVerified({required String? walletId}) => + _i8.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future deleteWallet( + _i8.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -417,20 +382,20 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i11.Future.value(0), - ) as _i11.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i11.Future refreshWallets(bool? shouldNotifyListeners) => + _i8.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -438,7 +403,7 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -466,7 +431,7 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { /// A class which mocks [ThemeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockThemeService extends _i1.Mock implements _i18.ThemeService { +class MockThemeService extends _i1.Mock implements _i15.ThemeService { MockThemeService() { _i1.throwOnMissingStub(this); } @@ -496,10 +461,10 @@ class MockThemeService extends _i1.Mock implements _i18.ThemeService { ), ) as _i3.MainDB); @override - List<_i19.StackTheme> get installedThemes => (super.noSuchMethod( + List<_i16.StackTheme> get installedThemes => (super.noSuchMethod( Invocation.getter(#installedThemes), - returnValue: <_i19.StackTheme>[], - ) as List<_i19.StackTheme>); + returnValue: <_i16.StackTheme>[], + ) as List<_i16.StackTheme>); @override void init(_i3.MainDB? db) => super.noSuchMethod( Invocation.method( @@ -509,380 +474,71 @@ class MockThemeService extends _i1.Mock implements _i18.ThemeService { returnValueForMissingStub: null, ); @override - _i11.Future install({required _i20.Uint8List? themeArchiveData}) => + _i8.Future install({required _i17.Uint8List? themeArchiveData}) => (super.noSuchMethod( Invocation.method( #install, [], {#themeArchiveData: themeArchiveData}, ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future remove({required String? themeId}) => (super.noSuchMethod( + _i8.Future remove({required String? themeId}) => (super.noSuchMethod( Invocation.method( #remove, [], {#themeId: themeId}, ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( + _i8.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( Invocation.method( #checkDefaultThemesOnStartup, [], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future verifyInstalled({required String? themeId}) => + _i8.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( Invocation.method( #verifyInstalled, [], {#themeId: themeId}, ), - returnValue: _i11.Future.value(false), - ) as _i11.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i11.Future> fetchThemes() => + _i8.Future> fetchThemes() => (super.noSuchMethod( Invocation.method( #fetchThemes, [], ), - returnValue: _i11.Future>.value( - <_i18.StackThemeMetaData>[]), - ) as _i11.Future>); + returnValue: _i8.Future>.value( + <_i15.StackThemeMetaData>[]), + ) as _i8.Future>); @override - _i11.Future<_i20.Uint8List> fetchTheme( - {required _i18.StackThemeMetaData? themeMetaData}) => + _i8.Future<_i17.Uint8List> fetchTheme( + {required _i15.StackThemeMetaData? themeMetaData}) => (super.noSuchMethod( Invocation.method( #fetchTheme, [], {#themeMetaData: themeMetaData}, ), - returnValue: _i11.Future<_i20.Uint8List>.value(_i20.Uint8List(0)), - ) as _i11.Future<_i20.Uint8List>); + returnValue: _i8.Future<_i17.Uint8List>.value(_i17.Uint8List(0)), + ) as _i8.Future<_i17.Uint8List>); @override - _i19.StackTheme? getTheme({required String? themeId}) => + _i16.StackTheme? getTheme({required String? themeId}) => (super.noSuchMethod(Invocation.method( #getTheme, [], {#themeId: themeId}, - )) as _i19.StackTheme?); -} - -/// A class which mocks [CoinServiceAPI]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i21.CoinServiceAPI { - @override - set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => - super.noSuchMethod( - Invocation.setter( - #onIsActiveWalletChanged, - _onIsActiveWalletChanged, - ), - returnValueForMissingStub: null, - ); - @override - _i16.Coin get coin => (super.noSuchMethod( - Invocation.getter(#coin), - returnValue: _i16.Coin.bitcoin, - ) as _i16.Coin); - @override - bool get isRefreshing => (super.noSuchMethod( - Invocation.getter(#isRefreshing), - returnValue: false, - ) as bool); - @override - bool get shouldAutoSync => (super.noSuchMethod( - Invocation.getter(#shouldAutoSync), - returnValue: false, - ) as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( - Invocation.setter( - #shouldAutoSync, - shouldAutoSync, - ), - returnValueForMissingStub: null, - ); - @override - bool get isFavorite => (super.noSuchMethod( - Invocation.getter(#isFavorite), - returnValue: false, - ) as bool); - @override - set isFavorite(bool? markFavorite) => super.noSuchMethod( - Invocation.setter( - #isFavorite, - markFavorite, - ), - returnValueForMissingStub: null, - ); - @override - _i11.Future<_i7.FeeObject> get fees => (super.noSuchMethod( - Invocation.getter(#fees), - returnValue: _i11.Future<_i7.FeeObject>.value(_FakeFeeObject_4( - this, - Invocation.getter(#fees), - )), - ) as _i11.Future<_i7.FeeObject>); - @override - _i11.Future get maxFee => (super.noSuchMethod( - Invocation.getter(#maxFee), - returnValue: _i11.Future.value(0), - ) as _i11.Future); - @override - _i11.Future get currentReceivingAddress => (super.noSuchMethod( - Invocation.getter(#currentReceivingAddress), - returnValue: _i11.Future.value(''), - ) as _i11.Future); - @override - _i8.Balance get balance => (super.noSuchMethod( - Invocation.getter(#balance), - returnValue: _FakeBalance_5( - this, - Invocation.getter(#balance), - ), - ) as _i8.Balance); - @override - _i11.Future> get transactions => (super.noSuchMethod( - Invocation.getter(#transactions), - returnValue: - _i11.Future>.value(<_i22.Transaction>[]), - ) as _i11.Future>); - @override - _i11.Future> get utxos => (super.noSuchMethod( - Invocation.getter(#utxos), - returnValue: _i11.Future>.value(<_i22.UTXO>[]), - ) as _i11.Future>); - @override - set walletName(String? newName) => super.noSuchMethod( - Invocation.setter( - #walletName, - newName, - ), - returnValueForMissingStub: null, - ); - @override - String get walletName => (super.noSuchMethod( - Invocation.getter(#walletName), - returnValue: '', - ) as String); - @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: '', - ) as String); - @override - _i11.Future> get mnemonic => (super.noSuchMethod( - Invocation.getter(#mnemonic), - returnValue: _i11.Future>.value([]), - ) as _i11.Future>); - @override - _i11.Future get mnemonicString => (super.noSuchMethod( - Invocation.getter(#mnemonicString), - returnValue: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future get mnemonicPassphrase => (super.noSuchMethod( - Invocation.getter(#mnemonicPassphrase), - returnValue: _i11.Future.value(), - ) as _i11.Future); - @override - bool get hasCalledExit => (super.noSuchMethod( - Invocation.getter(#hasCalledExit), - returnValue: false, - ) as bool); - @override - bool get isConnected => (super.noSuchMethod( - Invocation.getter(#isConnected), - returnValue: false, - ) as bool); - @override - int get storedChainHeight => (super.noSuchMethod( - Invocation.getter(#storedChainHeight), - returnValue: 0, - ) as int); - @override - _i11.Future> prepareSend({ - required String? address, - required _i9.Amount? amount, - Map? args, - }) => - (super.noSuchMethod( - Invocation.method( - #prepareSend, - [], - { - #address: address, - #amount: amount, - #args: args, - }, - ), - returnValue: - _i11.Future>.value({}), - ) as _i11.Future>); - @override - _i11.Future confirmSend({required Map? txData}) => - (super.noSuchMethod( - Invocation.method( - #confirmSend, - [], - {#txData: txData}, - ), - returnValue: _i11.Future.value(''), - ) as _i11.Future); - @override - _i11.Future refresh() => (super.noSuchMethod( - Invocation.method( - #refresh, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( - Invocation.method( - #updateNode, - [shouldRefresh], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - bool validateAddress(String? address) => (super.noSuchMethod( - Invocation.method( - #validateAddress, - [address], - ), - returnValue: false, - ) as bool); - @override - _i11.Future testNetworkConnection() => (super.noSuchMethod( - Invocation.method( - #testNetworkConnection, - [], - ), - returnValue: _i11.Future.value(false), - ) as _i11.Future); - @override - _i11.Future recoverFromMnemonic({ - required String? mnemonic, - String? mnemonicPassphrase, - required int? maxUnusedAddressGap, - required int? maxNumberOfIndexesToCheck, - required int? height, - }) => - (super.noSuchMethod( - Invocation.method( - #recoverFromMnemonic, - [], - { - #mnemonic: mnemonic, - #mnemonicPassphrase: mnemonicPassphrase, - #maxUnusedAddressGap: maxUnusedAddressGap, - #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height, - }, - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future initializeNew( - ({String mnemonicPassphrase, int wordCount})? data) => - (super.noSuchMethod( - Invocation.method( - #initializeNew, - [data], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future initializeExisting() => (super.noSuchMethod( - Invocation.method( - #initializeExisting, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future exit() => (super.noSuchMethod( - Invocation.method( - #exit, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future fullRescan( - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - ) => - (super.noSuchMethod( - Invocation.method( - #fullRescan, - [ - maxUnusedAddressGap, - maxNumberOfIndexesToCheck, - ], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future<_i9.Amount> estimateFeeFor( - _i9.Amount? amount, - int? feeRate, - ) => - (super.noSuchMethod( - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - returnValue: _i11.Future<_i9.Amount>.value(_FakeAmount_6( - this, - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - )), - ) as _i11.Future<_i9.Amount>); - @override - _i11.Future generateNewAddress() => (super.noSuchMethod( - Invocation.method( - #generateNewAddress, - [], - ), - returnValue: _i11.Future.value(false), - ) as _i11.Future); - @override - _i11.Future updateSentCachedTxData(Map? txData) => - (super.noSuchMethod( - Invocation.method( - #updateSentCachedTxData, - [txData], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + )) as _i16.StackTheme?); } diff --git a/test/widget_tests/transaction_card_test.dart b/test/widget_tests/transaction_card_test.dart index ced9da97a..ead34daa4 100644 --- a/test/widget_tests/transaction_card_test.dart +++ b/test/widget_tests/transaction_card_test.dart @@ -1,7 +1,6 @@ import 'package:mockito/annotations.dart'; import 'package:stackwallet/db/isar/main_db.dart'; import 'package:stackwallet/models/isar/stack_theme.dart'; -import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/locale_service.dart'; import 'package:stackwallet/services/price_service.dart'; import 'package:stackwallet/services/wallets.dart'; @@ -10,7 +9,6 @@ import 'package:stackwallet/utilities/prefs.dart'; @GenerateMocks([ Wallets, - CoinServiceAPI, LocaleService, Prefs, PriceService, diff --git a/test/widget_tests/transaction_card_test.mocks.dart b/test/widget_tests/transaction_card_test.mocks.dart index 487869389..1b593ed24 100644 --- a/test/widget_tests/transaction_card_test.mocks.dart +++ b/test/widget_tests/transaction_card_test.mocks.dart @@ -3,44 +3,40 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i14; -import 'dart:typed_data' as _i30; -import 'dart:ui' as _i22; +import 'dart:async' as _i11; +import 'dart:typed_data' as _i25; +import 'dart:ui' as _i16; -import 'package:decimal/decimal.dart' as _i27; -import 'package:isar/isar.dart' as _i12; +import 'package:decimal/decimal.dart' as _i22; +import 'package:isar/isar.dart' as _i9; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/db/isar/main_db.dart' as _i3; -import 'package:stackwallet/models/balance.dart' as _i7; -import 'package:stackwallet/models/isar/models/block_explorer.dart' as _i32; +import 'package:stackwallet/models/isar/models/block_explorer.dart' as _i27; import 'package:stackwallet/models/isar/models/blockchain_data/v2/transaction_v2.dart' - as _i33; -import 'package:stackwallet/models/isar/models/contact_entry.dart' as _i31; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i20; -import 'package:stackwallet/models/isar/stack_theme.dart' as _i29; -import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i6; -import 'package:stackwallet/networking/http.dart' as _i11; -import 'package:stackwallet/services/coins/coin_service.dart' as _i18; -import 'package:stackwallet/services/locale_service.dart' as _i21; + as _i29; +import 'package:stackwallet/models/isar/models/contact_entry.dart' as _i26; +import 'package:stackwallet/models/isar/models/isar_models.dart' as _i28; +import 'package:stackwallet/models/isar/stack_theme.dart' as _i24; +import 'package:stackwallet/networking/http.dart' as _i8; +import 'package:stackwallet/services/locale_service.dart' as _i15; import 'package:stackwallet/services/node_service.dart' as _i2; -import 'package:stackwallet/services/price_service.dart' as _i26; -import 'package:stackwallet/services/wallets.dart' as _i13; -import 'package:stackwallet/themes/theme_service.dart' as _i28; -import 'package:stackwallet/utilities/amount/amount.dart' as _i8; -import 'package:stackwallet/utilities/amount/amount_unit.dart' as _i25; -import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i24; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i19; -import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i23; +import 'package:stackwallet/services/price_service.dart' as _i21; +import 'package:stackwallet/services/wallets.dart' as _i10; +import 'package:stackwallet/themes/theme_service.dart' as _i23; +import 'package:stackwallet/utilities/amount/amount_unit.dart' as _i19; +import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i18; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i20; +import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i17; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' - as _i16; -import 'package:stackwallet/utilities/prefs.dart' as _i17; + as _i13; +import 'package:stackwallet/utilities/prefs.dart' as _i14; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i4; -import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i15; +import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i12; import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/cash_fusion_interface.dart' - as _i9; -import 'package:tuple/tuple.dart' as _i10; + as _i6; +import 'package:tuple/tuple.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -84,8 +80,8 @@ class _FakeWallet_2 extends _i1.SmartFake ); } -class _FakeFeeObject_3 extends _i1.SmartFake implements _i6.FeeObject { - _FakeFeeObject_3( +class _FakeFusionInfo_3 extends _i1.SmartFake implements _i6.FusionInfo { + _FakeFusionInfo_3( Object parent, Invocation parentInvocation, ) : super( @@ -94,8 +90,8 @@ class _FakeFeeObject_3 extends _i1.SmartFake implements _i6.FeeObject { ); } -class _FakeBalance_4 extends _i1.SmartFake implements _i7.Balance { - _FakeBalance_4( +class _FakeDuration_4 extends _i1.SmartFake implements Duration { + _FakeDuration_4( Object parent, Invocation parentInvocation, ) : super( @@ -104,8 +100,9 @@ class _FakeBalance_4 extends _i1.SmartFake implements _i7.Balance { ); } -class _FakeAmount_5 extends _i1.SmartFake implements _i8.Amount { - _FakeAmount_5( +class _FakeTuple2_5 extends _i1.SmartFake + implements _i7.Tuple2 { + _FakeTuple2_5( Object parent, Invocation parentInvocation, ) : super( @@ -114,8 +111,8 @@ class _FakeAmount_5 extends _i1.SmartFake implements _i8.Amount { ); } -class _FakeFusionInfo_6 extends _i1.SmartFake implements _i9.FusionInfo { - _FakeFusionInfo_6( +class _FakeHTTP_6 extends _i1.SmartFake implements _i8.HTTP { + _FakeHTTP_6( Object parent, Invocation parentInvocation, ) : super( @@ -124,8 +121,8 @@ class _FakeFusionInfo_6 extends _i1.SmartFake implements _i9.FusionInfo { ); } -class _FakeDuration_7 extends _i1.SmartFake implements Duration { - _FakeDuration_7( +class _FakeIsar_7 extends _i1.SmartFake implements _i9.Isar { + _FakeIsar_7( Object parent, Invocation parentInvocation, ) : super( @@ -134,40 +131,9 @@ class _FakeDuration_7 extends _i1.SmartFake implements Duration { ); } -class _FakeTuple2_8 extends _i1.SmartFake - implements _i10.Tuple2 { - _FakeTuple2_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeHTTP_9 extends _i1.SmartFake implements _i11.HTTP { - _FakeHTTP_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeIsar_10 extends _i1.SmartFake implements _i12.Isar { - _FakeIsar_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeQueryBuilder_11 extends _i1.SmartFake - implements _i12.QueryBuilder { - _FakeQueryBuilder_11( +class _FakeQueryBuilder_8 extends _i1.SmartFake + implements _i9.QueryBuilder { + _FakeQueryBuilder_8( Object parent, Invocation parentInvocation, ) : super( @@ -179,7 +145,7 @@ class _FakeQueryBuilder_11 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 _i13.Wallets { +class MockWallets extends _i1.Mock implements _i10.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -245,9 +211,9 @@ class MockWallets extends _i1.Mock implements _i13.Wallets { returnValueForMissingStub: null, ); @override - _i14.Future deleteWallet( - _i15.WalletInfo? info, - _i16.SecureStorageInterface? secureStorage, + _i11.Future deleteWallet( + _i12.WalletInfo? info, + _i13.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( Invocation.method( @@ -257,12 +223,12 @@ class MockWallets extends _i1.Mock implements _i13.Wallets { secureStorage, ], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future load( - _i17.Prefs? prefs, + _i11.Future load( + _i14.Prefs? prefs, _i3.MainDB? mainDB, ) => (super.noSuchMethod( @@ -273,12 +239,12 @@ class MockWallets extends _i1.Mock implements _i13.Wallets { mainDB, ], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future loadAfterStackRestore( - _i17.Prefs? prefs, + _i11.Future loadAfterStackRestore( + _i14.Prefs? prefs, List<_i5.Wallet<_i4.CryptoCurrency>>? wallets, ) => (super.noSuchMethod( @@ -289,328 +255,15 @@ class MockWallets extends _i1.Mock implements _i13.Wallets { wallets, ], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); -} - -/// A class which mocks [CoinServiceAPI]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { - MockCoinServiceAPI() { - _i1.throwOnMissingStub(this); - } - - @override - set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => - super.noSuchMethod( - Invocation.setter( - #onIsActiveWalletChanged, - _onIsActiveWalletChanged, - ), - returnValueForMissingStub: null, - ); - @override - _i19.Coin get coin => (super.noSuchMethod( - Invocation.getter(#coin), - returnValue: _i19.Coin.bitcoin, - ) as _i19.Coin); - @override - bool get isRefreshing => (super.noSuchMethod( - Invocation.getter(#isRefreshing), - returnValue: false, - ) as bool); - @override - bool get shouldAutoSync => (super.noSuchMethod( - Invocation.getter(#shouldAutoSync), - returnValue: false, - ) as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( - Invocation.setter( - #shouldAutoSync, - shouldAutoSync, - ), - returnValueForMissingStub: null, - ); - @override - bool get isFavorite => (super.noSuchMethod( - Invocation.getter(#isFavorite), - returnValue: false, - ) as bool); - @override - set isFavorite(bool? markFavorite) => super.noSuchMethod( - Invocation.setter( - #isFavorite, - markFavorite, - ), - returnValueForMissingStub: null, - ); - @override - _i14.Future<_i6.FeeObject> get fees => (super.noSuchMethod( - Invocation.getter(#fees), - returnValue: _i14.Future<_i6.FeeObject>.value(_FakeFeeObject_3( - this, - Invocation.getter(#fees), - )), - ) as _i14.Future<_i6.FeeObject>); - @override - _i14.Future get maxFee => (super.noSuchMethod( - Invocation.getter(#maxFee), - returnValue: _i14.Future.value(0), - ) as _i14.Future); - @override - _i14.Future get currentReceivingAddress => (super.noSuchMethod( - Invocation.getter(#currentReceivingAddress), - returnValue: _i14.Future.value(''), - ) as _i14.Future); - @override - _i7.Balance get balance => (super.noSuchMethod( - Invocation.getter(#balance), - returnValue: _FakeBalance_4( - this, - Invocation.getter(#balance), - ), - ) as _i7.Balance); - @override - _i14.Future> get transactions => (super.noSuchMethod( - Invocation.getter(#transactions), - returnValue: - _i14.Future>.value(<_i20.Transaction>[]), - ) as _i14.Future>); - @override - _i14.Future> get utxos => (super.noSuchMethod( - Invocation.getter(#utxos), - returnValue: _i14.Future>.value(<_i20.UTXO>[]), - ) as _i14.Future>); - @override - set walletName(String? newName) => super.noSuchMethod( - Invocation.setter( - #walletName, - newName, - ), - returnValueForMissingStub: null, - ); - @override - String get walletName => (super.noSuchMethod( - Invocation.getter(#walletName), - returnValue: '', - ) as String); - @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: '', - ) as String); - @override - _i14.Future> get mnemonic => (super.noSuchMethod( - Invocation.getter(#mnemonic), - returnValue: _i14.Future>.value([]), - ) as _i14.Future>); - @override - _i14.Future get mnemonicString => (super.noSuchMethod( - Invocation.getter(#mnemonicString), - returnValue: _i14.Future.value(), - ) as _i14.Future); - @override - _i14.Future get mnemonicPassphrase => (super.noSuchMethod( - Invocation.getter(#mnemonicPassphrase), - returnValue: _i14.Future.value(), - ) as _i14.Future); - @override - bool get hasCalledExit => (super.noSuchMethod( - Invocation.getter(#hasCalledExit), - returnValue: false, - ) as bool); - @override - bool get isConnected => (super.noSuchMethod( - Invocation.getter(#isConnected), - returnValue: false, - ) as bool); - @override - int get storedChainHeight => (super.noSuchMethod( - Invocation.getter(#storedChainHeight), - returnValue: 0, - ) as int); - @override - _i14.Future> prepareSend({ - required String? address, - required _i8.Amount? amount, - Map? args, - }) => - (super.noSuchMethod( - Invocation.method( - #prepareSend, - [], - { - #address: address, - #amount: amount, - #args: args, - }, - ), - returnValue: - _i14.Future>.value({}), - ) as _i14.Future>); - @override - _i14.Future confirmSend({required Map? txData}) => - (super.noSuchMethod( - Invocation.method( - #confirmSend, - [], - {#txData: txData}, - ), - returnValue: _i14.Future.value(''), - ) as _i14.Future); - @override - _i14.Future refresh() => (super.noSuchMethod( - Invocation.method( - #refresh, - [], - ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); - @override - _i14.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( - Invocation.method( - #updateNode, - [shouldRefresh], - ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); - @override - bool validateAddress(String? address) => (super.noSuchMethod( - Invocation.method( - #validateAddress, - [address], - ), - returnValue: false, - ) as bool); - @override - _i14.Future testNetworkConnection() => (super.noSuchMethod( - Invocation.method( - #testNetworkConnection, - [], - ), - returnValue: _i14.Future.value(false), - ) as _i14.Future); - @override - _i14.Future recoverFromMnemonic({ - required String? mnemonic, - String? mnemonicPassphrase, - required int? maxUnusedAddressGap, - required int? maxNumberOfIndexesToCheck, - required int? height, - }) => - (super.noSuchMethod( - Invocation.method( - #recoverFromMnemonic, - [], - { - #mnemonic: mnemonic, - #mnemonicPassphrase: mnemonicPassphrase, - #maxUnusedAddressGap: maxUnusedAddressGap, - #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height, - }, - ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); - @override - _i14.Future initializeNew( - ({String mnemonicPassphrase, int wordCount})? data) => - (super.noSuchMethod( - Invocation.method( - #initializeNew, - [data], - ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); - @override - _i14.Future initializeExisting() => (super.noSuchMethod( - Invocation.method( - #initializeExisting, - [], - ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); - @override - _i14.Future exit() => (super.noSuchMethod( - Invocation.method( - #exit, - [], - ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); - @override - _i14.Future fullRescan( - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - ) => - (super.noSuchMethod( - Invocation.method( - #fullRescan, - [ - maxUnusedAddressGap, - maxNumberOfIndexesToCheck, - ], - ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); - @override - _i14.Future<_i8.Amount> estimateFeeFor( - _i8.Amount? amount, - int? feeRate, - ) => - (super.noSuchMethod( - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - returnValue: _i14.Future<_i8.Amount>.value(_FakeAmount_5( - this, - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - )), - ) as _i14.Future<_i8.Amount>); - @override - _i14.Future generateNewAddress() => (super.noSuchMethod( - Invocation.method( - #generateNewAddress, - [], - ), - returnValue: _i14.Future.value(false), - ) as _i14.Future); - @override - _i14.Future updateSentCachedTxData(Map? txData) => - (super.noSuchMethod( - Invocation.method( - #updateSentCachedTxData, - [txData], - ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); } /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i21.LocaleService { +class MockLocaleService extends _i1.Mock implements _i15.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -626,17 +279,17 @@ class MockLocaleService extends _i1.Mock implements _i21.LocaleService { returnValue: false, ) as bool); @override - _i14.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + _i11.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( Invocation.method( #loadLocale, [], {#notify: notify}, ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -644,7 +297,7 @@ class MockLocaleService extends _i1.Mock implements _i21.LocaleService { returnValueForMissingStub: null, ); @override - void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -672,7 +325,7 @@ class MockLocaleService extends _i1.Mock implements _i21.LocaleService { /// A class which mocks [Prefs]. /// /// See the documentation for Mockito's code generation for more information. -class MockPrefs extends _i1.Mock implements _i17.Prefs { +class MockPrefs extends _i1.Mock implements _i14.Prefs { MockPrefs() { _i1.throwOnMissingStub(this); } @@ -728,12 +381,12 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs { returnValueForMissingStub: null, ); @override - _i23.SyncingType get syncType => (super.noSuchMethod( + _i17.SyncingType get syncType => (super.noSuchMethod( Invocation.getter(#syncType), - returnValue: _i23.SyncingType.currentWalletOnly, - ) as _i23.SyncingType); + returnValue: _i17.SyncingType.currentWalletOnly, + ) as _i17.SyncingType); @override - set syncType(_i23.SyncingType? syncType) => super.noSuchMethod( + set syncType(_i17.SyncingType? syncType) => super.noSuchMethod( Invocation.setter( #syncType, syncType, @@ -892,12 +545,12 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs { returnValueForMissingStub: null, ); @override - _i24.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + _i18.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( Invocation.getter(#backupFrequencyType), - returnValue: _i24.BackupFrequencyType.everyTenMinutes, - ) as _i24.BackupFrequencyType); + returnValue: _i18.BackupFrequencyType.everyTenMinutes, + ) as _i18.BackupFrequencyType); @override - set backupFrequencyType(_i24.BackupFrequencyType? backupFrequencyType) => + set backupFrequencyType(_i18.BackupFrequencyType? backupFrequencyType) => super.noSuchMethod( Invocation.setter( #backupFrequencyType, @@ -1048,61 +701,61 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs { returnValue: false, ) as bool); @override - _i14.Future init() => (super.noSuchMethod( + _i11.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( + _i11.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( Invocation.method( #incrementCurrentNotificationIndex, [], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future isExternalCallsSet() => (super.noSuchMethod( + _i11.Future isExternalCallsSet() => (super.noSuchMethod( Invocation.method( #isExternalCallsSet, [], ), - returnValue: _i14.Future.value(false), - ) as _i14.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i14.Future saveUserID(String? userId) => (super.noSuchMethod( + _i11.Future saveUserID(String? userId) => (super.noSuchMethod( Invocation.method( #saveUserID, [userId], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( + _i11.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( Invocation.method( #saveSignupEpoch, [signupEpoch], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i25.AmountUnit amountUnit(_i19.Coin? coin) => (super.noSuchMethod( + _i19.AmountUnit amountUnit(_i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #amountUnit, [coin], ), - returnValue: _i25.AmountUnit.normal, - ) as _i25.AmountUnit); + returnValue: _i19.AmountUnit.normal, + ) as _i19.AmountUnit); @override void updateAmountUnit({ - required _i19.Coin? coin, - required _i25.AmountUnit? amountUnit, + required _i20.Coin? coin, + required _i19.AmountUnit? amountUnit, }) => super.noSuchMethod( Invocation.method( @@ -1116,7 +769,7 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs { returnValueForMissingStub: null, ); @override - int maxDecimals(_i19.Coin? coin) => (super.noSuchMethod( + int maxDecimals(_i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #maxDecimals, [coin], @@ -1125,7 +778,7 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs { ) as int); @override void updateMaxDecimals({ - required _i19.Coin? coin, + required _i20.Coin? coin, required int? maxDecimals, }) => super.noSuchMethod( @@ -1140,23 +793,23 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs { returnValueForMissingStub: null, ); @override - _i9.FusionInfo getFusionServerInfo(_i19.Coin? coin) => (super.noSuchMethod( + _i6.FusionInfo getFusionServerInfo(_i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getFusionServerInfo, [coin], ), - returnValue: _FakeFusionInfo_6( + returnValue: _FakeFusionInfo_3( this, Invocation.method( #getFusionServerInfo, [coin], ), ), - ) as _i9.FusionInfo); + ) as _i6.FusionInfo); @override void setFusionServerInfo( - _i19.Coin? coin, - _i9.FusionInfo? fusionServerInfo, + _i20.Coin? coin, + _i6.FusionInfo? fusionServerInfo, ) => super.noSuchMethod( Invocation.method( @@ -1169,7 +822,7 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs { returnValueForMissingStub: null, ); @override - void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1177,7 +830,7 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs { returnValueForMissingStub: null, ); @override - void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -1205,7 +858,7 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs { /// A class which mocks [PriceService]. /// /// See the documentation for Mockito's code generation for more information. -class MockPriceService extends _i1.Mock implements _i26.PriceService { +class MockPriceService extends _i1.Mock implements _i21.PriceService { MockPriceService() { _i1.throwOnMissingStub(this); } @@ -1231,7 +884,7 @@ class MockPriceService extends _i1.Mock implements _i26.PriceService { @override Duration get updateInterval => (super.noSuchMethod( Invocation.getter(#updateInterval), - returnValue: _FakeDuration_7( + returnValue: _FakeDuration_4( this, Invocation.getter(#updateInterval), ), @@ -1242,44 +895,44 @@ class MockPriceService extends _i1.Mock implements _i26.PriceService { returnValue: false, ) as bool); @override - _i10.Tuple2<_i27.Decimal, double> getPrice(_i19.Coin? coin) => + _i7.Tuple2<_i22.Decimal, double> getPrice(_i20.Coin? coin) => (super.noSuchMethod( Invocation.method( #getPrice, [coin], ), - returnValue: _FakeTuple2_8<_i27.Decimal, double>( + returnValue: _FakeTuple2_5<_i22.Decimal, double>( this, Invocation.method( #getPrice, [coin], ), ), - ) as _i10.Tuple2<_i27.Decimal, double>); + ) as _i7.Tuple2<_i22.Decimal, double>); @override - _i10.Tuple2<_i27.Decimal, double> getTokenPrice(String? contractAddress) => + _i7.Tuple2<_i22.Decimal, double> getTokenPrice(String? contractAddress) => (super.noSuchMethod( Invocation.method( #getTokenPrice, [contractAddress], ), - returnValue: _FakeTuple2_8<_i27.Decimal, double>( + returnValue: _FakeTuple2_5<_i22.Decimal, double>( this, Invocation.method( #getTokenPrice, [contractAddress], ), ), - ) as _i10.Tuple2<_i27.Decimal, double>); + ) as _i7.Tuple2<_i22.Decimal, double>); @override - _i14.Future updatePrice() => (super.noSuchMethod( + _i11.Future updatePrice() => (super.noSuchMethod( Invocation.method( #updatePrice, [], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override void cancel() => super.noSuchMethod( Invocation.method( @@ -1305,7 +958,7 @@ class MockPriceService extends _i1.Mock implements _i26.PriceService { returnValueForMissingStub: null, ); @override - void addListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1313,7 +966,7 @@ class MockPriceService extends _i1.Mock implements _i26.PriceService { returnValueForMissingStub: null, ); @override - void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -1333,21 +986,21 @@ class MockPriceService extends _i1.Mock implements _i26.PriceService { /// A class which mocks [ThemeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockThemeService extends _i1.Mock implements _i28.ThemeService { +class MockThemeService extends _i1.Mock implements _i23.ThemeService { MockThemeService() { _i1.throwOnMissingStub(this); } @override - _i11.HTTP get client => (super.noSuchMethod( + _i8.HTTP get client => (super.noSuchMethod( Invocation.getter(#client), - returnValue: _FakeHTTP_9( + returnValue: _FakeHTTP_6( this, Invocation.getter(#client), ), - ) as _i11.HTTP); + ) as _i8.HTTP); @override - set client(_i11.HTTP? _client) => super.noSuchMethod( + set client(_i8.HTTP? _client) => super.noSuchMethod( Invocation.setter( #client, _client, @@ -1363,10 +1016,10 @@ class MockThemeService extends _i1.Mock implements _i28.ThemeService { ), ) as _i3.MainDB); @override - List<_i29.StackTheme> get installedThemes => (super.noSuchMethod( + List<_i24.StackTheme> get installedThemes => (super.noSuchMethod( Invocation.getter(#installedThemes), - returnValue: <_i29.StackTheme>[], - ) as List<_i29.StackTheme>); + returnValue: <_i24.StackTheme>[], + ) as List<_i24.StackTheme>); @override void init(_i3.MainDB? db) => super.noSuchMethod( Invocation.method( @@ -1376,73 +1029,73 @@ class MockThemeService extends _i1.Mock implements _i28.ThemeService { returnValueForMissingStub: null, ); @override - _i14.Future install({required _i30.Uint8List? themeArchiveData}) => + _i11.Future install({required _i25.Uint8List? themeArchiveData}) => (super.noSuchMethod( Invocation.method( #install, [], {#themeArchiveData: themeArchiveData}, ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future remove({required String? themeId}) => (super.noSuchMethod( + _i11.Future remove({required String? themeId}) => (super.noSuchMethod( Invocation.method( #remove, [], {#themeId: themeId}, ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( + _i11.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( Invocation.method( #checkDefaultThemesOnStartup, [], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future verifyInstalled({required String? themeId}) => + _i11.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( Invocation.method( #verifyInstalled, [], {#themeId: themeId}, ), - returnValue: _i14.Future.value(false), - ) as _i14.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i14.Future> fetchThemes() => + _i11.Future> fetchThemes() => (super.noSuchMethod( Invocation.method( #fetchThemes, [], ), - returnValue: _i14.Future>.value( - <_i28.StackThemeMetaData>[]), - ) as _i14.Future>); + returnValue: _i11.Future>.value( + <_i23.StackThemeMetaData>[]), + ) as _i11.Future>); @override - _i14.Future<_i30.Uint8List> fetchTheme( - {required _i28.StackThemeMetaData? themeMetaData}) => + _i11.Future<_i25.Uint8List> fetchTheme( + {required _i23.StackThemeMetaData? themeMetaData}) => (super.noSuchMethod( Invocation.method( #fetchTheme, [], {#themeMetaData: themeMetaData}, ), - returnValue: _i14.Future<_i30.Uint8List>.value(_i30.Uint8List(0)), - ) as _i14.Future<_i30.Uint8List>); + returnValue: _i11.Future<_i25.Uint8List>.value(_i25.Uint8List(0)), + ) as _i11.Future<_i25.Uint8List>); @override - _i29.StackTheme? getTheme({required String? themeId}) => + _i24.StackTheme? getTheme({required String? themeId}) => (super.noSuchMethod(Invocation.method( #getTheme, [], {#themeId: themeId}, - )) as _i29.StackTheme?); + )) as _i24.StackTheme?); } /// A class which mocks [MainDB]. @@ -1454,151 +1107,151 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { } @override - _i12.Isar get isar => (super.noSuchMethod( + _i9.Isar get isar => (super.noSuchMethod( Invocation.getter(#isar), - returnValue: _FakeIsar_10( + returnValue: _FakeIsar_7( this, Invocation.getter(#isar), ), - ) as _i12.Isar); + ) as _i9.Isar); @override - _i14.Future initMainDB({_i12.Isar? mock}) => (super.noSuchMethod( + _i11.Future initMainDB({_i9.Isar? mock}) => (super.noSuchMethod( Invocation.method( #initMainDB, [], {#mock: mock}, ), - returnValue: _i14.Future.value(false), - ) as _i14.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i14.Future putWalletInfo(_i15.WalletInfo? walletInfo) => + _i11.Future putWalletInfo(_i12.WalletInfo? walletInfo) => (super.noSuchMethod( Invocation.method( #putWalletInfo, [walletInfo], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future updateWalletInfo(_i15.WalletInfo? walletInfo) => + _i11.Future updateWalletInfo(_i12.WalletInfo? walletInfo) => (super.noSuchMethod( Invocation.method( #updateWalletInfo, [walletInfo], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - List<_i31.ContactEntry> getContactEntries() => (super.noSuchMethod( + List<_i26.ContactEntry> getContactEntries() => (super.noSuchMethod( Invocation.method( #getContactEntries, [], ), - returnValue: <_i31.ContactEntry>[], - ) as List<_i31.ContactEntry>); + returnValue: <_i26.ContactEntry>[], + ) as List<_i26.ContactEntry>); @override - _i14.Future deleteContactEntry({required String? id}) => + _i11.Future deleteContactEntry({required String? id}) => (super.noSuchMethod( Invocation.method( #deleteContactEntry, [], {#id: id}, ), - returnValue: _i14.Future.value(false), - ) as _i14.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i14.Future isContactEntryExists({required String? id}) => + _i11.Future isContactEntryExists({required String? id}) => (super.noSuchMethod( Invocation.method( #isContactEntryExists, [], {#id: id}, ), - returnValue: _i14.Future.value(false), - ) as _i14.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i31.ContactEntry? getContactEntry({required String? id}) => + _i26.ContactEntry? getContactEntry({required String? id}) => (super.noSuchMethod(Invocation.method( #getContactEntry, [], {#id: id}, - )) as _i31.ContactEntry?); + )) as _i26.ContactEntry?); @override - _i14.Future putContactEntry( - {required _i31.ContactEntry? contactEntry}) => + _i11.Future putContactEntry( + {required _i26.ContactEntry? contactEntry}) => (super.noSuchMethod( Invocation.method( #putContactEntry, [], {#contactEntry: contactEntry}, ), - returnValue: _i14.Future.value(false), - ) as _i14.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i32.TransactionBlockExplorer? getTransactionBlockExplorer( - {required _i19.Coin? coin}) => + _i27.TransactionBlockExplorer? getTransactionBlockExplorer( + {required _i20.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getTransactionBlockExplorer, [], {#coin: coin}, - )) as _i32.TransactionBlockExplorer?); + )) as _i27.TransactionBlockExplorer?); @override - _i14.Future putTransactionBlockExplorer( - _i32.TransactionBlockExplorer? explorer) => + _i11.Future putTransactionBlockExplorer( + _i27.TransactionBlockExplorer? explorer) => (super.noSuchMethod( Invocation.method( #putTransactionBlockExplorer, [explorer], ), - returnValue: _i14.Future.value(0), - ) as _i14.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i12.QueryBuilder<_i20.Address, _i20.Address, _i12.QAfterWhereClause> + _i9.QueryBuilder<_i28.Address, _i28.Address, _i9.QAfterWhereClause> getAddresses(String? walletId) => (super.noSuchMethod( Invocation.method( #getAddresses, [walletId], ), - returnValue: _FakeQueryBuilder_11<_i20.Address, _i20.Address, - _i12.QAfterWhereClause>( + returnValue: _FakeQueryBuilder_8<_i28.Address, _i28.Address, + _i9.QAfterWhereClause>( this, Invocation.method( #getAddresses, [walletId], ), ), - ) as _i12.QueryBuilder<_i20.Address, _i20.Address, - _i12.QAfterWhereClause>); + ) as _i9 + .QueryBuilder<_i28.Address, _i28.Address, _i9.QAfterWhereClause>); @override - _i14.Future putAddress(_i20.Address? address) => (super.noSuchMethod( + _i11.Future putAddress(_i28.Address? address) => (super.noSuchMethod( Invocation.method( #putAddress, [address], ), - returnValue: _i14.Future.value(0), - ) as _i14.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i14.Future> putAddresses(List<_i20.Address>? addresses) => + _i11.Future> putAddresses(List<_i28.Address>? addresses) => (super.noSuchMethod( Invocation.method( #putAddresses, [addresses], ), - returnValue: _i14.Future>.value([]), - ) as _i14.Future>); + returnValue: _i11.Future>.value([]), + ) as _i11.Future>); @override - _i14.Future> updateOrPutAddresses(List<_i20.Address>? addresses) => + _i11.Future> updateOrPutAddresses(List<_i28.Address>? addresses) => (super.noSuchMethod( Invocation.method( #updateOrPutAddresses, [addresses], ), - returnValue: _i14.Future>.value([]), - ) as _i14.Future>); + returnValue: _i11.Future>.value([]), + ) as _i11.Future>); @override - _i14.Future<_i20.Address?> getAddress( + _i11.Future<_i28.Address?> getAddress( String? walletId, String? address, ) => @@ -1610,12 +1263,12 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { address, ], ), - returnValue: _i14.Future<_i20.Address?>.value(), - ) as _i14.Future<_i20.Address?>); + returnValue: _i11.Future<_i28.Address?>.value(), + ) as _i11.Future<_i28.Address?>); @override - _i14.Future updateAddress( - _i20.Address? oldAddress, - _i20.Address? newAddress, + _i11.Future updateAddress( + _i28.Address? oldAddress, + _i28.Address? newAddress, ) => (super.noSuchMethod( Invocation.method( @@ -1625,46 +1278,46 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { newAddress, ], ), - returnValue: _i14.Future.value(0), - ) as _i14.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i12.QueryBuilder<_i20.Transaction, _i20.Transaction, _i12.QAfterWhereClause> + _i9.QueryBuilder<_i28.Transaction, _i28.Transaction, _i9.QAfterWhereClause> getTransactions(String? walletId) => (super.noSuchMethod( Invocation.method( #getTransactions, [walletId], ), - returnValue: _FakeQueryBuilder_11<_i20.Transaction, - _i20.Transaction, _i12.QAfterWhereClause>( + returnValue: _FakeQueryBuilder_8<_i28.Transaction, _i28.Transaction, + _i9.QAfterWhereClause>( this, Invocation.method( #getTransactions, [walletId], ), ), - ) as _i12.QueryBuilder<_i20.Transaction, _i20.Transaction, - _i12.QAfterWhereClause>); + ) as _i9.QueryBuilder<_i28.Transaction, _i28.Transaction, + _i9.QAfterWhereClause>); @override - _i14.Future putTransaction(_i20.Transaction? transaction) => + _i11.Future putTransaction(_i28.Transaction? transaction) => (super.noSuchMethod( Invocation.method( #putTransaction, [transaction], ), - returnValue: _i14.Future.value(0), - ) as _i14.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i14.Future> putTransactions( - List<_i20.Transaction>? transactions) => + _i11.Future> putTransactions( + List<_i28.Transaction>? transactions) => (super.noSuchMethod( Invocation.method( #putTransactions, [transactions], ), - returnValue: _i14.Future>.value([]), - ) as _i14.Future>); + returnValue: _i11.Future>.value([]), + ) as _i11.Future>); @override - _i14.Future<_i20.Transaction?> getTransaction( + _i11.Future<_i28.Transaction?> getTransaction( String? walletId, String? txid, ) => @@ -1676,10 +1329,10 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { txid, ], ), - returnValue: _i14.Future<_i20.Transaction?>.value(), - ) as _i14.Future<_i20.Transaction?>); + returnValue: _i11.Future<_i28.Transaction?>.value(), + ) as _i11.Future<_i28.Transaction?>); @override - _i14.Stream<_i20.Transaction?> watchTransaction({ + _i11.Stream<_i28.Transaction?> watchTransaction({ required int? id, bool? fireImmediately = false, }) => @@ -1692,10 +1345,10 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { #fireImmediately: fireImmediately, }, ), - returnValue: _i14.Stream<_i20.Transaction?>.empty(), - ) as _i14.Stream<_i20.Transaction?>); + returnValue: _i11.Stream<_i28.Transaction?>.empty(), + ) as _i11.Stream<_i28.Transaction?>); @override - _i12.QueryBuilder<_i20.UTXO, _i20.UTXO, _i12.QAfterWhereClause> getUTXOs( + _i9.QueryBuilder<_i28.UTXO, _i28.UTXO, _i9.QAfterWhereClause> getUTXOs( String? walletId) => (super.noSuchMethod( Invocation.method( @@ -1703,16 +1356,16 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { [walletId], ), returnValue: - _FakeQueryBuilder_11<_i20.UTXO, _i20.UTXO, _i12.QAfterWhereClause>( + _FakeQueryBuilder_8<_i28.UTXO, _i28.UTXO, _i9.QAfterWhereClause>( this, Invocation.method( #getUTXOs, [walletId], ), ), - ) as _i12.QueryBuilder<_i20.UTXO, _i20.UTXO, _i12.QAfterWhereClause>); + ) as _i9.QueryBuilder<_i28.UTXO, _i28.UTXO, _i9.QAfterWhereClause>); @override - _i12.QueryBuilder<_i20.UTXO, _i20.UTXO, _i12.QAfterFilterCondition> + _i9.QueryBuilder<_i28.UTXO, _i28.UTXO, _i9.QAfterFilterCondition> getUTXOsByAddress( String? walletId, String? address, @@ -1725,8 +1378,8 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { address, ], ), - returnValue: _FakeQueryBuilder_11<_i20.UTXO, _i20.UTXO, - _i12.QAfterFilterCondition>( + returnValue: _FakeQueryBuilder_8<_i28.UTXO, _i28.UTXO, + _i9.QAfterFilterCondition>( this, Invocation.method( #getUTXOsByAddress, @@ -1736,30 +1389,30 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { ], ), ), - ) as _i12 - .QueryBuilder<_i20.UTXO, _i20.UTXO, _i12.QAfterFilterCondition>); + ) as _i9 + .QueryBuilder<_i28.UTXO, _i28.UTXO, _i9.QAfterFilterCondition>); @override - _i14.Future putUTXO(_i20.UTXO? utxo) => (super.noSuchMethod( + _i11.Future putUTXO(_i28.UTXO? utxo) => (super.noSuchMethod( Invocation.method( #putUTXO, [utxo], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future putUTXOs(List<_i20.UTXO>? utxos) => (super.noSuchMethod( + _i11.Future putUTXOs(List<_i28.UTXO>? utxos) => (super.noSuchMethod( Invocation.method( #putUTXOs, [utxos], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future updateUTXOs( + _i11.Future updateUTXOs( String? walletId, - List<_i20.UTXO>? utxos, + List<_i28.UTXO>? utxos, ) => (super.noSuchMethod( Invocation.method( @@ -1769,10 +1422,10 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { utxos, ], ), - returnValue: _i14.Future.value(false), - ) as _i14.Future); + returnValue: _i11.Future.value(false), + ) as _i11.Future); @override - _i14.Stream<_i20.UTXO?> watchUTXO({ + _i11.Stream<_i28.UTXO?> watchUTXO({ required int? id, bool? fireImmediately = false, }) => @@ -1785,50 +1438,50 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { #fireImmediately: fireImmediately, }, ), - returnValue: _i14.Stream<_i20.UTXO?>.empty(), - ) as _i14.Stream<_i20.UTXO?>); + returnValue: _i11.Stream<_i28.UTXO?>.empty(), + ) as _i11.Stream<_i28.UTXO?>); @override - _i12.QueryBuilder<_i20.TransactionNote, _i20.TransactionNote, - _i12.QAfterWhereClause> getTransactionNotes( + _i9.QueryBuilder<_i28.TransactionNote, _i28.TransactionNote, + _i9.QAfterWhereClause> getTransactionNotes( String? walletId) => (super.noSuchMethod( Invocation.method( #getTransactionNotes, [walletId], ), - returnValue: _FakeQueryBuilder_11<_i20.TransactionNote, - _i20.TransactionNote, _i12.QAfterWhereClause>( + returnValue: _FakeQueryBuilder_8<_i28.TransactionNote, + _i28.TransactionNote, _i9.QAfterWhereClause>( this, Invocation.method( #getTransactionNotes, [walletId], ), ), - ) as _i12.QueryBuilder<_i20.TransactionNote, _i20.TransactionNote, - _i12.QAfterWhereClause>); + ) as _i9.QueryBuilder<_i28.TransactionNote, _i28.TransactionNote, + _i9.QAfterWhereClause>); @override - _i14.Future putTransactionNote(_i20.TransactionNote? transactionNote) => + _i11.Future putTransactionNote(_i28.TransactionNote? transactionNote) => (super.noSuchMethod( Invocation.method( #putTransactionNote, [transactionNote], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future putTransactionNotes( - List<_i20.TransactionNote>? transactionNotes) => + _i11.Future putTransactionNotes( + List<_i28.TransactionNote>? transactionNotes) => (super.noSuchMethod( Invocation.method( #putTransactionNotes, [transactionNotes], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future<_i20.TransactionNote?> getTransactionNote( + _i11.Future<_i28.TransactionNote?> getTransactionNote( String? walletId, String? txid, ) => @@ -1840,10 +1493,10 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { txid, ], ), - returnValue: _i14.Future<_i20.TransactionNote?>.value(), - ) as _i14.Future<_i20.TransactionNote?>); + returnValue: _i11.Future<_i28.TransactionNote?>.value(), + ) as _i11.Future<_i28.TransactionNote?>); @override - _i14.Stream<_i20.TransactionNote?> watchTransactionNote({ + _i11.Stream<_i28.TransactionNote?> watchTransactionNote({ required int? id, bool? fireImmediately = false, }) => @@ -1856,38 +1509,36 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { #fireImmediately: fireImmediately, }, ), - returnValue: _i14.Stream<_i20.TransactionNote?>.empty(), - ) as _i14.Stream<_i20.TransactionNote?>); + returnValue: _i11.Stream<_i28.TransactionNote?>.empty(), + ) as _i11.Stream<_i28.TransactionNote?>); @override - _i12.QueryBuilder<_i20.AddressLabel, _i20.AddressLabel, - _i12.QAfterWhereClause> getAddressLabels( - String? walletId) => - (super.noSuchMethod( - Invocation.method( - #getAddressLabels, - [walletId], - ), - returnValue: _FakeQueryBuilder_11<_i20.AddressLabel, _i20.AddressLabel, - _i12.QAfterWhereClause>( - this, - Invocation.method( - #getAddressLabels, - [walletId], - ), - ), - ) as _i12.QueryBuilder<_i20.AddressLabel, _i20.AddressLabel, - _i12.QAfterWhereClause>); + _i9.QueryBuilder<_i28.AddressLabel, _i28.AddressLabel, _i9.QAfterWhereClause> + getAddressLabels(String? walletId) => (super.noSuchMethod( + Invocation.method( + #getAddressLabels, + [walletId], + ), + returnValue: _FakeQueryBuilder_8<_i28.AddressLabel, + _i28.AddressLabel, _i9.QAfterWhereClause>( + this, + Invocation.method( + #getAddressLabels, + [walletId], + ), + ), + ) as _i9.QueryBuilder<_i28.AddressLabel, _i28.AddressLabel, + _i9.QAfterWhereClause>); @override - _i14.Future putAddressLabel(_i20.AddressLabel? addressLabel) => + _i11.Future putAddressLabel(_i28.AddressLabel? addressLabel) => (super.noSuchMethod( Invocation.method( #putAddressLabel, [addressLabel], ), - returnValue: _i14.Future.value(0), - ) as _i14.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - int putAddressLabelSync(_i20.AddressLabel? addressLabel) => + int putAddressLabelSync(_i28.AddressLabel? addressLabel) => (super.noSuchMethod( Invocation.method( #putAddressLabelSync, @@ -1896,17 +1547,17 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { returnValue: 0, ) as int); @override - _i14.Future putAddressLabels(List<_i20.AddressLabel>? addressLabels) => + _i11.Future putAddressLabels(List<_i28.AddressLabel>? addressLabels) => (super.noSuchMethod( Invocation.method( #putAddressLabels, [addressLabels], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future<_i20.AddressLabel?> getAddressLabel( + _i11.Future<_i28.AddressLabel?> getAddressLabel( String? walletId, String? addressString, ) => @@ -1918,10 +1569,10 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { addressString, ], ), - returnValue: _i14.Future<_i20.AddressLabel?>.value(), - ) as _i14.Future<_i20.AddressLabel?>); + returnValue: _i11.Future<_i28.AddressLabel?>.value(), + ) as _i11.Future<_i28.AddressLabel?>); @override - _i20.AddressLabel? getAddressLabelSync( + _i28.AddressLabel? getAddressLabelSync( String? walletId, String? addressString, ) => @@ -1931,9 +1582,9 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { walletId, addressString, ], - )) as _i20.AddressLabel?); + )) as _i28.AddressLabel?); @override - _i14.Stream<_i20.AddressLabel?> watchAddressLabel({ + _i11.Stream<_i28.AddressLabel?> watchAddressLabel({ required int? id, bool? fireImmediately = false, }) => @@ -1946,50 +1597,50 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { #fireImmediately: fireImmediately, }, ), - returnValue: _i14.Stream<_i20.AddressLabel?>.empty(), - ) as _i14.Stream<_i20.AddressLabel?>); + returnValue: _i11.Stream<_i28.AddressLabel?>.empty(), + ) as _i11.Stream<_i28.AddressLabel?>); @override - _i14.Future updateAddressLabel(_i20.AddressLabel? addressLabel) => + _i11.Future updateAddressLabel(_i28.AddressLabel? addressLabel) => (super.noSuchMethod( Invocation.method( #updateAddressLabel, [addressLabel], ), - returnValue: _i14.Future.value(0), - ) as _i14.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i14.Future deleteWalletBlockchainData(String? walletId) => + _i11.Future deleteWalletBlockchainData(String? walletId) => (super.noSuchMethod( Invocation.method( #deleteWalletBlockchainData, [walletId], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future deleteAddressLabels(String? walletId) => + _i11.Future deleteAddressLabels(String? walletId) => (super.noSuchMethod( Invocation.method( #deleteAddressLabels, [walletId], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future deleteTransactionNotes(String? walletId) => + _i11.Future deleteTransactionNotes(String? walletId) => (super.noSuchMethod( Invocation.method( #deleteTransactionNotes, [walletId], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future addNewTransactionData( - List<_i10.Tuple2<_i20.Transaction, _i20.Address?>>? transactionsData, + _i11.Future addNewTransactionData( + List<_i7.Tuple2<_i28.Transaction, _i28.Address?>>? transactionsData, String? walletId, ) => (super.noSuchMethod( @@ -2000,86 +1651,86 @@ class MockMainDB extends _i1.Mock implements _i3.MainDB { walletId, ], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future> updateOrPutTransactionV2s( - List<_i33.TransactionV2>? transactions) => + _i11.Future> updateOrPutTransactionV2s( + List<_i29.TransactionV2>? transactions) => (super.noSuchMethod( Invocation.method( #updateOrPutTransactionV2s, [transactions], ), - returnValue: _i14.Future>.value([]), - ) as _i14.Future>); + returnValue: _i11.Future>.value([]), + ) as _i11.Future>); @override - _i12.QueryBuilder<_i20.EthContract, _i20.EthContract, _i12.QWhere> + _i9.QueryBuilder<_i28.EthContract, _i28.EthContract, _i9.QWhere> getEthContracts() => (super.noSuchMethod( Invocation.method( #getEthContracts, [], ), - returnValue: _FakeQueryBuilder_11<_i20.EthContract, - _i20.EthContract, _i12.QWhere>( + returnValue: _FakeQueryBuilder_8<_i28.EthContract, _i28.EthContract, + _i9.QWhere>( this, Invocation.method( #getEthContracts, [], ), ), - ) as _i12 - .QueryBuilder<_i20.EthContract, _i20.EthContract, _i12.QWhere>); + ) as _i9 + .QueryBuilder<_i28.EthContract, _i28.EthContract, _i9.QWhere>); @override - _i14.Future<_i20.EthContract?> getEthContract(String? contractAddress) => + _i11.Future<_i28.EthContract?> getEthContract(String? contractAddress) => (super.noSuchMethod( Invocation.method( #getEthContract, [contractAddress], ), - returnValue: _i14.Future<_i20.EthContract?>.value(), - ) as _i14.Future<_i20.EthContract?>); + returnValue: _i11.Future<_i28.EthContract?>.value(), + ) as _i11.Future<_i28.EthContract?>); @override - _i20.EthContract? getEthContractSync(String? contractAddress) => + _i28.EthContract? getEthContractSync(String? contractAddress) => (super.noSuchMethod(Invocation.method( #getEthContractSync, [contractAddress], - )) as _i20.EthContract?); + )) as _i28.EthContract?); @override - _i14.Future putEthContract(_i20.EthContract? contract) => + _i11.Future putEthContract(_i28.EthContract? contract) => (super.noSuchMethod( Invocation.method( #putEthContract, [contract], ), - returnValue: _i14.Future.value(0), - ) as _i14.Future); + returnValue: _i11.Future.value(0), + ) as _i11.Future); @override - _i14.Future putEthContracts(List<_i20.EthContract>? contracts) => + _i11.Future putEthContracts(List<_i28.EthContract>? contracts) => (super.noSuchMethod( Invocation.method( #putEthContracts, [contracts], ), - returnValue: _i14.Future.value(), - returnValueForMissingStub: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); @override - _i14.Future getHighestUsedMintIndex({required String? walletId}) => + _i11.Future getHighestUsedMintIndex({required String? walletId}) => (super.noSuchMethod( Invocation.method( #getHighestUsedMintIndex, [], {#walletId: walletId}, ), - returnValue: _i14.Future.value(), - ) as _i14.Future); + returnValue: _i11.Future.value(), + ) as _i11.Future); } /// A class which mocks [IThemeAssets]. /// /// See the documentation for Mockito's code generation for more information. -class MockIThemeAssets extends _i1.Mock implements _i29.IThemeAssets { +class MockIThemeAssets extends _i1.Mock implements _i24.IThemeAssets { MockIThemeAssets() { _i1.throwOnMissingStub(this); } 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 8821724ec..f93a56568 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 @@ -1,5 +1,4 @@ import 'package:mockito/annotations.dart'; -import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/wallets.dart'; import 'package:stackwallet/services/wallets_service.dart'; @@ -9,7 +8,6 @@ import 'package:stackwallet/services/wallets_service.dart'; WalletsService, ], customMocks: [ MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), // MockSpec(returnNullOnMissingStub: true), ]) void main() { 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 4ac80bc97..36f9688f8 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,27 +3,22 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i11; -import 'dart:ui' as _i16; +import 'dart:async' as _i8; +import 'dart:ui' as _i13; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/db/isar/main_db.dart' as _i3; -import 'package:stackwallet/models/balance.dart' as _i8; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i19; -import 'package:stackwallet/models/node_model.dart' as _i17; -import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i7; -import 'package:stackwallet/services/coins/coin_service.dart' as _i18; +import 'package:stackwallet/models/node_model.dart' as _i14; import 'package:stackwallet/services/node_service.dart' as _i2; -import 'package:stackwallet/services/wallets.dart' as _i10; -import 'package:stackwallet/services/wallets_service.dart' as _i14; -import 'package:stackwallet/utilities/amount/amount.dart' as _i9; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i15; +import 'package:stackwallet/services/wallets.dart' as _i7; +import 'package:stackwallet/services/wallets_service.dart' as _i11; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i12; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i6; -import 'package:stackwallet/utilities/prefs.dart' as _i13; +import 'package:stackwallet/utilities/prefs.dart' as _i10; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i4; -import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i12; +import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i9; import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: type=lint @@ -79,40 +74,10 @@ class _FakeSecureStorageInterface_3 extends _i1.SmartFake ); } -class _FakeFeeObject_4 extends _i1.SmartFake implements _i7.FeeObject { - _FakeFeeObject_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeBalance_5 extends _i1.SmartFake implements _i8.Balance { - _FakeBalance_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAmount_6 extends _i1.SmartFake implements _i9.Amount { - _FakeAmount_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i10.Wallets { +class MockWallets extends _i1.Mock implements _i7.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -178,8 +143,8 @@ class MockWallets extends _i1.Mock implements _i10.Wallets { returnValueForMissingStub: null, ); @override - _i11.Future deleteWallet( - _i12.WalletInfo? info, + _i8.Future deleteWallet( + _i9.WalletInfo? info, _i6.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( @@ -190,12 +155,12 @@ class MockWallets extends _i1.Mock implements _i10.Wallets { secureStorage, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future load( - _i13.Prefs? prefs, + _i8.Future load( + _i10.Prefs? prefs, _i3.MainDB? mainDB, ) => (super.noSuchMethod( @@ -206,12 +171,12 @@ class MockWallets extends _i1.Mock implements _i10.Wallets { mainDB, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future loadAfterStackRestore( - _i13.Prefs? prefs, + _i8.Future loadAfterStackRestore( + _i10.Prefs? prefs, List<_i5.Wallet<_i4.CryptoCurrency>>? wallets, ) => (super.noSuchMethod( @@ -222,33 +187,33 @@ class MockWallets extends _i1.Mock implements _i10.Wallets { wallets, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i14.WalletsService { +class MockWalletsService extends _i1.Mock implements _i11.WalletsService { MockWalletsService() { _i1.throwOnMissingStub(this); } @override - _i11.Future> get walletNames => + _i8.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i11.Future>.value( - {}), - ) as _i11.Future>); + returnValue: _i8.Future>.value( + {}), + ) as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i11.Future renameWallet({ + _i8.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -263,21 +228,21 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i11.Future.value(false), - ) as _i11.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 - _i11.Future addExistingStackWallet({ + _i8.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i15.Coin? coin, + required _i12.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -291,13 +256,13 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future addNewWallet({ + _i8.Future addNewWallet({ required String? name, - required _i15.Coin? coin, + required _i12.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -310,46 +275,46 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i8.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i11.Future>.value([]), - ) as _i11.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i11.Future saveFavoriteWalletIds(List? walletIds) => + _i8.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i8.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i8.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future moveFavorite({ + _i8.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -362,48 +327,48 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i8.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i11.Future.value(false), - ) as _i11.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i11.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i8.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future isMnemonicVerified({required String? walletId}) => + _i8.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i11.Future.value(false), - ) as _i11.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i11.Future setMnemonicVerified({required String? walletId}) => + _i8.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future deleteWallet( + _i8.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -415,20 +380,20 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i11.Future.value(0), - ) as _i11.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i11.Future refreshWallets(bool? shouldNotifyListeners) => + _i8.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i13.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -436,7 +401,7 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -474,33 +439,33 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { ), ) as _i6.SecureStorageInterface); @override - List<_i17.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i14.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i17.NodeModel>[], - ) as List<_i17.NodeModel>); + returnValue: <_i14.NodeModel>[], + ) as List<_i14.NodeModel>); @override - List<_i17.NodeModel> get nodes => (super.noSuchMethod( + List<_i14.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i17.NodeModel>[], - ) as List<_i17.NodeModel>); + returnValue: <_i14.NodeModel>[], + ) as List<_i14.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i11.Future updateDefaults() => (super.noSuchMethod( + _i8.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future setPrimaryNodeFor({ - required _i15.Coin? coin, - required _i17.NodeModel? node, + _i8.Future setPrimaryNodeFor({ + required _i12.Coin? coin, + required _i14.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -513,44 +478,44 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i17.NodeModel? getPrimaryNodeFor({required _i15.Coin? coin}) => + _i14.NodeModel? getPrimaryNodeFor({required _i12.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i17.NodeModel?); + )) as _i14.NodeModel?); @override - List<_i17.NodeModel> getNodesFor(_i15.Coin? coin) => (super.noSuchMethod( + List<_i14.NodeModel> getNodesFor(_i12.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i17.NodeModel>[], - ) as List<_i17.NodeModel>); + returnValue: <_i14.NodeModel>[], + ) as List<_i14.NodeModel>); @override - _i17.NodeModel? getNodeById({required String? id}) => + _i14.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i17.NodeModel?); + )) as _i14.NodeModel?); @override - List<_i17.NodeModel> failoverNodesFor({required _i15.Coin? coin}) => + List<_i14.NodeModel> failoverNodesFor({required _i12.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i17.NodeModel>[], - ) as List<_i17.NodeModel>); + returnValue: <_i14.NodeModel>[], + ) as List<_i14.NodeModel>); @override - _i11.Future add( - _i17.NodeModel? node, + _i8.Future add( + _i14.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -563,11 +528,11 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future delete( + _i8.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -579,11 +544,11 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future setEnabledState( + _i8.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -597,12 +562,12 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future edit( - _i17.NodeModel? editedNode, + _i8.Future edit( + _i14.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -615,20 +580,20 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i11.Future updateCommunityNodes() => (super.noSuchMethod( + _i8.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i13.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -636,7 +601,7 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i13.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -660,312 +625,3 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { returnValueForMissingStub: null, ); } - -/// A class which mocks [CoinServiceAPI]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i18.CoinServiceAPI { - @override - set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => - super.noSuchMethod( - Invocation.setter( - #onIsActiveWalletChanged, - _onIsActiveWalletChanged, - ), - returnValueForMissingStub: null, - ); - @override - _i15.Coin get coin => (super.noSuchMethod( - Invocation.getter(#coin), - returnValue: _i15.Coin.bitcoin, - ) as _i15.Coin); - @override - bool get isRefreshing => (super.noSuchMethod( - Invocation.getter(#isRefreshing), - returnValue: false, - ) as bool); - @override - bool get shouldAutoSync => (super.noSuchMethod( - Invocation.getter(#shouldAutoSync), - returnValue: false, - ) as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( - Invocation.setter( - #shouldAutoSync, - shouldAutoSync, - ), - returnValueForMissingStub: null, - ); - @override - bool get isFavorite => (super.noSuchMethod( - Invocation.getter(#isFavorite), - returnValue: false, - ) as bool); - @override - set isFavorite(bool? markFavorite) => super.noSuchMethod( - Invocation.setter( - #isFavorite, - markFavorite, - ), - returnValueForMissingStub: null, - ); - @override - _i11.Future<_i7.FeeObject> get fees => (super.noSuchMethod( - Invocation.getter(#fees), - returnValue: _i11.Future<_i7.FeeObject>.value(_FakeFeeObject_4( - this, - Invocation.getter(#fees), - )), - ) as _i11.Future<_i7.FeeObject>); - @override - _i11.Future get maxFee => (super.noSuchMethod( - Invocation.getter(#maxFee), - returnValue: _i11.Future.value(0), - ) as _i11.Future); - @override - _i11.Future get currentReceivingAddress => (super.noSuchMethod( - Invocation.getter(#currentReceivingAddress), - returnValue: _i11.Future.value(''), - ) as _i11.Future); - @override - _i8.Balance get balance => (super.noSuchMethod( - Invocation.getter(#balance), - returnValue: _FakeBalance_5( - this, - Invocation.getter(#balance), - ), - ) as _i8.Balance); - @override - _i11.Future> get transactions => (super.noSuchMethod( - Invocation.getter(#transactions), - returnValue: - _i11.Future>.value(<_i19.Transaction>[]), - ) as _i11.Future>); - @override - _i11.Future> get utxos => (super.noSuchMethod( - Invocation.getter(#utxos), - returnValue: _i11.Future>.value(<_i19.UTXO>[]), - ) as _i11.Future>); - @override - set walletName(String? newName) => super.noSuchMethod( - Invocation.setter( - #walletName, - newName, - ), - returnValueForMissingStub: null, - ); - @override - String get walletName => (super.noSuchMethod( - Invocation.getter(#walletName), - returnValue: '', - ) as String); - @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: '', - ) as String); - @override - _i11.Future> get mnemonic => (super.noSuchMethod( - Invocation.getter(#mnemonic), - returnValue: _i11.Future>.value([]), - ) as _i11.Future>); - @override - _i11.Future get mnemonicString => (super.noSuchMethod( - Invocation.getter(#mnemonicString), - returnValue: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future get mnemonicPassphrase => (super.noSuchMethod( - Invocation.getter(#mnemonicPassphrase), - returnValue: _i11.Future.value(), - ) as _i11.Future); - @override - bool get hasCalledExit => (super.noSuchMethod( - Invocation.getter(#hasCalledExit), - returnValue: false, - ) as bool); - @override - bool get isConnected => (super.noSuchMethod( - Invocation.getter(#isConnected), - returnValue: false, - ) as bool); - @override - int get storedChainHeight => (super.noSuchMethod( - Invocation.getter(#storedChainHeight), - returnValue: 0, - ) as int); - @override - _i11.Future> prepareSend({ - required String? address, - required _i9.Amount? amount, - Map? args, - }) => - (super.noSuchMethod( - Invocation.method( - #prepareSend, - [], - { - #address: address, - #amount: amount, - #args: args, - }, - ), - returnValue: - _i11.Future>.value({}), - ) as _i11.Future>); - @override - _i11.Future confirmSend({required Map? txData}) => - (super.noSuchMethod( - Invocation.method( - #confirmSend, - [], - {#txData: txData}, - ), - returnValue: _i11.Future.value(''), - ) as _i11.Future); - @override - _i11.Future refresh() => (super.noSuchMethod( - Invocation.method( - #refresh, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( - Invocation.method( - #updateNode, - [shouldRefresh], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - bool validateAddress(String? address) => (super.noSuchMethod( - Invocation.method( - #validateAddress, - [address], - ), - returnValue: false, - ) as bool); - @override - _i11.Future testNetworkConnection() => (super.noSuchMethod( - Invocation.method( - #testNetworkConnection, - [], - ), - returnValue: _i11.Future.value(false), - ) as _i11.Future); - @override - _i11.Future recoverFromMnemonic({ - required String? mnemonic, - String? mnemonicPassphrase, - required int? maxUnusedAddressGap, - required int? maxNumberOfIndexesToCheck, - required int? height, - }) => - (super.noSuchMethod( - Invocation.method( - #recoverFromMnemonic, - [], - { - #mnemonic: mnemonic, - #mnemonicPassphrase: mnemonicPassphrase, - #maxUnusedAddressGap: maxUnusedAddressGap, - #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height, - }, - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future initializeNew( - ({String mnemonicPassphrase, int wordCount})? data) => - (super.noSuchMethod( - Invocation.method( - #initializeNew, - [data], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future initializeExisting() => (super.noSuchMethod( - Invocation.method( - #initializeExisting, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future exit() => (super.noSuchMethod( - Invocation.method( - #exit, - [], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future fullRescan( - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - ) => - (super.noSuchMethod( - Invocation.method( - #fullRescan, - [ - maxUnusedAddressGap, - maxNumberOfIndexesToCheck, - ], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.Future); - @override - _i11.Future<_i9.Amount> estimateFeeFor( - _i9.Amount? amount, - int? feeRate, - ) => - (super.noSuchMethod( - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - returnValue: _i11.Future<_i9.Amount>.value(_FakeAmount_6( - this, - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - )), - ) as _i11.Future<_i9.Amount>); - @override - _i11.Future generateNewAddress() => (super.noSuchMethod( - Invocation.method( - #generateNewAddress, - [], - ), - returnValue: _i11.Future.value(false), - ) as _i11.Future); - @override - _i11.Future updateSentCachedTxData(Map? txData) => - (super.noSuchMethod( - Invocation.method( - #updateSentCachedTxData, - [txData], - ), - returnValue: _i11.Future.value(), - returnValueForMissingStub: _i11.Future.value(), - ) as _i11.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 01f77a36a..7038a5f6e 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 @@ -1,5 +1,4 @@ import 'package:mockito/annotations.dart'; -import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/node_service.dart'; import 'package:stackwallet/services/wallets.dart'; import 'package:stackwallet/services/wallets_service.dart'; @@ -11,7 +10,6 @@ import 'package:stackwallet/themes/theme_service.dart'; ThemeService, ], customMocks: [ MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), // MockSpec(returnNullOnMissingStub: true), ]) void main() { 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 e853bbb02..c6e839a02 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,31 +3,26 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i12; -import 'dart:typed_data' as _i20; -import 'dart:ui' as _i17; +import 'dart:async' as _i9; +import 'dart:typed_data' as _i17; +import 'dart:ui' as _i14; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/db/isar/main_db.dart' as _i3; -import 'package:stackwallet/models/balance.dart' as _i9; -import 'package:stackwallet/models/isar/models/isar_models.dart' as _i23; -import 'package:stackwallet/models/isar/stack_theme.dart' as _i19; -import 'package:stackwallet/models/node_model.dart' as _i21; -import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8; +import 'package:stackwallet/models/isar/stack_theme.dart' as _i16; +import 'package:stackwallet/models/node_model.dart' as _i18; import 'package:stackwallet/networking/http.dart' as _i6; -import 'package:stackwallet/services/coins/coin_service.dart' as _i22; import 'package:stackwallet/services/node_service.dart' as _i2; -import 'package:stackwallet/services/wallets.dart' as _i11; -import 'package:stackwallet/services/wallets_service.dart' as _i15; -import 'package:stackwallet/themes/theme_service.dart' as _i18; -import 'package:stackwallet/utilities/amount/amount.dart' as _i10; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i16; +import 'package:stackwallet/services/wallets.dart' as _i8; +import 'package:stackwallet/services/wallets_service.dart' as _i12; +import 'package:stackwallet/themes/theme_service.dart' as _i15; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i13; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i7; -import 'package:stackwallet/utilities/prefs.dart' as _i14; +import 'package:stackwallet/utilities/prefs.dart' as _i11; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i4; -import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i13; +import 'package:stackwallet/wallets/isar/models/wallet_info.dart' as _i10; import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: type=lint @@ -93,40 +88,10 @@ class _FakeSecureStorageInterface_4 extends _i1.SmartFake ); } -class _FakeFeeObject_5 extends _i1.SmartFake implements _i8.FeeObject { - _FakeFeeObject_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeBalance_6 extends _i1.SmartFake implements _i9.Balance { - _FakeBalance_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAmount_7 extends _i1.SmartFake implements _i10.Amount { - _FakeAmount_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - /// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallets extends _i1.Mock implements _i11.Wallets { +class MockWallets extends _i1.Mock implements _i8.Wallets { MockWallets() { _i1.throwOnMissingStub(this); } @@ -192,8 +157,8 @@ class MockWallets extends _i1.Mock implements _i11.Wallets { returnValueForMissingStub: null, ); @override - _i12.Future deleteWallet( - _i13.WalletInfo? info, + _i9.Future deleteWallet( + _i10.WalletInfo? info, _i7.SecureStorageInterface? secureStorage, ) => (super.noSuchMethod( @@ -204,12 +169,12 @@ class MockWallets extends _i1.Mock implements _i11.Wallets { secureStorage, ], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future load( - _i14.Prefs? prefs, + _i9.Future load( + _i11.Prefs? prefs, _i3.MainDB? mainDB, ) => (super.noSuchMethod( @@ -220,12 +185,12 @@ class MockWallets extends _i1.Mock implements _i11.Wallets { mainDB, ], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future loadAfterStackRestore( - _i14.Prefs? prefs, + _i9.Future loadAfterStackRestore( + _i11.Prefs? prefs, List<_i5.Wallet<_i4.CryptoCurrency>>? wallets, ) => (super.noSuchMethod( @@ -236,33 +201,33 @@ class MockWallets extends _i1.Mock implements _i11.Wallets { wallets, ], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) 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 _i15.WalletsService { +class MockWalletsService extends _i1.Mock implements _i12.WalletsService { MockWalletsService() { _i1.throwOnMissingStub(this); } @override - _i12.Future> get walletNames => + _i9.Future> get walletNames => (super.noSuchMethod( Invocation.getter(#walletNames), - returnValue: _i12.Future>.value( - {}), - ) as _i12.Future>); + returnValue: _i9.Future>.value( + {}), + ) as _i9.Future>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i12.Future renameWallet({ + _i9.Future renameWallet({ required String? from, required String? to, required bool? shouldNotifyListeners, @@ -277,21 +242,21 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i12.Future.value(false), - ) as _i12.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 - _i12.Future addExistingStackWallet({ + _i9.Future addExistingStackWallet({ required String? name, required String? walletId, - required _i16.Coin? coin, + required _i13.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -305,13 +270,13 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future addNewWallet({ + _i9.Future addNewWallet({ required String? name, - required _i16.Coin? coin, + required _i13.Coin? coin, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -324,46 +289,46 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future> getFavoriteWalletIds() => (super.noSuchMethod( + _i9.Future> getFavoriteWalletIds() => (super.noSuchMethod( Invocation.method( #getFavoriteWalletIds, [], ), - returnValue: _i12.Future>.value([]), - ) as _i12.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i12.Future saveFavoriteWalletIds(List? walletIds) => + _i9.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( Invocation.method( #saveFavoriteWalletIds, [walletIds], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future addFavorite(String? walletId) => (super.noSuchMethod( + _i9.Future addFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #addFavorite, [walletId], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future removeFavorite(String? walletId) => (super.noSuchMethod( + _i9.Future removeFavorite(String? walletId) => (super.noSuchMethod( Invocation.method( #removeFavorite, [walletId], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future moveFavorite({ + _i9.Future moveFavorite({ required int? fromIndex, required int? toIndex, }) => @@ -376,48 +341,48 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { #toIndex: toIndex, }, ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future checkForDuplicate(String? name) => (super.noSuchMethod( + _i9.Future checkForDuplicate(String? name) => (super.noSuchMethod( Invocation.method( #checkForDuplicate, [name], ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i12.Future getWalletId(String? walletName) => (super.noSuchMethod( + _i9.Future getWalletId(String? walletName) => (super.noSuchMethod( Invocation.method( #getWalletId, [walletName], ), - returnValue: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future isMnemonicVerified({required String? walletId}) => + _i9.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #isMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i12.Future setMnemonicVerified({required String? walletId}) => + _i9.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( Invocation.method( #setMnemonicVerified, [], {#walletId: walletId}, ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future deleteWallet( + _i9.Future deleteWallet( String? name, bool? shouldNotifyListeners, ) => @@ -429,20 +394,20 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { shouldNotifyListeners, ], ), - returnValue: _i12.Future.value(0), - ) as _i12.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i12.Future refreshWallets(bool? shouldNotifyListeners) => + _i9.Future refreshWallets(bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #refreshWallets, [shouldNotifyListeners], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -450,7 +415,7 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { returnValueForMissingStub: null, ); @override - void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -478,7 +443,7 @@ class MockWalletsService extends _i1.Mock implements _i15.WalletsService { /// A class which mocks [ThemeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockThemeService extends _i1.Mock implements _i18.ThemeService { +class MockThemeService extends _i1.Mock implements _i15.ThemeService { MockThemeService() { _i1.throwOnMissingStub(this); } @@ -508,10 +473,10 @@ class MockThemeService extends _i1.Mock implements _i18.ThemeService { ), ) as _i3.MainDB); @override - List<_i19.StackTheme> get installedThemes => (super.noSuchMethod( + List<_i16.StackTheme> get installedThemes => (super.noSuchMethod( Invocation.getter(#installedThemes), - returnValue: <_i19.StackTheme>[], - ) as List<_i19.StackTheme>); + returnValue: <_i16.StackTheme>[], + ) as List<_i16.StackTheme>); @override void init(_i3.MainDB? db) => super.noSuchMethod( Invocation.method( @@ -521,73 +486,73 @@ class MockThemeService extends _i1.Mock implements _i18.ThemeService { returnValueForMissingStub: null, ); @override - _i12.Future install({required _i20.Uint8List? themeArchiveData}) => + _i9.Future install({required _i17.Uint8List? themeArchiveData}) => (super.noSuchMethod( Invocation.method( #install, [], {#themeArchiveData: themeArchiveData}, ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future remove({required String? themeId}) => (super.noSuchMethod( + _i9.Future remove({required String? themeId}) => (super.noSuchMethod( Invocation.method( #remove, [], {#themeId: themeId}, ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( + _i9.Future checkDefaultThemesOnStartup() => (super.noSuchMethod( Invocation.method( #checkDefaultThemesOnStartup, [], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future verifyInstalled({required String? themeId}) => + _i9.Future verifyInstalled({required String? themeId}) => (super.noSuchMethod( Invocation.method( #verifyInstalled, [], {#themeId: themeId}, ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i12.Future> fetchThemes() => + _i9.Future> fetchThemes() => (super.noSuchMethod( Invocation.method( #fetchThemes, [], ), - returnValue: _i12.Future>.value( - <_i18.StackThemeMetaData>[]), - ) as _i12.Future>); + returnValue: _i9.Future>.value( + <_i15.StackThemeMetaData>[]), + ) as _i9.Future>); @override - _i12.Future<_i20.Uint8List> fetchTheme( - {required _i18.StackThemeMetaData? themeMetaData}) => + _i9.Future<_i17.Uint8List> fetchTheme( + {required _i15.StackThemeMetaData? themeMetaData}) => (super.noSuchMethod( Invocation.method( #fetchTheme, [], {#themeMetaData: themeMetaData}, ), - returnValue: _i12.Future<_i20.Uint8List>.value(_i20.Uint8List(0)), - ) as _i12.Future<_i20.Uint8List>); + returnValue: _i9.Future<_i17.Uint8List>.value(_i17.Uint8List(0)), + ) as _i9.Future<_i17.Uint8List>); @override - _i19.StackTheme? getTheme({required String? themeId}) => + _i16.StackTheme? getTheme({required String? themeId}) => (super.noSuchMethod(Invocation.method( #getTheme, [], {#themeId: themeId}, - )) as _i19.StackTheme?); + )) as _i16.StackTheme?); } /// A class which mocks [NodeService]. @@ -603,33 +568,33 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { ), ) as _i7.SecureStorageInterface); @override - List<_i21.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i18.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i21.NodeModel>[], - ) as List<_i21.NodeModel>); + returnValue: <_i18.NodeModel>[], + ) as List<_i18.NodeModel>); @override - List<_i21.NodeModel> get nodes => (super.noSuchMethod( + List<_i18.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i21.NodeModel>[], - ) as List<_i21.NodeModel>); + returnValue: <_i18.NodeModel>[], + ) as List<_i18.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i12.Future updateDefaults() => (super.noSuchMethod( + _i9.Future updateDefaults() => (super.noSuchMethod( Invocation.method( #updateDefaults, [], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future setPrimaryNodeFor({ - required _i16.Coin? coin, - required _i21.NodeModel? node, + _i9.Future setPrimaryNodeFor({ + required _i13.Coin? coin, + required _i18.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -642,44 +607,44 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i21.NodeModel? getPrimaryNodeFor({required _i16.Coin? coin}) => + _i18.NodeModel? getPrimaryNodeFor({required _i13.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i21.NodeModel?); + )) as _i18.NodeModel?); @override - List<_i21.NodeModel> getNodesFor(_i16.Coin? coin) => (super.noSuchMethod( + List<_i18.NodeModel> getNodesFor(_i13.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i21.NodeModel>[], - ) as List<_i21.NodeModel>); + returnValue: <_i18.NodeModel>[], + ) as List<_i18.NodeModel>); @override - _i21.NodeModel? getNodeById({required String? id}) => + _i18.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i21.NodeModel?); + )) as _i18.NodeModel?); @override - List<_i21.NodeModel> failoverNodesFor({required _i16.Coin? coin}) => + List<_i18.NodeModel> failoverNodesFor({required _i13.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i21.NodeModel>[], - ) as List<_i21.NodeModel>); + returnValue: <_i18.NodeModel>[], + ) as List<_i18.NodeModel>); @override - _i12.Future add( - _i21.NodeModel? node, + _i9.Future add( + _i18.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -692,11 +657,11 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future delete( + _i9.Future delete( String? id, bool? shouldNotifyListeners, ) => @@ -708,11 +673,11 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future setEnabledState( + _i9.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners, @@ -726,12 +691,12 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future edit( - _i21.NodeModel? editedNode, + _i9.Future edit( + _i18.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => @@ -744,20 +709,20 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { shouldNotifyListeners, ], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i12.Future updateCommunityNodes() => (super.noSuchMethod( + _i9.Future updateCommunityNodes() => (super.noSuchMethod( Invocation.method( #updateCommunityNodes, [], ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -765,7 +730,7 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { returnValueForMissingStub: null, ); @override - void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -789,312 +754,3 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { returnValueForMissingStub: null, ); } - -/// A class which mocks [CoinServiceAPI]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockCoinServiceAPI extends _i1.Mock implements _i22.CoinServiceAPI { - @override - set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => - super.noSuchMethod( - Invocation.setter( - #onIsActiveWalletChanged, - _onIsActiveWalletChanged, - ), - returnValueForMissingStub: null, - ); - @override - _i16.Coin get coin => (super.noSuchMethod( - Invocation.getter(#coin), - returnValue: _i16.Coin.bitcoin, - ) as _i16.Coin); - @override - bool get isRefreshing => (super.noSuchMethod( - Invocation.getter(#isRefreshing), - returnValue: false, - ) as bool); - @override - bool get shouldAutoSync => (super.noSuchMethod( - Invocation.getter(#shouldAutoSync), - returnValue: false, - ) as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( - Invocation.setter( - #shouldAutoSync, - shouldAutoSync, - ), - returnValueForMissingStub: null, - ); - @override - bool get isFavorite => (super.noSuchMethod( - Invocation.getter(#isFavorite), - returnValue: false, - ) as bool); - @override - set isFavorite(bool? markFavorite) => super.noSuchMethod( - Invocation.setter( - #isFavorite, - markFavorite, - ), - returnValueForMissingStub: null, - ); - @override - _i12.Future<_i8.FeeObject> get fees => (super.noSuchMethod( - Invocation.getter(#fees), - returnValue: _i12.Future<_i8.FeeObject>.value(_FakeFeeObject_5( - this, - Invocation.getter(#fees), - )), - ) as _i12.Future<_i8.FeeObject>); - @override - _i12.Future get maxFee => (super.noSuchMethod( - Invocation.getter(#maxFee), - returnValue: _i12.Future.value(0), - ) as _i12.Future); - @override - _i12.Future get currentReceivingAddress => (super.noSuchMethod( - Invocation.getter(#currentReceivingAddress), - returnValue: _i12.Future.value(''), - ) as _i12.Future); - @override - _i9.Balance get balance => (super.noSuchMethod( - Invocation.getter(#balance), - returnValue: _FakeBalance_6( - this, - Invocation.getter(#balance), - ), - ) as _i9.Balance); - @override - _i12.Future> get transactions => (super.noSuchMethod( - Invocation.getter(#transactions), - returnValue: - _i12.Future>.value(<_i23.Transaction>[]), - ) as _i12.Future>); - @override - _i12.Future> get utxos => (super.noSuchMethod( - Invocation.getter(#utxos), - returnValue: _i12.Future>.value(<_i23.UTXO>[]), - ) as _i12.Future>); - @override - set walletName(String? newName) => super.noSuchMethod( - Invocation.setter( - #walletName, - newName, - ), - returnValueForMissingStub: null, - ); - @override - String get walletName => (super.noSuchMethod( - Invocation.getter(#walletName), - returnValue: '', - ) as String); - @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: '', - ) as String); - @override - _i12.Future> get mnemonic => (super.noSuchMethod( - Invocation.getter(#mnemonic), - returnValue: _i12.Future>.value([]), - ) as _i12.Future>); - @override - _i12.Future get mnemonicString => (super.noSuchMethod( - Invocation.getter(#mnemonicString), - returnValue: _i12.Future.value(), - ) as _i12.Future); - @override - _i12.Future get mnemonicPassphrase => (super.noSuchMethod( - Invocation.getter(#mnemonicPassphrase), - returnValue: _i12.Future.value(), - ) as _i12.Future); - @override - bool get hasCalledExit => (super.noSuchMethod( - Invocation.getter(#hasCalledExit), - returnValue: false, - ) as bool); - @override - bool get isConnected => (super.noSuchMethod( - Invocation.getter(#isConnected), - returnValue: false, - ) as bool); - @override - int get storedChainHeight => (super.noSuchMethod( - Invocation.getter(#storedChainHeight), - returnValue: 0, - ) as int); - @override - _i12.Future> prepareSend({ - required String? address, - required _i10.Amount? amount, - Map? args, - }) => - (super.noSuchMethod( - Invocation.method( - #prepareSend, - [], - { - #address: address, - #amount: amount, - #args: args, - }, - ), - returnValue: - _i12.Future>.value({}), - ) as _i12.Future>); - @override - _i12.Future confirmSend({required Map? txData}) => - (super.noSuchMethod( - Invocation.method( - #confirmSend, - [], - {#txData: txData}, - ), - returnValue: _i12.Future.value(''), - ) as _i12.Future); - @override - _i12.Future refresh() => (super.noSuchMethod( - Invocation.method( - #refresh, - [], - ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); - @override - _i12.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( - Invocation.method( - #updateNode, - [shouldRefresh], - ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); - @override - bool validateAddress(String? address) => (super.noSuchMethod( - Invocation.method( - #validateAddress, - [address], - ), - returnValue: false, - ) as bool); - @override - _i12.Future testNetworkConnection() => (super.noSuchMethod( - Invocation.method( - #testNetworkConnection, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - @override - _i12.Future recoverFromMnemonic({ - required String? mnemonic, - String? mnemonicPassphrase, - required int? maxUnusedAddressGap, - required int? maxNumberOfIndexesToCheck, - required int? height, - }) => - (super.noSuchMethod( - Invocation.method( - #recoverFromMnemonic, - [], - { - #mnemonic: mnemonic, - #mnemonicPassphrase: mnemonicPassphrase, - #maxUnusedAddressGap: maxUnusedAddressGap, - #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height, - }, - ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); - @override - _i12.Future initializeNew( - ({String mnemonicPassphrase, int wordCount})? data) => - (super.noSuchMethod( - Invocation.method( - #initializeNew, - [data], - ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); - @override - _i12.Future initializeExisting() => (super.noSuchMethod( - Invocation.method( - #initializeExisting, - [], - ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); - @override - _i12.Future exit() => (super.noSuchMethod( - Invocation.method( - #exit, - [], - ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); - @override - _i12.Future fullRescan( - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - ) => - (super.noSuchMethod( - Invocation.method( - #fullRescan, - [ - maxUnusedAddressGap, - maxNumberOfIndexesToCheck, - ], - ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); - @override - _i12.Future<_i10.Amount> estimateFeeFor( - _i10.Amount? amount, - int? feeRate, - ) => - (super.noSuchMethod( - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - returnValue: _i12.Future<_i10.Amount>.value(_FakeAmount_7( - this, - Invocation.method( - #estimateFeeFor, - [ - amount, - feeRate, - ], - ), - )), - ) as _i12.Future<_i10.Amount>); - @override - _i12.Future generateNewAddress() => (super.noSuchMethod( - Invocation.method( - #generateNewAddress, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - @override - _i12.Future updateSentCachedTxData(Map? txData) => - (super.noSuchMethod( - Invocation.method( - #updateSentCachedTxData, - [txData], - ), - returnValue: _i12.Future.value(), - returnValueForMissingStub: _i12.Future.value(), - ) as _i12.Future); -}