diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f76ee4b8c..9b8123f7f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,7 +15,60 @@ jobs: run: git submodule update --init --recursive - name: Get dependencies run: flutter pub get - - name: Analyze - run: flutter analyze + - name: Create temp files + id: secret-file1 + run: | + $secretFileExchange = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "lib/external_api_keys.dart"; + $encodedBytes = [System.Convert]::FromBase64String($env:CHANGE_NOW); + Set-Content $secretFileExchange -Value $encodedBytes -AsByteStream; + $secretFileExchangeHash = Get-FileHash $secretFileExchange; + Write-Output "::set-output name=SECRET_FILE_EXCHANGE::$secretFileExchange"; + Write-Output "::set-output name=SECRET_FILE_EXCHANGE_HASH::$($secretFileExchangeHash.Hash)"; + Write-Output "Secret file $secretFileExchange has hash $($secretFileExchangeHash.Hash)"; + + $secretFileBitcoin = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/bitcoin/bitcoin_wallet_test_parameters.dart"; + $encodedBytes = [System.Convert]::FromBase64String($env:BITCOIN_TEST); + Set-Content $secretFileBitcoin -Value $encodedBytes -AsByteStream; + $secretFileBitcoinHash = Get-FileHash $secretFileBitcoin; + Write-Output "::set-output name=SECRET_FILE_BITCOIN::$secretFileBitcoin"; + Write-Output "::set-output name=SECRET_FILE_BITCOIN_HASH::$($secretFileBitcoinHash.Hash)"; + Write-Output "Secret file $secretFileBitcoin has hash $($secretFileBitcoinHash.Hash)"; + + $secretFileDogecoin = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/dogecoin/dogecoin_wallet_test_parameters.dart"; + $encodedBytes = [System.Convert]::FromBase64String($env:DOGECOIN_TEST); + Set-Content $secretFileDogecoin -Value $encodedBytes -AsByteStream; + $secretFileDogecoinHash = Get-FileHash $secretFileDogecoin; + Write-Output "::set-output name=SECRET_FILE_DOGECOIN::$secretFileDogecoin"; + Write-Output "::set-output name=SECRET_FILE_DOGECOIN_HASH::$($secretFileDogecoinHash.Hash)"; + Write-Output "Secret file $secretFileDogecoin has hash $($secretFileDogecoinHash.Hash)"; + + $secretFileFiro = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/firo/firo_wallet_test_parameters.dart"; + $encodedBytes = [System.Convert]::FromBase64String($env:FIRO_TEST); + Set-Content $secretFileFiro -Value $encodedBytes -AsByteStream; + $secretFileFiroHash = Get-FileHash $secretFileFiro; + Write-Output "::set-output name=SECRET_FILE_FIRO::$secretFileFiro"; + Write-Output "::set-output name=SECRET_FILE_FIRO_HASH::$($secretFileFiroHash.Hash)"; + Write-Output "Secret file $secretFileFiro has hash $($secretFileFiroHash.Hash)"; + shell: pwsh + env: + CHANGE_NOW: ${{ secrets.CHANGE_NOW }} + BITCOIN_TEST: ${{ secrets.BITCOIN_TEST }} + DOGECOIN_TEST: ${{ secrets.DOGECOIN_TEST }} + FIRO_TEST: ${{ secrets.FIRO_TEST }} +# - name: Analyze +# run: flutter analyze - name: Test run: flutter test + - name: Delete temp files + run: | + Remove-Item -Path $env:CHANGE_NOW; + Remove-Item -Path $env:BITCOIN_TEST; + Remove-Item -Path $env:DOGECOIN_TEST; + Remove-Item -Path $env:FIRO_TEST; + shell: pwsh + if: always() + env: + CHANGE_NOW: ${{ steps.secret-file1.outputs.SECRET_FILE_EXCHANGE }} + BITCOIN_TEST: ${{ steps.secret-file1.outputs.SECRET_FILE_BITCOIN }} + DOGECOIN_TEST: ${{ steps.secret-file1.outputs.SECRET_FILE_DOGECOIN }} + FIRO_TEST: ${{ steps.secret-file1.outputs.SECRET_FILE_FIRO }} diff --git a/test/screen_tests/lockscreen_view_screen_test.mocks.dart b/test/screen_tests/lockscreen_view_screen_test.mocks.dart index f79f30465..81369cdf1 100644 --- a/test/screen_tests/lockscreen_view_screen_test.mocks.dart +++ b/test/screen_tests/lockscreen_view_screen_test.mocks.dart @@ -2,18 +2,20 @@ // in stackwallet/test/screen_tests/lockscreen_view_screen_test.dart. // Do not manually edit this file. -import 'dart:async' as _i6; -import 'dart:ui' as _i8; +import 'dart:async' as _i7; +import 'dart:ui' as _i9; -import 'package:decimal/decimal.dart' as _i4; +import 'package:decimal/decimal.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/models/models.dart' as _i3; -import 'package:stackwallet/models/node_model.dart' as _i10; -import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i11; -import 'package:stackwallet/services/node_service.dart' as _i9; -import 'package:stackwallet/services/wallets_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; +import 'package:stackwallet/models/models.dart' as _i4; +import 'package:stackwallet/models/node_model.dart' as _i11; +import 'package:stackwallet/services/coins/coin_service.dart' as _i3; +import 'package:stackwallet/services/coins/manager.dart' as _i12; +import 'package:stackwallet/services/node_service.dart' as _i10; +import 'package:stackwallet/services/wallets_service.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -25,30 +27,33 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake + implements _i2.FlutterSecureStorageInterface {} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} + +class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i5.WalletsService { +class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override - _i6.Future> get walletNames => + _i7.Future> get walletNames => (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i6.Future>); + returnValue: Future>.value( + {})) + as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i6.Future renameWallet( + _i7.Future renameWallet( {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( Invocation.method(#renameWallet, [], { @@ -56,12 +61,12 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #to: to, #shouldNotifyListeners: shouldNotifyListeners }), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future addExistingStackWallet( + _i7.Future addExistingStackWallet( {String? name, String? walletId, - _i7.Coin? coin, + _i8.Coin? coin, bool? shouldNotifyListeners}) => (super.noSuchMethod( Invocation.method(#addExistingStackWallet, [], { @@ -71,79 +76,79 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future addNewWallet( - {String? name, _i7.Coin? coin, bool? shouldNotifyListeners}) => + _i7.Future addNewWallet( + {String? name, _i8.Coin? coin, bool? shouldNotifyListeners}) => (super.noSuchMethod( Invocation.method(#addNewWallet, [], { #name: name, #coin: coin, #shouldNotifyListeners: shouldNotifyListeners }), - returnValue: Future.value()) as _i6.Future); + returnValue: Future.value()) as _i7.Future); @override - _i6.Future> getFavoriteWalletIds() => + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), returnValue: Future>.value([])) - as _i6.Future>); + as _i7.Future>); @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => (super + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future addFavorite(String? walletId) => + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future removeFavorite(String? walletId) => + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future moveFavorite({int? fromIndex, int? toIndex}) => + _i7.Future moveFavorite({int? fromIndex, int? toIndex}) => (super.noSuchMethod( Invocation.method( #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future checkForDuplicate(String? name) => + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future getWalletId(String? walletName) => + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i6.Future); + returnValue: Future.value()) as _i7.Future); @override - _i6.Future isMnemonicVerified({String? walletId}) => + _i7.Future isMnemonicVerified({String? walletId}) => (super.noSuchMethod( Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future setMnemonicVerified({String? walletId}) => + _i7.Future setMnemonicVerified({String? walletId}) => (super.noSuchMethod( Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + _i7.Future deleteWallet(String? name, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i6.Future); + returnValue: Future.value(0)) as _i7.Future); @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => (super + _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i8.VoidCallback? listener) => + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override @@ -158,28 +163,33 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i9.NodeService { +class MockNodeService extends _i1.Mock implements _i10.NodeService { @override - List<_i10.NodeModel> get primaryNodes => + _i2.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod(Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0()) + as _i2.FlutterSecureStorageInterface); + @override + List<_i11.NodeModel> get primaryNodes => (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i10.NodeModel>[]) as List<_i10.NodeModel>); + returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); @override - List<_i10.NodeModel> get nodes => + List<_i11.NodeModel> get nodes => (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i10.NodeModel>[]) as List<_i10.NodeModel>); + returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i6.Future updateDefaults() => + _i7.Future updateDefaults() => (super.noSuchMethod(Invocation.method(#updateDefaults, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future setPrimaryNodeFor( - {_i7.Coin? coin, - _i10.NodeModel? node, + _i7.Future setPrimaryNodeFor( + {_i8.Coin? coin, + _i11.NodeModel? node, bool? shouldNotifyListeners = false}) => (super.noSuchMethod( Invocation.method(#setPrimaryNodeFor, [], { @@ -188,62 +198,62 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i10.NodeModel? getPrimaryNodeFor({_i7.Coin? coin}) => (super.noSuchMethod( + _i11.NodeModel? getPrimaryNodeFor({_i8.Coin? coin}) => (super.noSuchMethod( Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i10.NodeModel?); + as _i11.NodeModel?); @override - List<_i10.NodeModel> getNodesFor(_i7.Coin? coin) => + List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i10.NodeModel>[]) as List<_i10.NodeModel>); + returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); @override - _i10.NodeModel? getNodeById({String? id}) => + _i11.NodeModel? getNodeById({String? id}) => (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i10.NodeModel?); + as _i11.NodeModel?); @override - List<_i10.NodeModel> failoverNodesFor({_i7.Coin? coin}) => (super + List<_i11.NodeModel> failoverNodesFor({_i8.Coin? coin}) => (super .noSuchMethod(Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i10.NodeModel>[]) as List<_i10.NodeModel>); + returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); @override - _i6.Future add(_i10.NodeModel? node, String? password, + _i7.Future add(_i11.NodeModel? node, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#add, [node, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future delete(String? id, bool? shouldNotifyListeners) => (super + _i7.Future delete(String? id, bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future setEnabledState( + _i7.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #setEnabledState, [id, enabled, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future edit(_i10.NodeModel? editedNode, String? password, + _i7.Future edit(_i11.NodeModel? editedNode, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #edit, [editedNode, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future updateCommunityNodes() => + _i7.Future updateCommunityNodes() => (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i8.VoidCallback? listener) => + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override @@ -258,7 +268,7 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i11.Manager { +class MockManager extends _i1.Mock implements _i12.Manager { @override bool get isActiveWallet => (super .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) @@ -268,16 +278,16 @@ class MockManager extends _i1.Mock implements _i11.Manager { super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), returnValueForMissingStub: null); @override - _i2.CoinServiceAPI get wallet => + _i3.CoinServiceAPI get wallet => (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); + returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), returnValue: false) as bool); @override - _i7.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin) as _i7.Coin); + _i8.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), + returnValue: _i8.Coin.bitcoin) as _i8.Coin); @override bool get isRefreshing => (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) @@ -299,61 +309,61 @@ class MockManager extends _i1.Mock implements _i11.Manager { super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), returnValueForMissingStub: null); @override - _i6.Future<_i3.FeeObject> get fees => + _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i6.Future<_i3.FeeObject>); + returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) + as _i7.Future<_i4.FeeObject>); @override - _i6.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i6.Future); + _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), + returnValue: Future.value(0)) as _i7.Future); @override - _i6.Future get currentReceivingAddress => + _i7.Future get currentReceivingAddress => (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i6.Future); + returnValue: Future.value('')) as _i7.Future); @override - _i6.Future<_i4.Decimal> get availableBalance => + _i7.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i7.Future<_i5.Decimal>); @override - _i4.Decimal get cachedAvailableBalance => + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); + returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i6.Future<_i4.Decimal> get pendingBalance => + _i7.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i7.Future<_i5.Decimal>); @override - _i6.Future<_i4.Decimal> get balanceMinusMaxFee => + _i7.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i7.Future<_i5.Decimal>); @override - _i6.Future<_i4.Decimal> get totalBalance => + _i7.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i7.Future<_i5.Decimal>); @override - _i4.Decimal get cachedTotalBalance => + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); + returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i6.Future> get allOwnAddresses => + _i7.Future> get allOwnAddresses => (super.noSuchMethod(Invocation.getter(#allOwnAddresses), returnValue: Future>.value([])) - as _i6.Future>); + as _i7.Future>); @override - _i6.Future<_i3.TransactionData> get transactionData => + _i7.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod(Invocation.getter(#transactionData), returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i6.Future<_i3.TransactionData>); + Future<_i4.TransactionData>.value(_FakeTransactionData_4())) + as _i7.Future<_i4.TransactionData>); @override - _i6.Future> get unspentOutputs => (super.noSuchMethod( + _i7.Future> get unspentOutputs => (super.noSuchMethod( Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i6.Future>); + returnValue: Future>.value(<_i4.UtxoObject>[])) + as _i7.Future>); @override set walletName(String? newName) => super.noSuchMethod(Invocation.setter(#walletName, newName), @@ -367,10 +377,10 @@ class MockManager extends _i1.Mock implements _i11.Manager { (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') as String); @override - _i6.Future> get mnemonic => + _i7.Future> get mnemonic => (super.noSuchMethod(Invocation.getter(#mnemonic), returnValue: Future>.value([])) - as _i6.Future>); + as _i7.Future>); @override bool get isConnected => (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) @@ -380,15 +390,15 @@ class MockManager extends _i1.Mock implements _i11.Manager { (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i6.Future updateNode(bool? shouldRefresh) => + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - _i6.Future> prepareSend( + _i7.Future> prepareSend( {String? address, int? satoshiAmount, Map? args}) => (super.noSuchMethod( Invocation.method(#prepareSend, [], { @@ -398,45 +408,45 @@ class MockManager extends _i1.Mock implements _i11.Manager { }), returnValue: Future>.value({})) - as _i6.Future>); + as _i7.Future>); @override - _i6.Future confirmSend({Map? txData}) => (super + _i7.Future confirmSend({Map? txData}) => (super .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i6.Future); + returnValue: Future.value('')) as _i7.Future); @override - _i6.Future send( + _i7.Future send( {String? toAddress, int? amount, Map? args = const {}}) => (super.noSuchMethod( Invocation.method( #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i6.Future); + returnValue: Future.value('')) as _i7.Future); @override - _i6.Future refresh() => + _i7.Future refresh() => (super.noSuchMethod(Invocation.method(#refresh, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override bool validateAddress(String? address) => (super.noSuchMethod(Invocation.method(#validateAddress, [address]), returnValue: false) as bool); @override - _i6.Future testNetworkConnection() => + _i7.Future testNetworkConnection() => (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future initializeNew() => + _i7.Future initializeNew() => (super.noSuchMethod(Invocation.method(#initializeNew, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future initializeExisting() => + _i7.Future initializeExisting() => (super.noSuchMethod(Invocation.method(#initializeExisting, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future recoverFromMnemonic( + _i7.Future recoverFromMnemonic( {String? mnemonic, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, @@ -449,35 +459,35 @@ class MockManager extends _i1.Mock implements _i11.Manager { #height: height }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future exitCurrentWallet() => + _i7.Future exitCurrentWallet() => (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future fullRescan( + _i7.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => (super.noSuchMethod( Invocation.method( #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future isOwnAddress(String? address) => + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => (super.noSuchMethod( Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i6.Future); + returnValue: Future.value(0)) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i8.VoidCallback? listener) => + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override diff --git a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart index 7dc146432..429b5b6b6 100644 --- a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart @@ -2,18 +2,20 @@ // in stackwallet/test/screen_tests/onboarding/create_pin_view_screen_test.dart. // Do not manually edit this file. -import 'dart:async' as _i6; -import 'dart:ui' as _i8; +import 'dart:async' as _i7; +import 'dart:ui' as _i9; -import 'package:decimal/decimal.dart' as _i4; +import 'package:decimal/decimal.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/models/models.dart' as _i3; -import 'package:stackwallet/models/node_model.dart' as _i10; -import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i11; -import 'package:stackwallet/services/node_service.dart' as _i9; -import 'package:stackwallet/services/wallets_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; +import 'package:stackwallet/models/models.dart' as _i4; +import 'package:stackwallet/models/node_model.dart' as _i11; +import 'package:stackwallet/services/coins/coin_service.dart' as _i3; +import 'package:stackwallet/services/coins/manager.dart' as _i12; +import 'package:stackwallet/services/node_service.dart' as _i10; +import 'package:stackwallet/services/wallets_service.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -25,30 +27,33 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake + implements _i2.FlutterSecureStorageInterface {} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} + +class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i5.WalletsService { +class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override - _i6.Future> get walletNames => + _i7.Future> get walletNames => (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i6.Future>); + returnValue: Future>.value( + {})) + as _i7.Future>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i6.Future renameWallet( + _i7.Future renameWallet( {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( Invocation.method(#renameWallet, [], { @@ -56,12 +61,12 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #to: to, #shouldNotifyListeners: shouldNotifyListeners }), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future addExistingStackWallet( + _i7.Future addExistingStackWallet( {String? name, String? walletId, - _i7.Coin? coin, + _i8.Coin? coin, bool? shouldNotifyListeners}) => (super.noSuchMethod( Invocation.method(#addExistingStackWallet, [], { @@ -71,79 +76,79 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future addNewWallet( - {String? name, _i7.Coin? coin, bool? shouldNotifyListeners}) => + _i7.Future addNewWallet( + {String? name, _i8.Coin? coin, bool? shouldNotifyListeners}) => (super.noSuchMethod( Invocation.method(#addNewWallet, [], { #name: name, #coin: coin, #shouldNotifyListeners: shouldNotifyListeners }), - returnValue: Future.value()) as _i6.Future); + returnValue: Future.value()) as _i7.Future); @override - _i6.Future> getFavoriteWalletIds() => + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), returnValue: Future>.value([])) - as _i6.Future>); + as _i7.Future>); @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => (super + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future addFavorite(String? walletId) => + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future removeFavorite(String? walletId) => + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future moveFavorite({int? fromIndex, int? toIndex}) => + _i7.Future moveFavorite({int? fromIndex, int? toIndex}) => (super.noSuchMethod( Invocation.method( #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future checkForDuplicate(String? name) => + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future getWalletId(String? walletName) => + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i6.Future); + returnValue: Future.value()) as _i7.Future); @override - _i6.Future isMnemonicVerified({String? walletId}) => + _i7.Future isMnemonicVerified({String? walletId}) => (super.noSuchMethod( Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future setMnemonicVerified({String? walletId}) => + _i7.Future setMnemonicVerified({String? walletId}) => (super.noSuchMethod( Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + _i7.Future deleteWallet(String? name, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i6.Future); + returnValue: Future.value(0)) as _i7.Future); @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => (super + _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i8.VoidCallback? listener) => + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override @@ -158,28 +163,33 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i9.NodeService { +class MockNodeService extends _i1.Mock implements _i10.NodeService { @override - List<_i10.NodeModel> get primaryNodes => + _i2.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod(Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0()) + as _i2.FlutterSecureStorageInterface); + @override + List<_i11.NodeModel> get primaryNodes => (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i10.NodeModel>[]) as List<_i10.NodeModel>); + returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); @override - List<_i10.NodeModel> get nodes => + List<_i11.NodeModel> get nodes => (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i10.NodeModel>[]) as List<_i10.NodeModel>); + returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i6.Future updateDefaults() => + _i7.Future updateDefaults() => (super.noSuchMethod(Invocation.method(#updateDefaults, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future setPrimaryNodeFor( - {_i7.Coin? coin, - _i10.NodeModel? node, + _i7.Future setPrimaryNodeFor( + {_i8.Coin? coin, + _i11.NodeModel? node, bool? shouldNotifyListeners = false}) => (super.noSuchMethod( Invocation.method(#setPrimaryNodeFor, [], { @@ -188,62 +198,62 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i10.NodeModel? getPrimaryNodeFor({_i7.Coin? coin}) => (super.noSuchMethod( + _i11.NodeModel? getPrimaryNodeFor({_i8.Coin? coin}) => (super.noSuchMethod( Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i10.NodeModel?); + as _i11.NodeModel?); @override - List<_i10.NodeModel> getNodesFor(_i7.Coin? coin) => + List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i10.NodeModel>[]) as List<_i10.NodeModel>); + returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); @override - _i10.NodeModel? getNodeById({String? id}) => + _i11.NodeModel? getNodeById({String? id}) => (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i10.NodeModel?); + as _i11.NodeModel?); @override - List<_i10.NodeModel> failoverNodesFor({_i7.Coin? coin}) => (super + List<_i11.NodeModel> failoverNodesFor({_i8.Coin? coin}) => (super .noSuchMethod(Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i10.NodeModel>[]) as List<_i10.NodeModel>); + returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); @override - _i6.Future add(_i10.NodeModel? node, String? password, + _i7.Future add(_i11.NodeModel? node, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#add, [node, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future delete(String? id, bool? shouldNotifyListeners) => (super + _i7.Future delete(String? id, bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future setEnabledState( + _i7.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #setEnabledState, [id, enabled, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future edit(_i10.NodeModel? editedNode, String? password, + _i7.Future edit(_i11.NodeModel? editedNode, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #edit, [editedNode, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future updateCommunityNodes() => + _i7.Future updateCommunityNodes() => (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i8.VoidCallback? listener) => + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override @@ -258,7 +268,7 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i11.Manager { +class MockManager extends _i1.Mock implements _i12.Manager { @override bool get isActiveWallet => (super .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) @@ -268,16 +278,16 @@ class MockManager extends _i1.Mock implements _i11.Manager { super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), returnValueForMissingStub: null); @override - _i2.CoinServiceAPI get wallet => + _i3.CoinServiceAPI get wallet => (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); + returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), returnValue: false) as bool); @override - _i7.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin) as _i7.Coin); + _i8.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), + returnValue: _i8.Coin.bitcoin) as _i8.Coin); @override bool get isRefreshing => (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) @@ -299,61 +309,61 @@ class MockManager extends _i1.Mock implements _i11.Manager { super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), returnValueForMissingStub: null); @override - _i6.Future<_i3.FeeObject> get fees => + _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i6.Future<_i3.FeeObject>); + returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) + as _i7.Future<_i4.FeeObject>); @override - _i6.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i6.Future); + _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), + returnValue: Future.value(0)) as _i7.Future); @override - _i6.Future get currentReceivingAddress => + _i7.Future get currentReceivingAddress => (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i6.Future); + returnValue: Future.value('')) as _i7.Future); @override - _i6.Future<_i4.Decimal> get availableBalance => + _i7.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i7.Future<_i5.Decimal>); @override - _i4.Decimal get cachedAvailableBalance => + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); + returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i6.Future<_i4.Decimal> get pendingBalance => + _i7.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i7.Future<_i5.Decimal>); @override - _i6.Future<_i4.Decimal> get balanceMinusMaxFee => + _i7.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i7.Future<_i5.Decimal>); @override - _i6.Future<_i4.Decimal> get totalBalance => + _i7.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i7.Future<_i5.Decimal>); @override - _i4.Decimal get cachedTotalBalance => + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); + returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i6.Future> get allOwnAddresses => + _i7.Future> get allOwnAddresses => (super.noSuchMethod(Invocation.getter(#allOwnAddresses), returnValue: Future>.value([])) - as _i6.Future>); + as _i7.Future>); @override - _i6.Future<_i3.TransactionData> get transactionData => + _i7.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod(Invocation.getter(#transactionData), returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i6.Future<_i3.TransactionData>); + Future<_i4.TransactionData>.value(_FakeTransactionData_4())) + as _i7.Future<_i4.TransactionData>); @override - _i6.Future> get unspentOutputs => (super.noSuchMethod( + _i7.Future> get unspentOutputs => (super.noSuchMethod( Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i6.Future>); + returnValue: Future>.value(<_i4.UtxoObject>[])) + as _i7.Future>); @override set walletName(String? newName) => super.noSuchMethod(Invocation.setter(#walletName, newName), @@ -367,10 +377,10 @@ class MockManager extends _i1.Mock implements _i11.Manager { (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') as String); @override - _i6.Future> get mnemonic => + _i7.Future> get mnemonic => (super.noSuchMethod(Invocation.getter(#mnemonic), returnValue: Future>.value([])) - as _i6.Future>); + as _i7.Future>); @override bool get isConnected => (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) @@ -380,15 +390,15 @@ class MockManager extends _i1.Mock implements _i11.Manager { (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i6.Future updateNode(bool? shouldRefresh) => + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - _i6.Future> prepareSend( + _i7.Future> prepareSend( {String? address, int? satoshiAmount, Map? args}) => (super.noSuchMethod( Invocation.method(#prepareSend, [], { @@ -398,45 +408,45 @@ class MockManager extends _i1.Mock implements _i11.Manager { }), returnValue: Future>.value({})) - as _i6.Future>); + as _i7.Future>); @override - _i6.Future confirmSend({Map? txData}) => (super + _i7.Future confirmSend({Map? txData}) => (super .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i6.Future); + returnValue: Future.value('')) as _i7.Future); @override - _i6.Future send( + _i7.Future send( {String? toAddress, int? amount, Map? args = const {}}) => (super.noSuchMethod( Invocation.method( #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i6.Future); + returnValue: Future.value('')) as _i7.Future); @override - _i6.Future refresh() => + _i7.Future refresh() => (super.noSuchMethod(Invocation.method(#refresh, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override bool validateAddress(String? address) => (super.noSuchMethod(Invocation.method(#validateAddress, [address]), returnValue: false) as bool); @override - _i6.Future testNetworkConnection() => + _i7.Future testNetworkConnection() => (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future initializeNew() => + _i7.Future initializeNew() => (super.noSuchMethod(Invocation.method(#initializeNew, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future initializeExisting() => + _i7.Future initializeExisting() => (super.noSuchMethod(Invocation.method(#initializeExisting, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future recoverFromMnemonic( + _i7.Future recoverFromMnemonic( {String? mnemonic, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, @@ -449,35 +459,35 @@ class MockManager extends _i1.Mock implements _i11.Manager { #height: height }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future exitCurrentWallet() => + _i7.Future exitCurrentWallet() => (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future fullRescan( + _i7.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => (super.noSuchMethod( Invocation.method( #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + returnValueForMissingStub: Future.value()) as _i7.Future); @override - _i6.Future isOwnAddress(String? address) => + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i6.Future); + returnValue: Future.value(false)) as _i7.Future); @override - _i6.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => (super.noSuchMethod( Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i6.Future); + returnValue: Future.value(0)) as _i7.Future); @override - void addListener(_i8.VoidCallback? listener) => + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i8.VoidCallback? listener) => + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override diff --git a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart index 80b735b2d..7f0d56002 100644 --- a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart @@ -2,20 +2,22 @@ // in stackwallet/test/screen_tests/onboarding/restore_wallet_view_screen_test.dart. // Do not manually edit this file. -import 'dart:async' as _i7; -import 'dart:ui' as _i10; +import 'dart:async' as _i8; +import 'dart:ui' as _i11; import 'package:barcode_scan2/barcode_scan2.dart' as _i2; import 'package:decimal/decimal.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/models.dart' as _i4; -import 'package:stackwallet/models/node_model.dart' as _i13; +import 'package:stackwallet/models/node_model.dart' as _i14; import 'package:stackwallet/services/coins/coin_service.dart' as _i3; -import 'package:stackwallet/services/coins/manager.dart' as _i11; -import 'package:stackwallet/services/node_service.dart' as _i12; -import 'package:stackwallet/services/wallets_service.dart' as _i8; -import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i6; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; +import 'package:stackwallet/services/coins/manager.dart' as _i12; +import 'package:stackwallet/services/node_service.dart' as _i13; +import 'package:stackwallet/services/wallets_service.dart' as _i9; +import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i7; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i6; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -37,39 +39,42 @@ class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeFlutterSecureStorageInterface_5 extends _i1.Fake + implements _i6.FlutterSecureStorageInterface {} + /// A class which mocks [BarcodeScannerWrapper]. /// /// See the documentation for Mockito's code generation for more information. class MockBarcodeScannerWrapper extends _i1.Mock - implements _i6.BarcodeScannerWrapper { + implements _i7.BarcodeScannerWrapper { MockBarcodeScannerWrapper() { _i1.throwOnMissingStub(this); } @override - _i7.Future<_i2.ScanResult> scan( + _i8.Future<_i2.ScanResult> scan( {_i2.ScanOptions? options = const _i2.ScanOptions()}) => (super.noSuchMethod(Invocation.method(#scan, [], {#options: options}), returnValue: Future<_i2.ScanResult>.value(_FakeScanResult_0())) - as _i7.Future<_i2.ScanResult>); + as _i8.Future<_i2.ScanResult>); } /// A class which mocks [WalletsService]. /// /// See the documentation for Mockito's code generation for more information. -class MockWalletsService extends _i1.Mock implements _i8.WalletsService { +class MockWalletsService extends _i1.Mock implements _i9.WalletsService { @override - _i7.Future> get walletNames => + _i8.Future> get walletNames => (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i7.Future>); + returnValue: Future>.value( + {})) + as _i8.Future>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i7.Future renameWallet( + _i8.Future renameWallet( {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( Invocation.method(#renameWallet, [], { @@ -77,12 +82,12 @@ class MockWalletsService extends _i1.Mock implements _i8.WalletsService { #to: to, #shouldNotifyListeners: shouldNotifyListeners }), - returnValue: Future.value(false)) as _i7.Future); + returnValue: Future.value(false)) as _i8.Future); @override - _i7.Future addExistingStackWallet( + _i8.Future addExistingStackWallet( {String? name, String? walletId, - _i9.Coin? coin, + _i10.Coin? coin, bool? shouldNotifyListeners}) => (super.noSuchMethod( Invocation.method(#addExistingStackWallet, [], { @@ -92,79 +97,79 @@ class MockWalletsService extends _i1.Mock implements _i8.WalletsService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future addNewWallet( - {String? name, _i9.Coin? coin, bool? shouldNotifyListeners}) => + _i8.Future addNewWallet( + {String? name, _i10.Coin? coin, bool? shouldNotifyListeners}) => (super.noSuchMethod( Invocation.method(#addNewWallet, [], { #name: name, #coin: coin, #shouldNotifyListeners: shouldNotifyListeners }), - returnValue: Future.value()) as _i7.Future); + returnValue: Future.value()) as _i8.Future); @override - _i7.Future> getFavoriteWalletIds() => + _i8.Future> getFavoriteWalletIds() => (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), returnValue: Future>.value([])) - as _i7.Future>); + as _i8.Future>); @override - _i7.Future saveFavoriteWalletIds(List? walletIds) => (super + _i8.Future saveFavoriteWalletIds(List? walletIds) => (super .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future addFavorite(String? walletId) => + _i8.Future addFavorite(String? walletId) => (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future removeFavorite(String? walletId) => + _i8.Future removeFavorite(String? walletId) => (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future moveFavorite({int? fromIndex, int? toIndex}) => + _i8.Future moveFavorite({int? fromIndex, int? toIndex}) => (super.noSuchMethod( Invocation.method( #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future checkForDuplicate(String? name) => + _i8.Future checkForDuplicate(String? name) => (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i7.Future); + returnValue: Future.value(false)) as _i8.Future); @override - _i7.Future getWalletId(String? walletName) => + _i8.Future getWalletId(String? walletName) => (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i7.Future); + returnValue: Future.value()) as _i8.Future); @override - _i7.Future isMnemonicVerified({String? walletId}) => + _i8.Future isMnemonicVerified({String? walletId}) => (super.noSuchMethod( Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i7.Future); + returnValue: Future.value(false)) as _i8.Future); @override - _i7.Future setMnemonicVerified({String? walletId}) => + _i8.Future setMnemonicVerified({String? walletId}) => (super.noSuchMethod( Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + _i8.Future deleteWallet(String? name, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i7.Future); + returnValue: Future.value(0)) as _i8.Future); @override - _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super + _i8.Future refreshWallets(bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - void addListener(_i10.VoidCallback? listener) => + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i10.VoidCallback? listener) => + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override @@ -179,7 +184,7 @@ class MockWalletsService extends _i1.Mock implements _i8.WalletsService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i11.Manager { +class MockManager extends _i1.Mock implements _i12.Manager { @override bool get isActiveWallet => (super .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) @@ -197,8 +202,8 @@ class MockManager extends _i1.Mock implements _i11.Manager { (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), returnValue: false) as bool); @override - _i9.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin) as _i9.Coin); + _i10.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), + returnValue: _i10.Coin.bitcoin) as _i10.Coin); @override bool get isRefreshing => (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) @@ -220,61 +225,61 @@ class MockManager extends _i1.Mock implements _i11.Manager { super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), returnValueForMissingStub: null); @override - _i7.Future<_i4.FeeObject> get fees => + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(Invocation.getter(#fees), returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i7.Future<_i4.FeeObject>); + as _i8.Future<_i4.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); + _i8.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), + returnValue: Future.value(0)) as _i8.Future); @override - _i7.Future get currentReceivingAddress => + _i8.Future get currentReceivingAddress => (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); + returnValue: Future.value('')) as _i8.Future); @override - _i7.Future<_i5.Decimal> get availableBalance => + _i8.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod(Invocation.getter(#availableBalance), returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); + as _i8.Future<_i5.Decimal>); @override _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i7.Future<_i5.Decimal> get pendingBalance => + _i8.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod(Invocation.getter(#pendingBalance), returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); + as _i8.Future<_i5.Decimal>); @override - _i7.Future<_i5.Decimal> get balanceMinusMaxFee => + _i8.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); + as _i8.Future<_i5.Decimal>); @override - _i7.Future<_i5.Decimal> get totalBalance => + _i8.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod(Invocation.getter(#totalBalance), returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); + as _i8.Future<_i5.Decimal>); @override _i5.Decimal get cachedTotalBalance => (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i7.Future> get allOwnAddresses => + _i8.Future> get allOwnAddresses => (super.noSuchMethod(Invocation.getter(#allOwnAddresses), returnValue: Future>.value([])) - as _i7.Future>); + as _i8.Future>); @override - _i7.Future<_i4.TransactionData> get transactionData => + _i8.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod(Invocation.getter(#transactionData), returnValue: Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i7.Future<_i4.TransactionData>); + as _i8.Future<_i4.TransactionData>); @override - _i7.Future> get unspentOutputs => (super.noSuchMethod( + _i8.Future> get unspentOutputs => (super.noSuchMethod( Invocation.getter(#unspentOutputs), returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i7.Future>); + as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod(Invocation.setter(#walletName, newName), @@ -288,10 +293,10 @@ class MockManager extends _i1.Mock implements _i11.Manager { (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') as String); @override - _i7.Future> get mnemonic => + _i8.Future> get mnemonic => (super.noSuchMethod(Invocation.getter(#mnemonic), returnValue: Future>.value([])) - as _i7.Future>); + as _i8.Future>); @override bool get isConnected => (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) @@ -301,15 +306,15 @@ class MockManager extends _i1.Mock implements _i11.Manager { (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - _i7.Future> prepareSend( + _i8.Future> prepareSend( {String? address, int? satoshiAmount, Map? args}) => (super.noSuchMethod( Invocation.method(#prepareSend, [], { @@ -319,45 +324,45 @@ class MockManager extends _i1.Mock implements _i11.Manager { }), returnValue: Future>.value({})) - as _i7.Future>); + as _i8.Future>); @override - _i7.Future confirmSend({Map? txData}) => (super + _i8.Future confirmSend({Map? txData}) => (super .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); + returnValue: Future.value('')) as _i8.Future); @override - _i7.Future send( + _i8.Future send( {String? toAddress, int? amount, Map? args = const {}}) => (super.noSuchMethod( Invocation.method( #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); + returnValue: Future.value('')) as _i8.Future); @override - _i7.Future refresh() => + _i8.Future refresh() => (super.noSuchMethod(Invocation.method(#refresh, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod(Invocation.method(#validateAddress, [address]), returnValue: false) as bool); @override - _i7.Future testNetworkConnection() => + _i8.Future testNetworkConnection() => (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); + returnValue: Future.value(false)) as _i8.Future); @override - _i7.Future initializeNew() => + _i8.Future initializeNew() => (super.noSuchMethod(Invocation.method(#initializeNew, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future initializeExisting() => + _i8.Future initializeExisting() => (super.noSuchMethod(Invocation.method(#initializeExisting, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future recoverFromMnemonic( + _i8.Future recoverFromMnemonic( {String? mnemonic, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, @@ -370,35 +375,35 @@ class MockManager extends _i1.Mock implements _i11.Manager { #height: height }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future exitCurrentWallet() => + _i8.Future exitCurrentWallet() => (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => (super.noSuchMethod( Invocation.method( #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future isOwnAddress(String? address) => + _i8.Future isOwnAddress(String? address) => (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); + returnValue: Future.value(false)) as _i8.Future); @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => (super.noSuchMethod( Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); + returnValue: Future.value(0)) as _i8.Future); @override - void addListener(_i10.VoidCallback? listener) => + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i10.VoidCallback? listener) => + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override @@ -410,28 +415,33 @@ class MockManager extends _i1.Mock implements _i11.Manager { /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i12.NodeService { +class MockNodeService extends _i1.Mock implements _i13.NodeService { @override - List<_i13.NodeModel> get primaryNodes => + _i6.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod(Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_5()) + as _i6.FlutterSecureStorageInterface); + @override + List<_i14.NodeModel> get primaryNodes => (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i13.NodeModel>[]) as List<_i13.NodeModel>); + returnValue: <_i14.NodeModel>[]) as List<_i14.NodeModel>); @override - List<_i13.NodeModel> get nodes => + List<_i14.NodeModel> get nodes => (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i13.NodeModel>[]) as List<_i13.NodeModel>); + returnValue: <_i14.NodeModel>[]) as List<_i14.NodeModel>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i7.Future updateDefaults() => + _i8.Future updateDefaults() => (super.noSuchMethod(Invocation.method(#updateDefaults, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future setPrimaryNodeFor( - {_i9.Coin? coin, - _i13.NodeModel? node, + _i8.Future setPrimaryNodeFor( + {_i10.Coin? coin, + _i14.NodeModel? node, bool? shouldNotifyListeners = false}) => (super.noSuchMethod( Invocation.method(#setPrimaryNodeFor, [], { @@ -440,62 +450,62 @@ class MockNodeService extends _i1.Mock implements _i12.NodeService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i13.NodeModel? getPrimaryNodeFor({_i9.Coin? coin}) => (super.noSuchMethod( + _i14.NodeModel? getPrimaryNodeFor({_i10.Coin? coin}) => (super.noSuchMethod( Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i13.NodeModel?); + as _i14.NodeModel?); @override - List<_i13.NodeModel> getNodesFor(_i9.Coin? coin) => + List<_i14.NodeModel> getNodesFor(_i10.Coin? coin) => (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i13.NodeModel>[]) as List<_i13.NodeModel>); + returnValue: <_i14.NodeModel>[]) as List<_i14.NodeModel>); @override - _i13.NodeModel? getNodeById({String? id}) => + _i14.NodeModel? getNodeById({String? id}) => (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i13.NodeModel?); + as _i14.NodeModel?); @override - List<_i13.NodeModel> failoverNodesFor({_i9.Coin? coin}) => (super + List<_i14.NodeModel> failoverNodesFor({_i10.Coin? coin}) => (super .noSuchMethod(Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i13.NodeModel>[]) as List<_i13.NodeModel>); + returnValue: <_i14.NodeModel>[]) as List<_i14.NodeModel>); @override - _i7.Future add(_i13.NodeModel? node, String? password, + _i8.Future add(_i14.NodeModel? node, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#add, [node, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future delete(String? id, bool? shouldNotifyListeners) => (super + _i8.Future delete(String? id, bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future setEnabledState( + _i8.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #setEnabledState, [id, enabled, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future edit(_i13.NodeModel? editedNode, String? password, + _i8.Future edit(_i14.NodeModel? editedNode, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #edit, [editedNode, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future updateCommunityNodes() => + _i8.Future updateCommunityNodes() => (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - void addListener(_i10.VoidCallback? listener) => + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i10.VoidCallback? listener) => + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart index 32b3e9c87..b12808703 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart @@ -2,17 +2,19 @@ // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.dart. // Do not manually edit this file. -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; -import 'package:decimal/decimal.dart' as _i4; +import 'package:decimal/decimal.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/models/models.dart' as _i3; -import 'package:stackwallet/models/node_model.dart' as _i6; -import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i10; -import 'package:stackwallet/services/node_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; +import 'package:stackwallet/models/models.dart' as _i4; +import 'package:stackwallet/models/node_model.dart' as _i7; +import 'package:stackwallet/services/coins/coin_service.dart' as _i3; +import 'package:stackwallet/services/coins/manager.dart' as _i11; +import 'package:stackwallet/services/node_service.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -24,39 +26,47 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake + implements _i2.FlutterSecureStorageInterface {} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} + +class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i5.NodeService { +class MockNodeService extends _i1.Mock implements _i6.NodeService { @override - List<_i6.NodeModel> get primaryNodes => + _i2.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod(Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0()) + as _i2.FlutterSecureStorageInterface); + @override + List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i6.NodeModel>[]) as List<_i6.NodeModel>); + returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); @override - List<_i6.NodeModel> get nodes => + List<_i7.NodeModel> get nodes => (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i6.NodeModel>[]) as List<_i6.NodeModel>); + returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i7.Future updateDefaults() => + _i8.Future updateDefaults() => (super.noSuchMethod(Invocation.method(#updateDefaults, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future setPrimaryNodeFor( - {_i8.Coin? coin, - _i6.NodeModel? node, + _i8.Future setPrimaryNodeFor( + {_i9.Coin? coin, + _i7.NodeModel? node, bool? shouldNotifyListeners = false}) => (super.noSuchMethod( Invocation.method(#setPrimaryNodeFor, [], { @@ -65,62 +75,62 @@ class MockNodeService extends _i1.Mock implements _i5.NodeService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i6.NodeModel? getPrimaryNodeFor({_i8.Coin? coin}) => (super.noSuchMethod( + _i7.NodeModel? getPrimaryNodeFor({_i9.Coin? coin}) => (super.noSuchMethod( Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i6.NodeModel?); + as _i7.NodeModel?); @override - List<_i6.NodeModel> getNodesFor(_i8.Coin? coin) => + List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i6.NodeModel>[]) as List<_i6.NodeModel>); + returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); @override - _i6.NodeModel? getNodeById({String? id}) => + _i7.NodeModel? getNodeById({String? id}) => (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i6.NodeModel?); + as _i7.NodeModel?); @override - List<_i6.NodeModel> failoverNodesFor({_i8.Coin? coin}) => (super.noSuchMethod( + List<_i7.NodeModel> failoverNodesFor({_i9.Coin? coin}) => (super.noSuchMethod( Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i6.NodeModel>[]) as List<_i6.NodeModel>); + returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); @override - _i7.Future add( - _i6.NodeModel? node, String? password, bool? shouldNotifyListeners) => + _i8.Future add( + _i7.NodeModel? node, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#add, [node, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future delete(String? id, bool? shouldNotifyListeners) => (super + _i8.Future delete(String? id, bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future setEnabledState( + _i8.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #setEnabledState, [id, enabled, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future edit(_i6.NodeModel? editedNode, String? password, + _i8.Future edit(_i7.NodeModel? editedNode, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #edit, [editedNode, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future updateCommunityNodes() => + _i8.Future updateCommunityNodes() => (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i9.VoidCallback? listener) => + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override @@ -135,7 +145,7 @@ class MockNodeService extends _i1.Mock implements _i5.NodeService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i10.Manager { +class MockManager extends _i1.Mock implements _i11.Manager { @override bool get isActiveWallet => (super .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) @@ -145,16 +155,16 @@ class MockManager extends _i1.Mock implements _i10.Manager { super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), returnValueForMissingStub: null); @override - _i2.CoinServiceAPI get wallet => + _i3.CoinServiceAPI get wallet => (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); + returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), returnValue: false) as bool); @override - _i8.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i8.Coin.bitcoin) as _i8.Coin); + _i9.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), + returnValue: _i9.Coin.bitcoin) as _i9.Coin); @override bool get isRefreshing => (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) @@ -176,61 +186,61 @@ class MockManager extends _i1.Mock implements _i10.Manager { super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), returnValueForMissingStub: null); @override - _i7.Future<_i3.FeeObject> get fees => + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); + returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) + as _i8.Future<_i4.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); + _i8.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), + returnValue: Future.value(0)) as _i8.Future); @override - _i7.Future get currentReceivingAddress => + _i8.Future get currentReceivingAddress => (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); + returnValue: Future.value('')) as _i8.Future); @override - _i7.Future<_i4.Decimal> get availableBalance => + _i8.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i8.Future<_i5.Decimal>); @override - _i4.Decimal get cachedAvailableBalance => + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); + returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i7.Future<_i4.Decimal> get pendingBalance => + _i8.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i8.Future<_i5.Decimal>); @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => + _i8.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i8.Future<_i5.Decimal>); @override - _i7.Future<_i4.Decimal> get totalBalance => + _i8.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i8.Future<_i5.Decimal>); @override - _i4.Decimal get cachedTotalBalance => + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); + returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i7.Future> get allOwnAddresses => + _i8.Future> get allOwnAddresses => (super.noSuchMethod(Invocation.getter(#allOwnAddresses), returnValue: Future>.value([])) - as _i7.Future>); + as _i8.Future>); @override - _i7.Future<_i3.TransactionData> get transactionData => + _i8.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod(Invocation.getter(#transactionData), returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + Future<_i4.TransactionData>.value(_FakeTransactionData_4())) + as _i8.Future<_i4.TransactionData>); @override - _i7.Future> get unspentOutputs => (super.noSuchMethod( + _i8.Future> get unspentOutputs => (super.noSuchMethod( Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); + returnValue: Future>.value(<_i4.UtxoObject>[])) + as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod(Invocation.setter(#walletName, newName), @@ -244,10 +254,10 @@ class MockManager extends _i1.Mock implements _i10.Manager { (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') as String); @override - _i7.Future> get mnemonic => + _i8.Future> get mnemonic => (super.noSuchMethod(Invocation.getter(#mnemonic), returnValue: Future>.value([])) - as _i7.Future>); + as _i8.Future>); @override bool get isConnected => (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) @@ -257,15 +267,15 @@ class MockManager extends _i1.Mock implements _i10.Manager { (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - _i7.Future> prepareSend( + _i8.Future> prepareSend( {String? address, int? satoshiAmount, Map? args}) => (super.noSuchMethod( Invocation.method(#prepareSend, [], { @@ -275,45 +285,45 @@ class MockManager extends _i1.Mock implements _i10.Manager { }), returnValue: Future>.value({})) - as _i7.Future>); + as _i8.Future>); @override - _i7.Future confirmSend({Map? txData}) => (super + _i8.Future confirmSend({Map? txData}) => (super .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); + returnValue: Future.value('')) as _i8.Future); @override - _i7.Future send( + _i8.Future send( {String? toAddress, int? amount, Map? args = const {}}) => (super.noSuchMethod( Invocation.method( #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); + returnValue: Future.value('')) as _i8.Future); @override - _i7.Future refresh() => + _i8.Future refresh() => (super.noSuchMethod(Invocation.method(#refresh, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod(Invocation.method(#validateAddress, [address]), returnValue: false) as bool); @override - _i7.Future testNetworkConnection() => + _i8.Future testNetworkConnection() => (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); + returnValue: Future.value(false)) as _i8.Future); @override - _i7.Future initializeNew() => + _i8.Future initializeNew() => (super.noSuchMethod(Invocation.method(#initializeNew, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future initializeExisting() => + _i8.Future initializeExisting() => (super.noSuchMethod(Invocation.method(#initializeExisting, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future recoverFromMnemonic( + _i8.Future recoverFromMnemonic( {String? mnemonic, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, @@ -326,35 +336,35 @@ class MockManager extends _i1.Mock implements _i10.Manager { #height: height }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future exitCurrentWallet() => + _i8.Future exitCurrentWallet() => (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => (super.noSuchMethod( Invocation.method( #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future isOwnAddress(String? address) => + _i8.Future isOwnAddress(String? address) => (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); + returnValue: Future.value(false)) as _i8.Future); @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => (super.noSuchMethod( Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); + returnValue: Future.value(0)) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i9.VoidCallback? listener) => + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart index af16b5594..ca45f0303 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart @@ -2,17 +2,19 @@ // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.dart. // Do not manually edit this file. -import 'dart:async' as _i7; -import 'dart:ui' as _i9; +import 'dart:async' as _i8; +import 'dart:ui' as _i10; -import 'package:decimal/decimal.dart' as _i4; +import 'package:decimal/decimal.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/models/models.dart' as _i3; -import 'package:stackwallet/models/node_model.dart' as _i6; -import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i10; -import 'package:stackwallet/services/node_service.dart' as _i5; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; +import 'package:stackwallet/models/models.dart' as _i4; +import 'package:stackwallet/models/node_model.dart' as _i7; +import 'package:stackwallet/services/coins/coin_service.dart' as _i3; +import 'package:stackwallet/services/coins/manager.dart' as _i11; +import 'package:stackwallet/services/node_service.dart' as _i6; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -24,39 +26,47 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake + implements _i2.FlutterSecureStorageInterface {} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} + +class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i5.NodeService { +class MockNodeService extends _i1.Mock implements _i6.NodeService { @override - List<_i6.NodeModel> get primaryNodes => + _i2.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod(Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0()) + as _i2.FlutterSecureStorageInterface); + @override + List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i6.NodeModel>[]) as List<_i6.NodeModel>); + returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); @override - List<_i6.NodeModel> get nodes => + List<_i7.NodeModel> get nodes => (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i6.NodeModel>[]) as List<_i6.NodeModel>); + returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i7.Future updateDefaults() => + _i8.Future updateDefaults() => (super.noSuchMethod(Invocation.method(#updateDefaults, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future setPrimaryNodeFor( - {_i8.Coin? coin, - _i6.NodeModel? node, + _i8.Future setPrimaryNodeFor( + {_i9.Coin? coin, + _i7.NodeModel? node, bool? shouldNotifyListeners = false}) => (super.noSuchMethod( Invocation.method(#setPrimaryNodeFor, [], { @@ -65,62 +75,62 @@ class MockNodeService extends _i1.Mock implements _i5.NodeService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i6.NodeModel? getPrimaryNodeFor({_i8.Coin? coin}) => (super.noSuchMethod( + _i7.NodeModel? getPrimaryNodeFor({_i9.Coin? coin}) => (super.noSuchMethod( Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i6.NodeModel?); + as _i7.NodeModel?); @override - List<_i6.NodeModel> getNodesFor(_i8.Coin? coin) => + List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i6.NodeModel>[]) as List<_i6.NodeModel>); + returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); @override - _i6.NodeModel? getNodeById({String? id}) => + _i7.NodeModel? getNodeById({String? id}) => (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i6.NodeModel?); + as _i7.NodeModel?); @override - List<_i6.NodeModel> failoverNodesFor({_i8.Coin? coin}) => (super.noSuchMethod( + List<_i7.NodeModel> failoverNodesFor({_i9.Coin? coin}) => (super.noSuchMethod( Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i6.NodeModel>[]) as List<_i6.NodeModel>); + returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); @override - _i7.Future add( - _i6.NodeModel? node, String? password, bool? shouldNotifyListeners) => + _i8.Future add( + _i7.NodeModel? node, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#add, [node, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future delete(String? id, bool? shouldNotifyListeners) => (super + _i8.Future delete(String? id, bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future setEnabledState( + _i8.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #setEnabledState, [id, enabled, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future edit(_i6.NodeModel? editedNode, String? password, + _i8.Future edit(_i7.NodeModel? editedNode, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #edit, [editedNode, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future updateCommunityNodes() => + _i8.Future updateCommunityNodes() => (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i9.VoidCallback? listener) => + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override @@ -135,7 +145,7 @@ class MockNodeService extends _i1.Mock implements _i5.NodeService { /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i10.Manager { +class MockManager extends _i1.Mock implements _i11.Manager { @override bool get isActiveWallet => (super .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) @@ -145,16 +155,16 @@ class MockManager extends _i1.Mock implements _i10.Manager { super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), returnValueForMissingStub: null); @override - _i2.CoinServiceAPI get wallet => + _i3.CoinServiceAPI get wallet => (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); + returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); @override bool get hasBackgroundRefreshListener => (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), returnValue: false) as bool); @override - _i8.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i8.Coin.bitcoin) as _i8.Coin); + _i9.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), + returnValue: _i9.Coin.bitcoin) as _i9.Coin); @override bool get isRefreshing => (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) @@ -176,61 +186,61 @@ class MockManager extends _i1.Mock implements _i10.Manager { super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), returnValueForMissingStub: null); @override - _i7.Future<_i3.FeeObject> get fees => + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); + returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) + as _i8.Future<_i4.FeeObject>); @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); + _i8.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), + returnValue: Future.value(0)) as _i8.Future); @override - _i7.Future get currentReceivingAddress => + _i8.Future get currentReceivingAddress => (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); + returnValue: Future.value('')) as _i8.Future); @override - _i7.Future<_i4.Decimal> get availableBalance => + _i8.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i8.Future<_i5.Decimal>); @override - _i4.Decimal get cachedAvailableBalance => + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); + returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i7.Future<_i4.Decimal> get pendingBalance => + _i8.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i8.Future<_i5.Decimal>); @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => + _i8.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i8.Future<_i5.Decimal>); @override - _i7.Future<_i4.Decimal> get totalBalance => + _i8.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); + returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) + as _i8.Future<_i5.Decimal>); @override - _i4.Decimal get cachedTotalBalance => + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); + returnValue: _FakeDecimal_3()) as _i5.Decimal); @override - _i7.Future> get allOwnAddresses => + _i8.Future> get allOwnAddresses => (super.noSuchMethod(Invocation.getter(#allOwnAddresses), returnValue: Future>.value([])) - as _i7.Future>); + as _i8.Future>); @override - _i7.Future<_i3.TransactionData> get transactionData => + _i8.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod(Invocation.getter(#transactionData), returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + Future<_i4.TransactionData>.value(_FakeTransactionData_4())) + as _i8.Future<_i4.TransactionData>); @override - _i7.Future> get unspentOutputs => (super.noSuchMethod( + _i8.Future> get unspentOutputs => (super.noSuchMethod( Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); + returnValue: Future>.value(<_i4.UtxoObject>[])) + as _i8.Future>); @override set walletName(String? newName) => super.noSuchMethod(Invocation.setter(#walletName, newName), @@ -244,10 +254,10 @@ class MockManager extends _i1.Mock implements _i10.Manager { (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') as String); @override - _i7.Future> get mnemonic => + _i8.Future> get mnemonic => (super.noSuchMethod(Invocation.getter(#mnemonic), returnValue: Future>.value([])) - as _i7.Future>); + as _i8.Future>); @override bool get isConnected => (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) @@ -257,15 +267,15 @@ class MockManager extends _i1.Mock implements _i10.Manager { (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i7.Future updateNode(bool? shouldRefresh) => + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @override - _i7.Future> prepareSend( + _i8.Future> prepareSend( {String? address, int? satoshiAmount, Map? args}) => (super.noSuchMethod( Invocation.method(#prepareSend, [], { @@ -275,45 +285,45 @@ class MockManager extends _i1.Mock implements _i10.Manager { }), returnValue: Future>.value({})) - as _i7.Future>); + as _i8.Future>); @override - _i7.Future confirmSend({Map? txData}) => (super + _i8.Future confirmSend({Map? txData}) => (super .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); + returnValue: Future.value('')) as _i8.Future); @override - _i7.Future send( + _i8.Future send( {String? toAddress, int? amount, Map? args = const {}}) => (super.noSuchMethod( Invocation.method( #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); + returnValue: Future.value('')) as _i8.Future); @override - _i7.Future refresh() => + _i8.Future refresh() => (super.noSuchMethod(Invocation.method(#refresh, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override bool validateAddress(String? address) => (super.noSuchMethod(Invocation.method(#validateAddress, [address]), returnValue: false) as bool); @override - _i7.Future testNetworkConnection() => + _i8.Future testNetworkConnection() => (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); + returnValue: Future.value(false)) as _i8.Future); @override - _i7.Future initializeNew() => + _i8.Future initializeNew() => (super.noSuchMethod(Invocation.method(#initializeNew, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future initializeExisting() => + _i8.Future initializeExisting() => (super.noSuchMethod(Invocation.method(#initializeExisting, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future recoverFromMnemonic( + _i8.Future recoverFromMnemonic( {String? mnemonic, int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck, @@ -326,35 +336,35 @@ class MockManager extends _i1.Mock implements _i10.Manager { #height: height }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future exitCurrentWallet() => + _i8.Future exitCurrentWallet() => (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future fullRescan( + _i8.Future fullRescan( int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => (super.noSuchMethod( Invocation.method( #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + returnValueForMissingStub: Future.value()) as _i8.Future); @override - _i7.Future isOwnAddress(String? address) => + _i8.Future isOwnAddress(String? address) => (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); + returnValue: Future.value(false)) as _i8.Future); @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => (super.noSuchMethod( Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); + returnValue: Future.value(0)) as _i8.Future); @override - void addListener(_i9.VoidCallback? listener) => + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i9.VoidCallback? listener) => + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart index 9ef361965..9daa9dec2 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart @@ -2,13 +2,15 @@ // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.dart. // Do not manually edit this file. -import 'dart:async' as _i4; -import 'dart:ui' as _i6; +import 'dart:async' as _i5; +import 'dart:ui' as _i7; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/models/node_model.dart' as _i3; -import 'package:stackwallet/services/node_service.dart' as _i2; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i5; +import 'package:stackwallet/models/node_model.dart' as _i4; +import 'package:stackwallet/services/node_service.dart' as _i3; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -20,31 +22,39 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i5; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake + implements _i2.FlutterSecureStorageInterface {} + /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i2.NodeService { +class MockNodeService extends _i1.Mock implements _i3.NodeService { @override - List<_i3.NodeModel> get primaryNodes => + _i2.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod(Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0()) + as _i2.FlutterSecureStorageInterface); + @override + List<_i4.NodeModel> get primaryNodes => (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i3.NodeModel>[]) as List<_i3.NodeModel>); + returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); @override - List<_i3.NodeModel> get nodes => + List<_i4.NodeModel> get nodes => (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i3.NodeModel>[]) as List<_i3.NodeModel>); + returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i4.Future updateDefaults() => + _i5.Future updateDefaults() => (super.noSuchMethod(Invocation.method(#updateDefaults, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future setPrimaryNodeFor( - {_i5.Coin? coin, - _i3.NodeModel? node, + _i5.Future setPrimaryNodeFor( + {_i6.Coin? coin, + _i4.NodeModel? node, bool? shouldNotifyListeners = false}) => (super.noSuchMethod( Invocation.method(#setPrimaryNodeFor, [], { @@ -53,62 +63,62 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i3.NodeModel? getPrimaryNodeFor({_i5.Coin? coin}) => (super.noSuchMethod( + _i4.NodeModel? getPrimaryNodeFor({_i6.Coin? coin}) => (super.noSuchMethod( Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i3.NodeModel?); + as _i4.NodeModel?); @override - List<_i3.NodeModel> getNodesFor(_i5.Coin? coin) => + List<_i4.NodeModel> getNodesFor(_i6.Coin? coin) => (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i3.NodeModel>[]) as List<_i3.NodeModel>); + returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); @override - _i3.NodeModel? getNodeById({String? id}) => + _i4.NodeModel? getNodeById({String? id}) => (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i3.NodeModel?); + as _i4.NodeModel?); @override - List<_i3.NodeModel> failoverNodesFor({_i5.Coin? coin}) => (super.noSuchMethod( + List<_i4.NodeModel> failoverNodesFor({_i6.Coin? coin}) => (super.noSuchMethod( Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i3.NodeModel>[]) as List<_i3.NodeModel>); + returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); @override - _i4.Future add( - _i3.NodeModel? node, String? password, bool? shouldNotifyListeners) => + _i5.Future add( + _i4.NodeModel? node, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#add, [node, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future delete(String? id, bool? shouldNotifyListeners) => (super + _i5.Future delete(String? id, bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future setEnabledState( + _i5.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #setEnabledState, [id, enabled, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future edit(_i3.NodeModel? editedNode, String? password, + _i5.Future edit(_i4.NodeModel? editedNode, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #edit, [editedNode, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future updateCommunityNodes() => + _i5.Future updateCommunityNodes() => (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - void addListener(_i6.VoidCallback? listener) => + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i6.VoidCallback? listener) => + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override diff --git a/test/services/coins/firo/firo_wallet_test.dart b/test/services/coins/firo/firo_wallet_test.dart index fe640ca02..ccb7ee98e 100644 --- a/test/services/coins/firo/firo_wallet_test.dart +++ b/test/services/coins/firo/firo_wallet_test.dart @@ -127,24 +127,24 @@ void main() { expect(result, 1); }); - test("isolateCreateJoinSplitTransaction success", () async { - final result = await isolateCreateJoinSplitTransaction( - 9000, - "aNmsUtzPzQ3SKWNjEH48GacMQJXWN5Rotm", - true, - TEST_MNEMONIC, - 2, - Decimal.ten, - SampleLelantus.lelantusEntries, - 459185, - Coin.firo, - firoNetwork, - [GetAnonymitySetSampleData.data], - "en_US", - ); - - expect(result, isA>()); - }); + // test("isolateCreateJoinSplitTransaction success", () async { + // final result = await isolateCreateJoinSplitTransaction( + // 9000, + // "aNmsUtzPzQ3SKWNjEH48GacMQJXWN5Rotm", + // true, + // TEST_MNEMONIC, + // 2, + // Decimal.ten, + // SampleLelantus.lelantusEntries, + // 459185, + // Coin.firo, + // firoNetwork, + // [GetAnonymitySetSampleData.data], + // "en_US", + // ); + // + // expect(result, isA>()); + // }); test("isolateEstimateJoinSplitFee", () async { final result = await isolateEstimateJoinSplitFee( diff --git a/test/services/coins/manager_test.mocks.dart b/test/services/coins/manager_test.mocks.dart index 6ff5f5cde..b582f3a88 100644 --- a/test/services/coins/manager_test.mocks.dart +++ b/test/services/coins/manager_test.mocks.dart @@ -386,6 +386,14 @@ class MockFiroWallet extends _i1.Mock implements _i7.FiroWallet { returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i8.Future); @override + _i8.Future GetCoinsToJoinSplit(int? required) => + (super.noSuchMethod(Invocation.method(#GetCoinsToJoinSplit, [required]), + returnValue: Future.value()) as _i8.Future); + @override + _i8.Future EstimateJoinSplitFee(int? spendAmount) => (super.noSuchMethod( + Invocation.method(#EstimateJoinSplitFee, [spendAmount]), + returnValue: Future.value(0)) as _i8.Future); + @override _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => (super.noSuchMethod( Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), diff --git a/test/widget_tests/node_card_test.mocks.dart b/test/widget_tests/node_card_test.mocks.dart index 96a6653ee..87e349786 100644 --- a/test/widget_tests/node_card_test.mocks.dart +++ b/test/widget_tests/node_card_test.mocks.dart @@ -2,13 +2,15 @@ // in stackwallet/test/widget_tests/node_card_test.dart. // Do not manually edit this file. -import 'dart:async' as _i4; -import 'dart:ui' as _i6; +import 'dart:async' as _i5; +import 'dart:ui' as _i7; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/models/node_model.dart' as _i3; -import 'package:stackwallet/services/node_service.dart' as _i2; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i5; +import 'package:stackwallet/models/node_model.dart' as _i4; +import 'package:stackwallet/services/node_service.dart' as _i3; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i2; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -20,31 +22,39 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i5; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake + implements _i2.FlutterSecureStorageInterface {} + /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNodeService extends _i1.Mock implements _i2.NodeService { +class MockNodeService extends _i1.Mock implements _i3.NodeService { @override - List<_i3.NodeModel> get primaryNodes => + _i2.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod(Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0()) + as _i2.FlutterSecureStorageInterface); + @override + List<_i4.NodeModel> get primaryNodes => (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i3.NodeModel>[]) as List<_i3.NodeModel>); + returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); @override - List<_i3.NodeModel> get nodes => + List<_i4.NodeModel> get nodes => (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i3.NodeModel>[]) as List<_i3.NodeModel>); + returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); @override bool get hasListeners => (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool); @override - _i4.Future updateDefaults() => + _i5.Future updateDefaults() => (super.noSuchMethod(Invocation.method(#updateDefaults, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future setPrimaryNodeFor( - {_i5.Coin? coin, - _i3.NodeModel? node, + _i5.Future setPrimaryNodeFor( + {_i6.Coin? coin, + _i4.NodeModel? node, bool? shouldNotifyListeners = false}) => (super.noSuchMethod( Invocation.method(#setPrimaryNodeFor, [], { @@ -53,62 +63,62 @@ class MockNodeService extends _i1.Mock implements _i2.NodeService { #shouldNotifyListeners: shouldNotifyListeners }), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i3.NodeModel? getPrimaryNodeFor({_i5.Coin? coin}) => (super.noSuchMethod( + _i4.NodeModel? getPrimaryNodeFor({_i6.Coin? coin}) => (super.noSuchMethod( Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i3.NodeModel?); + as _i4.NodeModel?); @override - List<_i3.NodeModel> getNodesFor(_i5.Coin? coin) => + List<_i4.NodeModel> getNodesFor(_i6.Coin? coin) => (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i3.NodeModel>[]) as List<_i3.NodeModel>); + returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); @override - _i3.NodeModel? getNodeById({String? id}) => + _i4.NodeModel? getNodeById({String? id}) => (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i3.NodeModel?); + as _i4.NodeModel?); @override - List<_i3.NodeModel> failoverNodesFor({_i5.Coin? coin}) => (super.noSuchMethod( + List<_i4.NodeModel> failoverNodesFor({_i6.Coin? coin}) => (super.noSuchMethod( Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i3.NodeModel>[]) as List<_i3.NodeModel>); + returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); @override - _i4.Future add( - _i3.NodeModel? node, String? password, bool? shouldNotifyListeners) => + _i5.Future add( + _i4.NodeModel? node, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method(#add, [node, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future delete(String? id, bool? shouldNotifyListeners) => (super + _i5.Future delete(String? id, bool? shouldNotifyListeners) => (super .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future setEnabledState( + _i5.Future setEnabledState( String? id, bool? enabled, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #setEnabledState, [id, enabled, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future edit(_i3.NodeModel? editedNode, String? password, + _i5.Future edit(_i4.NodeModel? editedNode, String? password, bool? shouldNotifyListeners) => (super.noSuchMethod( Invocation.method( #edit, [editedNode, password, shouldNotifyListeners]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - _i4.Future updateCommunityNodes() => + _i5.Future updateCommunityNodes() => (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i5.Future); @override - void addListener(_i6.VoidCallback? listener) => + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i6.VoidCallback? listener) => + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override