diff --git a/lib/models/isar/models/blockchain_data/address.g.dart b/lib/models/isar/models/blockchain_data/address.g.dart index 092198990..340ab9f1b 100644 --- a/lib/models/isar/models/blockchain_data/address.g.dart +++ b/lib/models/isar/models/blockchain_data/address.g.dart @@ -278,6 +278,7 @@ const _AddresstypeEnumValueMap = { 'frostMS': 13, 'p2tr': 14, 'solana': 15, + 'cardanoShelley': 16, }; const _AddresstypeValueEnumMap = { 0: AddressType.p2pkh, @@ -296,6 +297,7 @@ const _AddresstypeValueEnumMap = { 13: AddressType.frostMS, 14: AddressType.p2tr, 15: AddressType.solana, + 16: AddressType.cardanoShelley, }; Id _addressGetId(Address object) { diff --git a/lib/wallets/isar/models/wallet_info.g.dart b/lib/wallets/isar/models/wallet_info.g.dart index 89c5511fa..6e02fd6d5 100644 --- a/lib/wallets/isar/models/wallet_info.g.dart +++ b/lib/wallets/isar/models/wallet_info.g.dart @@ -268,6 +268,7 @@ const _WalletInfomainAddressTypeEnumValueMap = { 'frostMS': 13, 'p2tr': 14, 'solana': 15, + 'cardanoShelley': 16, }; const _WalletInfomainAddressTypeValueEnumMap = { 0: AddressType.p2pkh, @@ -286,6 +287,7 @@ const _WalletInfomainAddressTypeValueEnumMap = { 13: AddressType.frostMS, 14: AddressType.p2tr, 15: AddressType.solana, + 16: AddressType.cardanoShelley, }; Id _walletInfoGetId(WalletInfo object) { diff --git a/test/cached_electrumx_test.mocks.dart b/test/cached_electrumx_test.mocks.dart index 25324b805..a5c7c4c54 100644 --- a/test/cached_electrumx_test.mocks.dart +++ b/test/cached_electrumx_test.mocks.dart @@ -3,21 +3,23 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i7; -import 'dart:ui' as _i12; +import 'dart:async' as _i9; +import 'dart:ui' as _i14; -import 'package:decimal/decimal.dart' as _i3; +import 'package:decimal/decimal.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i6; -import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i5; -import 'package:stackwallet/utilities/amount/amount_unit.dart' as _i11; -import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i10; -import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i9; -import 'package:stackwallet/utilities/prefs.dart' as _i8; +import 'package:mockito/src/dummies.dart' as _i8; +import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i6; +import 'package:stackwallet/models/electrumx_response/spark_models.dart' as _i3; +import 'package:stackwallet/utilities/amount/amount_unit.dart' as _i13; +import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i12; +import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i11; +import 'package:stackwallet/utilities/prefs.dart' as _i10; +import 'package:stackwallet/utilities/tor_plain_net_option_enum.dart' as _i7; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i2; import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/cash_fusion_interface.dart' - as _i4; + as _i5; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -53,8 +55,9 @@ class _FakeDuration_1 extends _i1.SmartFake implements Duration { ); } -class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { - _FakeDecimal_2( +class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake + implements _i3.SparkAnonymitySetMeta { + _FakeSparkAnonymitySetMeta_2( Object parent, Invocation parentInvocation, ) : super( @@ -63,8 +66,18 @@ class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { ); } -class _FakeFusionInfo_3 extends _i1.SmartFake implements _i4.FusionInfo { - _FakeFusionInfo_3( +class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFusionInfo_4 extends _i1.SmartFake implements _i5.FusionInfo { + _FakeFusionInfo_4( Object parent, Invocation parentInvocation, ) : super( @@ -76,7 +89,7 @@ class _FakeFusionInfo_3 extends _i1.SmartFake implements _i4.FusionInfo { /// A class which mocks [ElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. -class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { +class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { MockElectrumXClient() { _i1.throwOnMissingStub(this); } @@ -90,6 +103,12 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { ), ) as _i2.CryptoCurrency); + @override + _i7.TorPlainNetworkOption get netType => (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i7.TorPlainNetworkOption.tor, + ) as _i7.TorPlainNetworkOption); + @override int get currentFailoverIndex => (super.noSuchMethod( Invocation.getter(#currentFailoverIndex), @@ -118,7 +137,7 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { @override String get host => (super.noSuchMethod( Invocation.getter(#host), - returnValue: _i6.dummyValue( + returnValue: _i8.dummyValue( this, Invocation.getter(#host), ), @@ -137,27 +156,27 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { ) as bool); @override - _i7.Future closeAdapter() => (super.noSuchMethod( + _i9.Future closeAdapter() => (super.noSuchMethod( Invocation.method( #closeAdapter, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i7.Future checkElectrumAdapter() => (super.noSuchMethod( + _i9.Future checkElectrumAdapter() => (super.noSuchMethod( Invocation.method( #checkElectrumAdapter, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i7.Future request({ + _i9.Future request({ required String? command, List? args = const [], String? requestID, @@ -176,11 +195,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #requestTimeout: requestTimeout, }, ), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override - _i7.Future> batchRequest({ + _i9.Future> batchRequest({ required String? command, required List? args, Duration? requestTimeout = const Duration(seconds: 60), @@ -197,11 +216,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #retries: retries, }, ), - returnValue: _i7.Future>.value([]), - ) as _i7.Future>); + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); @override - _i7.Future ping({ + _i9.Future ping({ String? requestID, int? retryCount = 1, }) => @@ -214,11 +233,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #retryCount: retryCount, }, ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i7.Future> getBlockHeadTip({String? requestID}) => + _i9.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( Invocation.method( #getBlockHeadTip, @@ -226,11 +245,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i7.Future> getServerFeatures({String? requestID}) => + _i9.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( Invocation.method( #getServerFeatures, @@ -238,11 +257,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i7.Future broadcastTransaction({ + _i9.Future broadcastTransaction({ required String? rawTx, String? requestID, }) => @@ -255,7 +274,7 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i7.Future.value(_i6.dummyValue( + returnValue: _i9.Future.value(_i8.dummyValue( this, Invocation.method( #broadcastTransaction, @@ -266,10 +285,10 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { }, ), )), - ) as _i7.Future); + ) as _i9.Future); @override - _i7.Future> getBalance({ + _i9.Future> getBalance({ required String? scripthash, String? requestID, }) => @@ -283,11 +302,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i7.Future>> getHistory({ + _i9.Future>> getHistory({ required String? scripthash, String? requestID, }) => @@ -300,12 +319,12 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i7.Future>>.value( + returnValue: _i9.Future>>.value( >[]), - ) as _i7.Future>>); + ) as _i9.Future>>); @override - _i7.Future>>> getBatchHistory( + _i9.Future>>> getBatchHistory( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -313,12 +332,12 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { [], {#args: args}, ), - returnValue: _i7.Future>>>.value( + returnValue: _i9.Future>>>.value( >>[]), - ) as _i7.Future>>>); + ) as _i9.Future>>>); @override - _i7.Future>> getUTXOs({ + _i9.Future>> getUTXOs({ required String? scripthash, String? requestID, }) => @@ -331,12 +350,12 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i7.Future>>.value( + returnValue: _i9.Future>>.value( >[]), - ) as _i7.Future>>); + ) as _i9.Future>>); @override - _i7.Future>>> getBatchUTXOs( + _i9.Future>>> getBatchUTXOs( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -344,12 +363,12 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { [], {#args: args}, ), - returnValue: _i7.Future>>>.value( + returnValue: _i9.Future>>>.value( >>[]), - ) as _i7.Future>>>); + ) as _i9.Future>>>); @override - _i7.Future> getTransaction({ + _i9.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, @@ -365,11 +384,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i7.Future> getLelantusAnonymitySet({ + _i9.Future> getLelantusAnonymitySet({ String? groupId = r'1', String? blockhash = r'', String? requestID, @@ -385,11 +404,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i7.Future getLelantusMintData({ + _i9.Future getLelantusMintData({ dynamic mints, String? requestID, }) => @@ -402,11 +421,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i9.Future.value(), + ) as _i9.Future); @override - _i7.Future> getLelantusUsedCoinSerials({ + _i9.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, }) => @@ -420,22 +439,22 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i7.Future getLelantusLatestCoinId({String? requestID}) => + _i9.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getLelantusLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i7.Future> getSparkAnonymitySet({ + _i9.Future> getSparkAnonymitySet({ String? coinGroupId = r'1', String? startBlockHash = r'', String? requestID, @@ -451,58 +470,33 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { }, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i7.Future>> getSparkMintMetaData({ - String? requestID, - required List? sparkCoinHashes, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkMintMetaData, - [], - { - #requestID: requestID, - #sparkCoinHashes: sparkCoinHashes, - }, - ), - returnValue: _i7.Future>>.value( - >[]), - ) as _i7.Future>>); - - @override - _i7.Future getSparkLatestCoinId({String? requestID}) => + _i9.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getSparkLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i7.Future.value(0), - ) as _i7.Future); + returnValue: _i9.Future.value(0), + ) as _i9.Future); @override - _i7.Future> getMempoolTxids({String? requestID}) => + _i9.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( Invocation.method( #getMempoolTxids, [], {#requestID: requestID}, ), - returnValue: _i7.Future>.value({}), - ) as _i7.Future>); + returnValue: _i9.Future>.value({}), + ) as _i9.Future>); @override - _i7.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>> getMempoolSparkData({ + _i9.Future> getMempoolSparkData({ String? requestID, required List? txids, }) => @@ -515,30 +509,12 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #txids: txids, }, ), - returnValue: _i7.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>.value(<({ - List coins, - List lTags, - List serialContext, - String txid - })>[]), - ) as _i7.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>); + returnValue: _i9.Future>.value( + <_i3.SparkMempoolData>[]), + ) as _i9.Future>); @override - _i7.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ + _i9.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, }) => @@ -551,11 +527,62 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #startNumber: startNumber, }, ), - returnValue: _i7.Future>>.value(>[]), - ) as _i7.Future>>); + returnValue: _i9.Future>>.value(>[]), + ) as _i9.Future>>); @override - _i7.Future isMasterNodeCollateral({ + _i9.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ + String? requestID, + required int? coinGroupId, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + returnValue: _i9.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + )), + ) as _i9.Future<_i3.SparkAnonymitySetMeta>); + + @override + _i9.Future> getSparkAnonymitySetBySector({ + String? requestID, + required int? coinGroupId, + required String? latestBlock, + required int? startIndex, + required int? endIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetBySector, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }, + ), + returnValue: _i9.Future>.value([]), + ) as _i9.Future>); + + @override + _i9.Future isMasterNodeCollateral({ String? requestID, required String? txid, required int? index, @@ -570,11 +597,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #index: index, }, ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i7.Future> getFeeRate({String? requestID}) => + _i9.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( Invocation.method( #getFeeRate, @@ -582,11 +609,11 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i7.Future>.value({}), - ) as _i7.Future>); + _i9.Future>.value({}), + ) as _i9.Future>); @override - _i7.Future<_i3.Decimal> estimateFee({ + _i9.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, }) => @@ -599,7 +626,7 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { #blocks: blocks, }, ), - returnValue: _i7.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i9.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #estimateFee, @@ -610,16 +637,16 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { }, ), )), - ) as _i7.Future<_i3.Decimal>); + ) as _i9.Future<_i4.Decimal>); @override - _i7.Future<_i3.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( + _i9.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( Invocation.method( #relayFee, [], {#requestID: requestID}, ), - returnValue: _i7.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i9.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #relayFee, @@ -627,13 +654,13 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { {#requestID: requestID}, ), )), - ) as _i7.Future<_i3.Decimal>); + ) as _i9.Future<_i4.Decimal>); } /// A class which mocks [Prefs]. /// /// See the documentation for Mockito's code generation for more information. -class MockPrefs extends _i1.Mock implements _i8.Prefs { +class MockPrefs extends _i1.Mock implements _i10.Prefs { MockPrefs() { _i1.throwOnMissingStub(this); } @@ -697,13 +724,13 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { ); @override - _i9.SyncingType get syncType => (super.noSuchMethod( + _i11.SyncingType get syncType => (super.noSuchMethod( Invocation.getter(#syncType), - returnValue: _i9.SyncingType.currentWalletOnly, - ) as _i9.SyncingType); + returnValue: _i11.SyncingType.currentWalletOnly, + ) as _i11.SyncingType); @override - set syncType(_i9.SyncingType? syncType) => super.noSuchMethod( + set syncType(_i11.SyncingType? syncType) => super.noSuchMethod( Invocation.setter( #syncType, syncType, @@ -744,7 +771,7 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { @override String get language => (super.noSuchMethod( Invocation.getter(#language), - returnValue: _i6.dummyValue( + returnValue: _i8.dummyValue( this, Invocation.getter(#language), ), @@ -762,7 +789,7 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { @override String get currency => (super.noSuchMethod( Invocation.getter(#currency), - returnValue: _i6.dummyValue( + returnValue: _i8.dummyValue( this, Invocation.getter(#currency), ), @@ -892,13 +919,13 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { ); @override - _i10.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + _i12.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( Invocation.getter(#backupFrequencyType), - returnValue: _i10.BackupFrequencyType.everyTenMinutes, - ) as _i10.BackupFrequencyType); + returnValue: _i12.BackupFrequencyType.everyTenMinutes, + ) as _i12.BackupFrequencyType); @override - set backupFrequencyType(_i10.BackupFrequencyType? backupFrequencyType) => + set backupFrequencyType(_i12.BackupFrequencyType? backupFrequencyType) => super.noSuchMethod( Invocation.setter( #backupFrequencyType, @@ -1005,7 +1032,7 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { @override String get themeId => (super.noSuchMethod( Invocation.getter(#themeId), - returnValue: _i6.dummyValue( + returnValue: _i8.dummyValue( this, Invocation.getter(#themeId), ), @@ -1023,7 +1050,7 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { @override String get systemBrightnessLightThemeId => (super.noSuchMethod( Invocation.getter(#systemBrightnessLightThemeId), - returnValue: _i6.dummyValue( + returnValue: _i8.dummyValue( this, Invocation.getter(#systemBrightnessLightThemeId), ), @@ -1042,7 +1069,7 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { @override String get systemBrightnessDarkThemeId => (super.noSuchMethod( Invocation.getter(#systemBrightnessDarkThemeId), - returnValue: _i6.dummyValue( + returnValue: _i8.dummyValue( this, Invocation.getter(#systemBrightnessDarkThemeId), ), @@ -1110,67 +1137,67 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { ) as bool); @override - _i7.Future init() => (super.noSuchMethod( + _i9.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i7.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( + _i9.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( Invocation.method( #incrementCurrentNotificationIndex, [], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i7.Future isExternalCallsSet() => (super.noSuchMethod( + _i9.Future isExternalCallsSet() => (super.noSuchMethod( Invocation.method( #isExternalCallsSet, [], ), - returnValue: _i7.Future.value(false), - ) as _i7.Future); + returnValue: _i9.Future.value(false), + ) as _i9.Future); @override - _i7.Future saveUserID(String? userId) => (super.noSuchMethod( + _i9.Future saveUserID(String? userId) => (super.noSuchMethod( Invocation.method( #saveUserID, [userId], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i7.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( + _i9.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( Invocation.method( #saveSignupEpoch, [signupEpoch], ), - returnValue: _i7.Future.value(), - returnValueForMissingStub: _i7.Future.value(), - ) as _i7.Future); + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); @override - _i11.AmountUnit amountUnit(_i2.CryptoCurrency? coin) => (super.noSuchMethod( + _i13.AmountUnit amountUnit(_i2.CryptoCurrency? coin) => (super.noSuchMethod( Invocation.method( #amountUnit, [coin], ), - returnValue: _i11.AmountUnit.normal, - ) as _i11.AmountUnit); + returnValue: _i13.AmountUnit.normal, + ) as _i13.AmountUnit); @override void updateAmountUnit({ required _i2.CryptoCurrency? coin, - required _i11.AmountUnit? amountUnit, + required _i13.AmountUnit? amountUnit, }) => super.noSuchMethod( Invocation.method( @@ -1211,25 +1238,25 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { ); @override - _i4.FusionInfo getFusionServerInfo(_i2.CryptoCurrency? coin) => + _i5.FusionInfo getFusionServerInfo(_i2.CryptoCurrency? coin) => (super.noSuchMethod( Invocation.method( #getFusionServerInfo, [coin], ), - returnValue: _FakeFusionInfo_3( + returnValue: _FakeFusionInfo_4( this, Invocation.method( #getFusionServerInfo, [coin], ), ), - ) as _i4.FusionInfo); + ) as _i5.FusionInfo); @override void setFusionServerInfo( _i2.CryptoCurrency? coin, - _i4.FusionInfo? fusionServerInfo, + _i5.FusionInfo? fusionServerInfo, ) => super.noSuchMethod( Invocation.method( @@ -1243,7 +1270,7 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { ); @override - void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -1252,7 +1279,7 @@ class MockPrefs extends _i1.Mock implements _i8.Prefs { ); @override - void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], diff --git a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart index 75fc2228a..a36aefef0 100644 --- a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart +++ b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart @@ -3,15 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; +import 'dart:async' as _i8; -import 'package:decimal/decimal.dart' as _i3; +import 'package:decimal/decimal.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i5; -import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i7; -import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i4; +import 'package:mockito/src/dummies.dart' as _i7; +import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i9; +import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i5; +import 'package:stackwallet/models/electrumx_response/spark_models.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' - as _i8; + as _i10; +import 'package:stackwallet/utilities/tor_plain_net_option_enum.dart' as _i6; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i2; @@ -49,8 +51,9 @@ class _FakeDuration_1 extends _i1.SmartFake implements Duration { ); } -class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { - _FakeDecimal_2( +class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake + implements _i3.SparkAnonymitySetMeta { + _FakeSparkAnonymitySetMeta_2( Object parent, Invocation parentInvocation, ) : super( @@ -59,9 +62,19 @@ class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { ); } -class _FakeElectrumXClient_3 extends _i1.SmartFake - implements _i4.ElectrumXClient { - _FakeElectrumXClient_3( +class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXClient_4 extends _i1.SmartFake + implements _i5.ElectrumXClient { + _FakeElectrumXClient_4( Object parent, Invocation parentInvocation, ) : super( @@ -73,7 +86,7 @@ class _FakeElectrumXClient_3 extends _i1.SmartFake /// A class which mocks [ElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. -class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { +class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { MockElectrumXClient() { _i1.throwOnMissingStub(this); } @@ -87,6 +100,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ), ) as _i2.CryptoCurrency); + @override + _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) as _i6.TorPlainNetworkOption); + @override int get currentFailoverIndex => (super.noSuchMethod( Invocation.getter(#currentFailoverIndex), @@ -115,7 +134,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { @override String get host => (super.noSuchMethod( Invocation.getter(#host), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#host), ), @@ -134,27 +153,27 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ) as bool); @override - _i6.Future closeAdapter() => (super.noSuchMethod( + _i8.Future closeAdapter() => (super.noSuchMethod( Invocation.method( #closeAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future checkElectrumAdapter() => (super.noSuchMethod( + _i8.Future checkElectrumAdapter() => (super.noSuchMethod( Invocation.method( #checkElectrumAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future request({ + _i8.Future request({ required String? command, List? args = const [], String? requestID, @@ -173,11 +192,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestTimeout: requestTimeout, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> batchRequest({ + _i8.Future> batchRequest({ required String? command, required List? args, Duration? requestTimeout = const Duration(seconds: 60), @@ -194,11 +213,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retries: retries, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future ping({ + _i8.Future ping({ String? requestID, int? retryCount = 1, }) => @@ -211,11 +230,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retryCount: retryCount, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getBlockHeadTip({String? requestID}) => + _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( Invocation.method( #getBlockHeadTip, @@ -223,11 +242,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getServerFeatures({String? requestID}) => + _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( Invocation.method( #getServerFeatures, @@ -235,11 +254,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future broadcastTransaction({ + _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, }) => @@ -252,7 +271,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(_i5.dummyValue( + returnValue: _i8.Future.value(_i7.dummyValue( this, Invocation.method( #broadcastTransaction, @@ -263,10 +282,10 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future); + ) as _i8.Future); @override - _i6.Future> getBalance({ + _i8.Future> getBalance({ required String? scripthash, String? requestID, }) => @@ -280,11 +299,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getHistory({ + _i8.Future>> getHistory({ required String? scripthash, String? requestID, }) => @@ -297,12 +316,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchHistory( + _i8.Future>>> getBatchHistory( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -310,12 +329,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future>> getUTXOs({ + _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, }) => @@ -328,12 +347,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchUTXOs( + _i8.Future>>> getBatchUTXOs( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -341,12 +360,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, @@ -362,11 +381,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getLelantusAnonymitySet({ + _i8.Future> getLelantusAnonymitySet({ String? groupId = r'1', String? blockhash = r'', String? requestID, @@ -382,11 +401,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusMintData({ + _i8.Future getLelantusMintData({ dynamic mints, String? requestID, }) => @@ -399,11 +418,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> getLelantusUsedCoinSerials({ + _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, }) => @@ -417,22 +436,22 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusLatestCoinId({String? requestID}) => + _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getLelantusLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getSparkAnonymitySet({ + _i8.Future> getSparkAnonymitySet({ String? coinGroupId = r'1', String? startBlockHash = r'', String? requestID, @@ -448,58 +467,33 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getSparkMintMetaData({ - String? requestID, - required List? sparkCoinHashes, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkMintMetaData, - [], - { - #requestID: requestID, - #sparkCoinHashes: sparkCoinHashes, - }, - ), - returnValue: _i6.Future>>.value( - >[]), - ) as _i6.Future>>); - - @override - _i6.Future getSparkLatestCoinId({String? requestID}) => + _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getSparkLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getMempoolTxids({String? requestID}) => + _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( Invocation.method( #getMempoolTxids, [], {#requestID: requestID}, ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>> getMempoolSparkData({ + _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, }) => @@ -512,30 +506,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #txids: txids, }, ), - returnValue: _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>.value(<({ - List coins, - List lTags, - List serialContext, - String txid - })>[]), - ) as _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>); + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[]), + ) as _i8.Future>); @override - _i6.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ + _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, }) => @@ -548,11 +524,62 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #startNumber: startNumber, }, ), - returnValue: _i6.Future>>.value(>[]), - ) as _i6.Future>>); + returnValue: _i8.Future>>.value(>[]), + ) as _i8.Future>>); @override - _i6.Future isMasterNodeCollateral({ + _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ + String? requestID, + required int? coinGroupId, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + )), + ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + + @override + _i8.Future> getSparkAnonymitySetBySector({ + String? requestID, + required int? coinGroupId, + required String? latestBlock, + required int? startIndex, + required int? endIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetBySector, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }, + ), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + + @override + _i8.Future isMasterNodeCollateral({ String? requestID, required String? txid, required int? index, @@ -567,11 +594,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #index: index, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getFeeRate({String? requestID}) => + _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( Invocation.method( #getFeeRate, @@ -579,11 +606,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future<_i3.Decimal> estimateFee({ + _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, }) => @@ -596,7 +623,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #blocks: blocks, }, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #estimateFee, @@ -607,16 +634,16 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); @override - _i6.Future<_i3.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( Invocation.method( #relayFee, [], {#requestID: requestID}, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #relayFee, @@ -624,29 +651,29 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. class MockCachedElectrumXClient extends _i1.Mock - implements _i7.CachedElectrumXClient { + implements _i9.CachedElectrumXClient { MockCachedElectrumXClient() { _i1.throwOnMissingStub(this); } @override - _i4.ElectrumXClient get electrumXClient => (super.noSuchMethod( + _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_3( + returnValue: _FakeElectrumXClient_4( this, Invocation.getter(#electrumXClient), ), - ) as _i4.ElectrumXClient); + ) as _i5.ElectrumXClient); @override - _i6.Future> getAnonymitySet({ + _i8.Future> getAnonymitySet({ required String? groupId, String? blockhash = r'', required _i2.CryptoCurrency? cryptoCurrency, @@ -662,8 +689,8 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override String base64ToHex(String? source) => (super.noSuchMethod( @@ -671,7 +698,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToHex, @@ -686,7 +713,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToReverseHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToReverseHex, @@ -696,7 +723,7 @@ class MockCachedElectrumXClient extends _i1.Mock ) as String); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, @@ -712,11 +739,11 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getUsedCoinSerials({ + _i8.Future> getUsedCoinSerials({ required _i2.CryptoCurrency? cryptoCurrency, int? startNumber = 0, }) => @@ -729,11 +756,11 @@ class MockCachedElectrumXClient extends _i1.Mock #startNumber: startNumber, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future clearSharedTransactionCache( + _i8.Future clearSharedTransactionCache( {required _i2.CryptoCurrency? cryptoCurrency}) => (super.noSuchMethod( Invocation.method( @@ -741,16 +768,16 @@ class MockCachedElectrumXClient extends _i1.Mock [], {#cryptoCurrency: cryptoCurrency}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. /// /// See the documentation for Mockito's code generation for more information. class MockTransactionNotificationTracker extends _i1.Mock - implements _i8.TransactionNotificationTracker { + implements _i10.TransactionNotificationTracker { MockTransactionNotificationTracker() { _i1.throwOnMissingStub(this); } @@ -758,7 +785,7 @@ class MockTransactionNotificationTracker extends _i1.Mock @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#walletId), ), @@ -786,14 +813,14 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedPending, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( @@ -805,22 +832,22 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedConfirmed, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future deleteTransaction(String? txid) => (super.noSuchMethod( + _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( Invocation.method( #deleteTransaction, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } diff --git a/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart b/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart index c6eadd8f6..c853a3f37 100644 --- a/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart +++ b/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart @@ -3,15 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; +import 'dart:async' as _i8; -import 'package:decimal/decimal.dart' as _i3; +import 'package:decimal/decimal.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i5; -import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i7; -import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i4; +import 'package:mockito/src/dummies.dart' as _i7; +import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i9; +import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i5; +import 'package:stackwallet/models/electrumx_response/spark_models.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' - as _i8; + as _i10; +import 'package:stackwallet/utilities/tor_plain_net_option_enum.dart' as _i6; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i2; @@ -49,8 +51,9 @@ class _FakeDuration_1 extends _i1.SmartFake implements Duration { ); } -class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { - _FakeDecimal_2( +class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake + implements _i3.SparkAnonymitySetMeta { + _FakeSparkAnonymitySetMeta_2( Object parent, Invocation parentInvocation, ) : super( @@ -59,9 +62,19 @@ class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { ); } -class _FakeElectrumXClient_3 extends _i1.SmartFake - implements _i4.ElectrumXClient { - _FakeElectrumXClient_3( +class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXClient_4 extends _i1.SmartFake + implements _i5.ElectrumXClient { + _FakeElectrumXClient_4( Object parent, Invocation parentInvocation, ) : super( @@ -73,7 +86,7 @@ class _FakeElectrumXClient_3 extends _i1.SmartFake /// A class which mocks [ElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. -class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { +class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { MockElectrumXClient() { _i1.throwOnMissingStub(this); } @@ -87,6 +100,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ), ) as _i2.CryptoCurrency); + @override + _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) as _i6.TorPlainNetworkOption); + @override int get currentFailoverIndex => (super.noSuchMethod( Invocation.getter(#currentFailoverIndex), @@ -115,7 +134,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { @override String get host => (super.noSuchMethod( Invocation.getter(#host), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#host), ), @@ -134,27 +153,27 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ) as bool); @override - _i6.Future closeAdapter() => (super.noSuchMethod( + _i8.Future closeAdapter() => (super.noSuchMethod( Invocation.method( #closeAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future checkElectrumAdapter() => (super.noSuchMethod( + _i8.Future checkElectrumAdapter() => (super.noSuchMethod( Invocation.method( #checkElectrumAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future request({ + _i8.Future request({ required String? command, List? args = const [], String? requestID, @@ -173,11 +192,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestTimeout: requestTimeout, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> batchRequest({ + _i8.Future> batchRequest({ required String? command, required List? args, Duration? requestTimeout = const Duration(seconds: 60), @@ -194,11 +213,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retries: retries, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future ping({ + _i8.Future ping({ String? requestID, int? retryCount = 1, }) => @@ -211,11 +230,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retryCount: retryCount, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getBlockHeadTip({String? requestID}) => + _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( Invocation.method( #getBlockHeadTip, @@ -223,11 +242,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getServerFeatures({String? requestID}) => + _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( Invocation.method( #getServerFeatures, @@ -235,11 +254,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future broadcastTransaction({ + _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, }) => @@ -252,7 +271,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(_i5.dummyValue( + returnValue: _i8.Future.value(_i7.dummyValue( this, Invocation.method( #broadcastTransaction, @@ -263,10 +282,10 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future); + ) as _i8.Future); @override - _i6.Future> getBalance({ + _i8.Future> getBalance({ required String? scripthash, String? requestID, }) => @@ -280,11 +299,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getHistory({ + _i8.Future>> getHistory({ required String? scripthash, String? requestID, }) => @@ -297,12 +316,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchHistory( + _i8.Future>>> getBatchHistory( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -310,12 +329,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future>> getUTXOs({ + _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, }) => @@ -328,12 +347,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchUTXOs( + _i8.Future>>> getBatchUTXOs( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -341,12 +360,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, @@ -362,11 +381,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getLelantusAnonymitySet({ + _i8.Future> getLelantusAnonymitySet({ String? groupId = r'1', String? blockhash = r'', String? requestID, @@ -382,11 +401,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusMintData({ + _i8.Future getLelantusMintData({ dynamic mints, String? requestID, }) => @@ -399,11 +418,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> getLelantusUsedCoinSerials({ + _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, }) => @@ -417,22 +436,22 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusLatestCoinId({String? requestID}) => + _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getLelantusLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getSparkAnonymitySet({ + _i8.Future> getSparkAnonymitySet({ String? coinGroupId = r'1', String? startBlockHash = r'', String? requestID, @@ -448,58 +467,33 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getSparkMintMetaData({ - String? requestID, - required List? sparkCoinHashes, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkMintMetaData, - [], - { - #requestID: requestID, - #sparkCoinHashes: sparkCoinHashes, - }, - ), - returnValue: _i6.Future>>.value( - >[]), - ) as _i6.Future>>); - - @override - _i6.Future getSparkLatestCoinId({String? requestID}) => + _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getSparkLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getMempoolTxids({String? requestID}) => + _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( Invocation.method( #getMempoolTxids, [], {#requestID: requestID}, ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>> getMempoolSparkData({ + _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, }) => @@ -512,30 +506,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #txids: txids, }, ), - returnValue: _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>.value(<({ - List coins, - List lTags, - List serialContext, - String txid - })>[]), - ) as _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>); + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[]), + ) as _i8.Future>); @override - _i6.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ + _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, }) => @@ -548,11 +524,62 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #startNumber: startNumber, }, ), - returnValue: _i6.Future>>.value(>[]), - ) as _i6.Future>>); + returnValue: _i8.Future>>.value(>[]), + ) as _i8.Future>>); @override - _i6.Future isMasterNodeCollateral({ + _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ + String? requestID, + required int? coinGroupId, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + )), + ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + + @override + _i8.Future> getSparkAnonymitySetBySector({ + String? requestID, + required int? coinGroupId, + required String? latestBlock, + required int? startIndex, + required int? endIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetBySector, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }, + ), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + + @override + _i8.Future isMasterNodeCollateral({ String? requestID, required String? txid, required int? index, @@ -567,11 +594,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #index: index, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getFeeRate({String? requestID}) => + _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( Invocation.method( #getFeeRate, @@ -579,11 +606,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future<_i3.Decimal> estimateFee({ + _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, }) => @@ -596,7 +623,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #blocks: blocks, }, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #estimateFee, @@ -607,16 +634,16 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); @override - _i6.Future<_i3.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( Invocation.method( #relayFee, [], {#requestID: requestID}, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #relayFee, @@ -624,29 +651,29 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. class MockCachedElectrumXClient extends _i1.Mock - implements _i7.CachedElectrumXClient { + implements _i9.CachedElectrumXClient { MockCachedElectrumXClient() { _i1.throwOnMissingStub(this); } @override - _i4.ElectrumXClient get electrumXClient => (super.noSuchMethod( + _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_3( + returnValue: _FakeElectrumXClient_4( this, Invocation.getter(#electrumXClient), ), - ) as _i4.ElectrumXClient); + ) as _i5.ElectrumXClient); @override - _i6.Future> getAnonymitySet({ + _i8.Future> getAnonymitySet({ required String? groupId, String? blockhash = r'', required _i2.CryptoCurrency? cryptoCurrency, @@ -662,8 +689,8 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override String base64ToHex(String? source) => (super.noSuchMethod( @@ -671,7 +698,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToHex, @@ -686,7 +713,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToReverseHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToReverseHex, @@ -696,7 +723,7 @@ class MockCachedElectrumXClient extends _i1.Mock ) as String); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, @@ -712,11 +739,11 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getUsedCoinSerials({ + _i8.Future> getUsedCoinSerials({ required _i2.CryptoCurrency? cryptoCurrency, int? startNumber = 0, }) => @@ -729,11 +756,11 @@ class MockCachedElectrumXClient extends _i1.Mock #startNumber: startNumber, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future clearSharedTransactionCache( + _i8.Future clearSharedTransactionCache( {required _i2.CryptoCurrency? cryptoCurrency}) => (super.noSuchMethod( Invocation.method( @@ -741,16 +768,16 @@ class MockCachedElectrumXClient extends _i1.Mock [], {#cryptoCurrency: cryptoCurrency}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. /// /// See the documentation for Mockito's code generation for more information. class MockTransactionNotificationTracker extends _i1.Mock - implements _i8.TransactionNotificationTracker { + implements _i10.TransactionNotificationTracker { MockTransactionNotificationTracker() { _i1.throwOnMissingStub(this); } @@ -758,7 +785,7 @@ class MockTransactionNotificationTracker extends _i1.Mock @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#walletId), ), @@ -786,14 +813,14 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedPending, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( @@ -805,22 +832,22 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedConfirmed, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future deleteTransaction(String? txid) => (super.noSuchMethod( + _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( Invocation.method( #deleteTransaction, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } diff --git a/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart b/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart index 344647a50..08f884b57 100644 --- a/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart +++ b/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart @@ -3,15 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; +import 'dart:async' as _i8; -import 'package:decimal/decimal.dart' as _i3; +import 'package:decimal/decimal.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i5; -import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i7; -import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i4; +import 'package:mockito/src/dummies.dart' as _i7; +import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i9; +import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i5; +import 'package:stackwallet/models/electrumx_response/spark_models.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' - as _i8; + as _i10; +import 'package:stackwallet/utilities/tor_plain_net_option_enum.dart' as _i6; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i2; @@ -49,8 +51,9 @@ class _FakeDuration_1 extends _i1.SmartFake implements Duration { ); } -class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { - _FakeDecimal_2( +class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake + implements _i3.SparkAnonymitySetMeta { + _FakeSparkAnonymitySetMeta_2( Object parent, Invocation parentInvocation, ) : super( @@ -59,9 +62,19 @@ class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { ); } -class _FakeElectrumXClient_3 extends _i1.SmartFake - implements _i4.ElectrumXClient { - _FakeElectrumXClient_3( +class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXClient_4 extends _i1.SmartFake + implements _i5.ElectrumXClient { + _FakeElectrumXClient_4( Object parent, Invocation parentInvocation, ) : super( @@ -73,7 +86,7 @@ class _FakeElectrumXClient_3 extends _i1.SmartFake /// A class which mocks [ElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. -class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { +class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { MockElectrumXClient() { _i1.throwOnMissingStub(this); } @@ -87,6 +100,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ), ) as _i2.CryptoCurrency); + @override + _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) as _i6.TorPlainNetworkOption); + @override int get currentFailoverIndex => (super.noSuchMethod( Invocation.getter(#currentFailoverIndex), @@ -115,7 +134,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { @override String get host => (super.noSuchMethod( Invocation.getter(#host), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#host), ), @@ -134,27 +153,27 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ) as bool); @override - _i6.Future closeAdapter() => (super.noSuchMethod( + _i8.Future closeAdapter() => (super.noSuchMethod( Invocation.method( #closeAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future checkElectrumAdapter() => (super.noSuchMethod( + _i8.Future checkElectrumAdapter() => (super.noSuchMethod( Invocation.method( #checkElectrumAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future request({ + _i8.Future request({ required String? command, List? args = const [], String? requestID, @@ -173,11 +192,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestTimeout: requestTimeout, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> batchRequest({ + _i8.Future> batchRequest({ required String? command, required List? args, Duration? requestTimeout = const Duration(seconds: 60), @@ -194,11 +213,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retries: retries, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future ping({ + _i8.Future ping({ String? requestID, int? retryCount = 1, }) => @@ -211,11 +230,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retryCount: retryCount, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getBlockHeadTip({String? requestID}) => + _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( Invocation.method( #getBlockHeadTip, @@ -223,11 +242,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getServerFeatures({String? requestID}) => + _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( Invocation.method( #getServerFeatures, @@ -235,11 +254,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future broadcastTransaction({ + _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, }) => @@ -252,7 +271,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(_i5.dummyValue( + returnValue: _i8.Future.value(_i7.dummyValue( this, Invocation.method( #broadcastTransaction, @@ -263,10 +282,10 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future); + ) as _i8.Future); @override - _i6.Future> getBalance({ + _i8.Future> getBalance({ required String? scripthash, String? requestID, }) => @@ -280,11 +299,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getHistory({ + _i8.Future>> getHistory({ required String? scripthash, String? requestID, }) => @@ -297,12 +316,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchHistory( + _i8.Future>>> getBatchHistory( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -310,12 +329,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future>> getUTXOs({ + _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, }) => @@ -328,12 +347,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchUTXOs( + _i8.Future>>> getBatchUTXOs( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -341,12 +360,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, @@ -362,11 +381,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getLelantusAnonymitySet({ + _i8.Future> getLelantusAnonymitySet({ String? groupId = r'1', String? blockhash = r'', String? requestID, @@ -382,11 +401,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusMintData({ + _i8.Future getLelantusMintData({ dynamic mints, String? requestID, }) => @@ -399,11 +418,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> getLelantusUsedCoinSerials({ + _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, }) => @@ -417,22 +436,22 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusLatestCoinId({String? requestID}) => + _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getLelantusLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getSparkAnonymitySet({ + _i8.Future> getSparkAnonymitySet({ String? coinGroupId = r'1', String? startBlockHash = r'', String? requestID, @@ -448,58 +467,33 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getSparkMintMetaData({ - String? requestID, - required List? sparkCoinHashes, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkMintMetaData, - [], - { - #requestID: requestID, - #sparkCoinHashes: sparkCoinHashes, - }, - ), - returnValue: _i6.Future>>.value( - >[]), - ) as _i6.Future>>); - - @override - _i6.Future getSparkLatestCoinId({String? requestID}) => + _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getSparkLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getMempoolTxids({String? requestID}) => + _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( Invocation.method( #getMempoolTxids, [], {#requestID: requestID}, ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>> getMempoolSparkData({ + _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, }) => @@ -512,30 +506,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #txids: txids, }, ), - returnValue: _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>.value(<({ - List coins, - List lTags, - List serialContext, - String txid - })>[]), - ) as _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>); + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[]), + ) as _i8.Future>); @override - _i6.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ + _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, }) => @@ -548,11 +524,62 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #startNumber: startNumber, }, ), - returnValue: _i6.Future>>.value(>[]), - ) as _i6.Future>>); + returnValue: _i8.Future>>.value(>[]), + ) as _i8.Future>>); @override - _i6.Future isMasterNodeCollateral({ + _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ + String? requestID, + required int? coinGroupId, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + )), + ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + + @override + _i8.Future> getSparkAnonymitySetBySector({ + String? requestID, + required int? coinGroupId, + required String? latestBlock, + required int? startIndex, + required int? endIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetBySector, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }, + ), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + + @override + _i8.Future isMasterNodeCollateral({ String? requestID, required String? txid, required int? index, @@ -567,11 +594,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #index: index, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getFeeRate({String? requestID}) => + _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( Invocation.method( #getFeeRate, @@ -579,11 +606,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future<_i3.Decimal> estimateFee({ + _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, }) => @@ -596,7 +623,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #blocks: blocks, }, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #estimateFee, @@ -607,16 +634,16 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); @override - _i6.Future<_i3.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( Invocation.method( #relayFee, [], {#requestID: requestID}, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #relayFee, @@ -624,29 +651,29 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. class MockCachedElectrumXClient extends _i1.Mock - implements _i7.CachedElectrumXClient { + implements _i9.CachedElectrumXClient { MockCachedElectrumXClient() { _i1.throwOnMissingStub(this); } @override - _i4.ElectrumXClient get electrumXClient => (super.noSuchMethod( + _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_3( + returnValue: _FakeElectrumXClient_4( this, Invocation.getter(#electrumXClient), ), - ) as _i4.ElectrumXClient); + ) as _i5.ElectrumXClient); @override - _i6.Future> getAnonymitySet({ + _i8.Future> getAnonymitySet({ required String? groupId, String? blockhash = r'', required _i2.CryptoCurrency? cryptoCurrency, @@ -662,8 +689,8 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override String base64ToHex(String? source) => (super.noSuchMethod( @@ -671,7 +698,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToHex, @@ -686,7 +713,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToReverseHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToReverseHex, @@ -696,7 +723,7 @@ class MockCachedElectrumXClient extends _i1.Mock ) as String); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, @@ -712,11 +739,11 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getUsedCoinSerials({ + _i8.Future> getUsedCoinSerials({ required _i2.CryptoCurrency? cryptoCurrency, int? startNumber = 0, }) => @@ -729,11 +756,11 @@ class MockCachedElectrumXClient extends _i1.Mock #startNumber: startNumber, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future clearSharedTransactionCache( + _i8.Future clearSharedTransactionCache( {required _i2.CryptoCurrency? cryptoCurrency}) => (super.noSuchMethod( Invocation.method( @@ -741,16 +768,16 @@ class MockCachedElectrumXClient extends _i1.Mock [], {#cryptoCurrency: cryptoCurrency}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. /// /// See the documentation for Mockito's code generation for more information. class MockTransactionNotificationTracker extends _i1.Mock - implements _i8.TransactionNotificationTracker { + implements _i10.TransactionNotificationTracker { MockTransactionNotificationTracker() { _i1.throwOnMissingStub(this); } @@ -758,7 +785,7 @@ class MockTransactionNotificationTracker extends _i1.Mock @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#walletId), ), @@ -786,14 +813,14 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedPending, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( @@ -805,22 +832,22 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedConfirmed, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future deleteTransaction(String? txid) => (super.noSuchMethod( + _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( Invocation.method( #deleteTransaction, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } diff --git a/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart b/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart index 851a2855c..cd27b6654 100644 --- a/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart +++ b/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart @@ -3,15 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; +import 'dart:async' as _i8; -import 'package:decimal/decimal.dart' as _i3; +import 'package:decimal/decimal.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i5; -import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i7; -import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i4; +import 'package:mockito/src/dummies.dart' as _i7; +import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i9; +import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i5; +import 'package:stackwallet/models/electrumx_response/spark_models.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' - as _i8; + as _i10; +import 'package:stackwallet/utilities/tor_plain_net_option_enum.dart' as _i6; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i2; @@ -49,8 +51,9 @@ class _FakeDuration_1 extends _i1.SmartFake implements Duration { ); } -class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { - _FakeDecimal_2( +class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake + implements _i3.SparkAnonymitySetMeta { + _FakeSparkAnonymitySetMeta_2( Object parent, Invocation parentInvocation, ) : super( @@ -59,9 +62,19 @@ class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { ); } -class _FakeElectrumXClient_3 extends _i1.SmartFake - implements _i4.ElectrumXClient { - _FakeElectrumXClient_3( +class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXClient_4 extends _i1.SmartFake + implements _i5.ElectrumXClient { + _FakeElectrumXClient_4( Object parent, Invocation parentInvocation, ) : super( @@ -73,7 +86,7 @@ class _FakeElectrumXClient_3 extends _i1.SmartFake /// A class which mocks [ElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. -class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { +class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { MockElectrumXClient() { _i1.throwOnMissingStub(this); } @@ -87,6 +100,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ), ) as _i2.CryptoCurrency); + @override + _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) as _i6.TorPlainNetworkOption); + @override int get currentFailoverIndex => (super.noSuchMethod( Invocation.getter(#currentFailoverIndex), @@ -115,7 +134,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { @override String get host => (super.noSuchMethod( Invocation.getter(#host), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#host), ), @@ -134,27 +153,27 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ) as bool); @override - _i6.Future closeAdapter() => (super.noSuchMethod( + _i8.Future closeAdapter() => (super.noSuchMethod( Invocation.method( #closeAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future checkElectrumAdapter() => (super.noSuchMethod( + _i8.Future checkElectrumAdapter() => (super.noSuchMethod( Invocation.method( #checkElectrumAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future request({ + _i8.Future request({ required String? command, List? args = const [], String? requestID, @@ -173,11 +192,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestTimeout: requestTimeout, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> batchRequest({ + _i8.Future> batchRequest({ required String? command, required List? args, Duration? requestTimeout = const Duration(seconds: 60), @@ -194,11 +213,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retries: retries, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future ping({ + _i8.Future ping({ String? requestID, int? retryCount = 1, }) => @@ -211,11 +230,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retryCount: retryCount, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getBlockHeadTip({String? requestID}) => + _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( Invocation.method( #getBlockHeadTip, @@ -223,11 +242,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getServerFeatures({String? requestID}) => + _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( Invocation.method( #getServerFeatures, @@ -235,11 +254,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future broadcastTransaction({ + _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, }) => @@ -252,7 +271,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(_i5.dummyValue( + returnValue: _i8.Future.value(_i7.dummyValue( this, Invocation.method( #broadcastTransaction, @@ -263,10 +282,10 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future); + ) as _i8.Future); @override - _i6.Future> getBalance({ + _i8.Future> getBalance({ required String? scripthash, String? requestID, }) => @@ -280,11 +299,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getHistory({ + _i8.Future>> getHistory({ required String? scripthash, String? requestID, }) => @@ -297,12 +316,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchHistory( + _i8.Future>>> getBatchHistory( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -310,12 +329,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future>> getUTXOs({ + _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, }) => @@ -328,12 +347,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchUTXOs( + _i8.Future>>> getBatchUTXOs( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -341,12 +360,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, @@ -362,11 +381,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getLelantusAnonymitySet({ + _i8.Future> getLelantusAnonymitySet({ String? groupId = r'1', String? blockhash = r'', String? requestID, @@ -382,11 +401,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusMintData({ + _i8.Future getLelantusMintData({ dynamic mints, String? requestID, }) => @@ -399,11 +418,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> getLelantusUsedCoinSerials({ + _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, }) => @@ -417,22 +436,22 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusLatestCoinId({String? requestID}) => + _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getLelantusLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getSparkAnonymitySet({ + _i8.Future> getSparkAnonymitySet({ String? coinGroupId = r'1', String? startBlockHash = r'', String? requestID, @@ -448,58 +467,33 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getSparkMintMetaData({ - String? requestID, - required List? sparkCoinHashes, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkMintMetaData, - [], - { - #requestID: requestID, - #sparkCoinHashes: sparkCoinHashes, - }, - ), - returnValue: _i6.Future>>.value( - >[]), - ) as _i6.Future>>); - - @override - _i6.Future getSparkLatestCoinId({String? requestID}) => + _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getSparkLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getMempoolTxids({String? requestID}) => + _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( Invocation.method( #getMempoolTxids, [], {#requestID: requestID}, ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>> getMempoolSparkData({ + _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, }) => @@ -512,30 +506,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #txids: txids, }, ), - returnValue: _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>.value(<({ - List coins, - List lTags, - List serialContext, - String txid - })>[]), - ) as _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>); + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[]), + ) as _i8.Future>); @override - _i6.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ + _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, }) => @@ -548,11 +524,62 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #startNumber: startNumber, }, ), - returnValue: _i6.Future>>.value(>[]), - ) as _i6.Future>>); + returnValue: _i8.Future>>.value(>[]), + ) as _i8.Future>>); @override - _i6.Future isMasterNodeCollateral({ + _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ + String? requestID, + required int? coinGroupId, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + )), + ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + + @override + _i8.Future> getSparkAnonymitySetBySector({ + String? requestID, + required int? coinGroupId, + required String? latestBlock, + required int? startIndex, + required int? endIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetBySector, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }, + ), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + + @override + _i8.Future isMasterNodeCollateral({ String? requestID, required String? txid, required int? index, @@ -567,11 +594,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #index: index, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getFeeRate({String? requestID}) => + _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( Invocation.method( #getFeeRate, @@ -579,11 +606,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future<_i3.Decimal> estimateFee({ + _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, }) => @@ -596,7 +623,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #blocks: blocks, }, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #estimateFee, @@ -607,16 +634,16 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); @override - _i6.Future<_i3.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( Invocation.method( #relayFee, [], {#requestID: requestID}, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #relayFee, @@ -624,29 +651,29 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. class MockCachedElectrumXClient extends _i1.Mock - implements _i7.CachedElectrumXClient { + implements _i9.CachedElectrumXClient { MockCachedElectrumXClient() { _i1.throwOnMissingStub(this); } @override - _i4.ElectrumXClient get electrumXClient => (super.noSuchMethod( + _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_3( + returnValue: _FakeElectrumXClient_4( this, Invocation.getter(#electrumXClient), ), - ) as _i4.ElectrumXClient); + ) as _i5.ElectrumXClient); @override - _i6.Future> getAnonymitySet({ + _i8.Future> getAnonymitySet({ required String? groupId, String? blockhash = r'', required _i2.CryptoCurrency? cryptoCurrency, @@ -662,8 +689,8 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override String base64ToHex(String? source) => (super.noSuchMethod( @@ -671,7 +698,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToHex, @@ -686,7 +713,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToReverseHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToReverseHex, @@ -696,7 +723,7 @@ class MockCachedElectrumXClient extends _i1.Mock ) as String); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, @@ -712,11 +739,11 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getUsedCoinSerials({ + _i8.Future> getUsedCoinSerials({ required _i2.CryptoCurrency? cryptoCurrency, int? startNumber = 0, }) => @@ -729,11 +756,11 @@ class MockCachedElectrumXClient extends _i1.Mock #startNumber: startNumber, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future clearSharedTransactionCache( + _i8.Future clearSharedTransactionCache( {required _i2.CryptoCurrency? cryptoCurrency}) => (super.noSuchMethod( Invocation.method( @@ -741,16 +768,16 @@ class MockCachedElectrumXClient extends _i1.Mock [], {#cryptoCurrency: cryptoCurrency}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. /// /// See the documentation for Mockito's code generation for more information. class MockTransactionNotificationTracker extends _i1.Mock - implements _i8.TransactionNotificationTracker { + implements _i10.TransactionNotificationTracker { MockTransactionNotificationTracker() { _i1.throwOnMissingStub(this); } @@ -758,7 +785,7 @@ class MockTransactionNotificationTracker extends _i1.Mock @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#walletId), ), @@ -786,14 +813,14 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedPending, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( @@ -805,22 +832,22 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedConfirmed, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future deleteTransaction(String? txid) => (super.noSuchMethod( + _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( Invocation.method( #deleteTransaction, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } diff --git a/test/services/coins/particl/particl_wallet_test.mocks.dart b/test/services/coins/particl/particl_wallet_test.mocks.dart index ccd74b4d7..1360bd6db 100644 --- a/test/services/coins/particl/particl_wallet_test.mocks.dart +++ b/test/services/coins/particl/particl_wallet_test.mocks.dart @@ -3,15 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; +import 'dart:async' as _i8; -import 'package:decimal/decimal.dart' as _i3; +import 'package:decimal/decimal.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i5; -import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i7; -import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i4; +import 'package:mockito/src/dummies.dart' as _i7; +import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i9; +import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i5; +import 'package:stackwallet/models/electrumx_response/spark_models.dart' as _i3; import 'package:stackwallet/services/transaction_notification_tracker.dart' - as _i8; + as _i10; +import 'package:stackwallet/utilities/tor_plain_net_option_enum.dart' as _i6; import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' as _i2; @@ -49,8 +51,9 @@ class _FakeDuration_1 extends _i1.SmartFake implements Duration { ); } -class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { - _FakeDecimal_2( +class _FakeSparkAnonymitySetMeta_2 extends _i1.SmartFake + implements _i3.SparkAnonymitySetMeta { + _FakeSparkAnonymitySetMeta_2( Object parent, Invocation parentInvocation, ) : super( @@ -59,9 +62,19 @@ class _FakeDecimal_2 extends _i1.SmartFake implements _i3.Decimal { ); } -class _FakeElectrumXClient_3 extends _i1.SmartFake - implements _i4.ElectrumXClient { - _FakeElectrumXClient_3( +class _FakeDecimal_3 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXClient_4 extends _i1.SmartFake + implements _i5.ElectrumXClient { + _FakeElectrumXClient_4( Object parent, Invocation parentInvocation, ) : super( @@ -73,7 +86,7 @@ class _FakeElectrumXClient_3 extends _i1.SmartFake /// A class which mocks [ElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. -class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { +class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { MockElectrumXClient() { _i1.throwOnMissingStub(this); } @@ -87,6 +100,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ), ) as _i2.CryptoCurrency); + @override + _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) as _i6.TorPlainNetworkOption); + @override int get currentFailoverIndex => (super.noSuchMethod( Invocation.getter(#currentFailoverIndex), @@ -115,7 +134,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { @override String get host => (super.noSuchMethod( Invocation.getter(#host), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#host), ), @@ -134,27 +153,27 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { ) as bool); @override - _i6.Future closeAdapter() => (super.noSuchMethod( + _i8.Future closeAdapter() => (super.noSuchMethod( Invocation.method( #closeAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future checkElectrumAdapter() => (super.noSuchMethod( + _i8.Future checkElectrumAdapter() => (super.noSuchMethod( Invocation.method( #checkElectrumAdapter, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future request({ + _i8.Future request({ required String? command, List? args = const [], String? requestID, @@ -173,11 +192,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestTimeout: requestTimeout, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> batchRequest({ + _i8.Future> batchRequest({ required String? command, required List? args, Duration? requestTimeout = const Duration(seconds: 60), @@ -194,11 +213,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retries: retries, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future ping({ + _i8.Future ping({ String? requestID, int? retryCount = 1, }) => @@ -211,11 +230,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #retryCount: retryCount, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getBlockHeadTip({String? requestID}) => + _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( Invocation.method( #getBlockHeadTip, @@ -223,11 +242,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getServerFeatures({String? requestID}) => + _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( Invocation.method( #getServerFeatures, @@ -235,11 +254,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future broadcastTransaction({ + _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, }) => @@ -252,7 +271,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(_i5.dummyValue( + returnValue: _i8.Future.value(_i7.dummyValue( this, Invocation.method( #broadcastTransaction, @@ -263,10 +282,10 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future); + ) as _i8.Future); @override - _i6.Future> getBalance({ + _i8.Future> getBalance({ required String? scripthash, String? requestID, }) => @@ -280,11 +299,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getHistory({ + _i8.Future>> getHistory({ required String? scripthash, String? requestID, }) => @@ -297,12 +316,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchHistory( + _i8.Future>>> getBatchHistory( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -310,12 +329,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future>> getUTXOs({ + _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, }) => @@ -328,12 +347,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future>>.value( + returnValue: _i8.Future>>.value( >[]), - ) as _i6.Future>>); + ) as _i8.Future>>); @override - _i6.Future>>> getBatchUTXOs( + _i8.Future>>> getBatchUTXOs( {required List? args}) => (super.noSuchMethod( Invocation.method( @@ -341,12 +360,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { [], {#args: args}, ), - returnValue: _i6.Future>>>.value( + returnValue: _i8.Future>>>.value( >>[]), - ) as _i6.Future>>>); + ) as _i8.Future>>>); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, @@ -362,11 +381,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getLelantusAnonymitySet({ + _i8.Future> getLelantusAnonymitySet({ String? groupId = r'1', String? blockhash = r'', String? requestID, @@ -382,11 +401,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusMintData({ + _i8.Future getLelantusMintData({ dynamic mints, String? requestID, }) => @@ -399,11 +418,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #requestID: requestID, }, ), - returnValue: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future> getLelantusUsedCoinSerials({ + _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, }) => @@ -417,22 +436,22 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future getLelantusLatestCoinId({String? requestID}) => + _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getLelantusLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getSparkAnonymitySet({ + _i8.Future> getSparkAnonymitySet({ String? coinGroupId = r'1', String? startBlockHash = r'', String? requestID, @@ -448,58 +467,33 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future>> getSparkMintMetaData({ - String? requestID, - required List? sparkCoinHashes, - }) => - (super.noSuchMethod( - Invocation.method( - #getSparkMintMetaData, - [], - { - #requestID: requestID, - #sparkCoinHashes: sparkCoinHashes, - }, - ), - returnValue: _i6.Future>>.value( - >[]), - ) as _i6.Future>>); - - @override - _i6.Future getSparkLatestCoinId({String? requestID}) => + _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( Invocation.method( #getSparkLatestCoinId, [], {#requestID: requestID}, ), - returnValue: _i6.Future.value(0), - ) as _i6.Future); + returnValue: _i8.Future.value(0), + ) as _i8.Future); @override - _i6.Future> getMempoolTxids({String? requestID}) => + _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( Invocation.method( #getMempoolTxids, [], {#requestID: requestID}, ), - returnValue: _i6.Future>.value({}), - ) as _i6.Future>); + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>> getMempoolSparkData({ + _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, }) => @@ -512,30 +506,12 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #txids: txids, }, ), - returnValue: _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>.value(<({ - List coins, - List lTags, - List serialContext, - String txid - })>[]), - ) as _i6.Future< - List< - ({ - List coins, - List lTags, - List serialContext, - String txid - })>>); + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[]), + ) as _i8.Future>); @override - _i6.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ + _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, }) => @@ -548,11 +524,62 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #startNumber: startNumber, }, ), - returnValue: _i6.Future>>.value(>[]), - ) as _i6.Future>>); + returnValue: _i8.Future>>.value(>[]), + ) as _i8.Future>>); @override - _i6.Future isMasterNodeCollateral({ + _i8.Future<_i3.SparkAnonymitySetMeta> getSparkAnonymitySetMeta({ + String? requestID, + required int? coinGroupId, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + returnValue: _i8.Future<_i3.SparkAnonymitySetMeta>.value( + _FakeSparkAnonymitySetMeta_2( + this, + Invocation.method( + #getSparkAnonymitySetMeta, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + }, + ), + )), + ) as _i8.Future<_i3.SparkAnonymitySetMeta>); + + @override + _i8.Future> getSparkAnonymitySetBySector({ + String? requestID, + required int? coinGroupId, + required String? latestBlock, + required int? startIndex, + required int? endIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #getSparkAnonymitySetBySector, + [], + { + #requestID: requestID, + #coinGroupId: coinGroupId, + #latestBlock: latestBlock, + #startIndex: startIndex, + #endIndex: endIndex, + }, + ), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + + @override + _i8.Future isMasterNodeCollateral({ String? requestID, required String? txid, required int? index, @@ -567,11 +594,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #index: index, }, ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override - _i6.Future> getFeeRate({String? requestID}) => + _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( Invocation.method( #getFeeRate, @@ -579,11 +606,11 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future<_i3.Decimal> estimateFee({ + _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, }) => @@ -596,7 +623,7 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { #blocks: blocks, }, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #estimateFee, @@ -607,16 +634,16 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { }, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); @override - _i6.Future<_i3.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( Invocation.method( #relayFee, [], {#requestID: requestID}, ), - returnValue: _i6.Future<_i3.Decimal>.value(_FakeDecimal_2( + returnValue: _i8.Future<_i4.Decimal>.value(_FakeDecimal_3( this, Invocation.method( #relayFee, @@ -624,29 +651,29 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient { {#requestID: requestID}, ), )), - ) as _i6.Future<_i3.Decimal>); + ) as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. /// /// See the documentation for Mockito's code generation for more information. class MockCachedElectrumXClient extends _i1.Mock - implements _i7.CachedElectrumXClient { + implements _i9.CachedElectrumXClient { MockCachedElectrumXClient() { _i1.throwOnMissingStub(this); } @override - _i4.ElectrumXClient get electrumXClient => (super.noSuchMethod( + _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_3( + returnValue: _FakeElectrumXClient_4( this, Invocation.getter(#electrumXClient), ), - ) as _i4.ElectrumXClient); + ) as _i5.ElectrumXClient); @override - _i6.Future> getAnonymitySet({ + _i8.Future> getAnonymitySet({ required String? groupId, String? blockhash = r'', required _i2.CryptoCurrency? cryptoCurrency, @@ -662,8 +689,8 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override String base64ToHex(String? source) => (super.noSuchMethod( @@ -671,7 +698,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToHex, @@ -686,7 +713,7 @@ class MockCachedElectrumXClient extends _i1.Mock #base64ToReverseHex, [source], ), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.method( #base64ToReverseHex, @@ -696,7 +723,7 @@ class MockCachedElectrumXClient extends _i1.Mock ) as String); @override - _i6.Future> getTransaction({ + _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, @@ -712,11 +739,11 @@ class MockCachedElectrumXClient extends _i1.Mock }, ), returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + _i8.Future>.value({}), + ) as _i8.Future>); @override - _i6.Future> getUsedCoinSerials({ + _i8.Future> getUsedCoinSerials({ required _i2.CryptoCurrency? cryptoCurrency, int? startNumber = 0, }) => @@ -729,11 +756,11 @@ class MockCachedElectrumXClient extends _i1.Mock #startNumber: startNumber, }, ), - returnValue: _i6.Future>.value([]), - ) as _i6.Future>); + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i6.Future clearSharedTransactionCache( + _i8.Future clearSharedTransactionCache( {required _i2.CryptoCurrency? cryptoCurrency}) => (super.noSuchMethod( Invocation.method( @@ -741,16 +768,16 @@ class MockCachedElectrumXClient extends _i1.Mock [], {#cryptoCurrency: cryptoCurrency}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. /// /// See the documentation for Mockito's code generation for more information. class MockTransactionNotificationTracker extends _i1.Mock - implements _i8.TransactionNotificationTracker { + implements _i10.TransactionNotificationTracker { MockTransactionNotificationTracker() { _i1.throwOnMissingStub(this); } @@ -758,7 +785,7 @@ class MockTransactionNotificationTracker extends _i1.Mock @override String get walletId => (super.noSuchMethod( Invocation.getter(#walletId), - returnValue: _i5.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#walletId), ), @@ -786,14 +813,14 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedPending, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( @@ -805,22 +832,22 @@ class MockTransactionNotificationTracker extends _i1.Mock ) as bool); @override - _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( Invocation.method( #addNotifiedConfirmed, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override - _i6.Future deleteTransaction(String? txid) => (super.noSuchMethod( + _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( Invocation.method( #deleteTransaction, [txid], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); }