From be4c06276b72c96d6da0e95bce89234a676613c7 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 29 Apr 2026 04:16:14 +0000 Subject: [PATCH 1/3] ci: verify committed generated files are up to date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The repo commits its generated code (52 *.mocks.dart, 42 *.g.dart) and build.yaml never runs build_runner, so releases are compiled from exactly what is checked in — but nothing checked that it still matches its sources. Run build_runner in the test job and fail on any *.mocks.dart or *.g.dart the generators would rewrite, pointing at scripts/dev/build_runner.sh. Generated files are compared after dart format, since the committed ones are kept format clean and the generators format with their own pinned dart_style. The step also works around two generator quirks, commented inline: build_runner can replace the gitignored generated app config, and hive_ce emits an untracked registrar this repo never imports. --- .github/workflows/test.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 87ac6e7f04..389009b7e7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -76,6 +76,42 @@ jobs: run: bash prebuild.sh working-directory: scripts + - name: Verify committed generated files are up to date + run: | + # build_runner always replaces conflicting outputs, which can take + # the gitignored app config too (source_gen claims .dart -> + # .g.dart for every input), and ensure_test_app_config.sh's stub + # is not the configured app, so put the configured file back and + # leave the script as the fallback. + SAVED_APP_CONFIG="${RUNNER_TEMP:-/tmp}/app_config.g.dart.saved" + cp lib/app_config.g.dart "$SAVED_APP_CONFIG" + dart run build_runner build + cp "$SAVED_APP_CONFIG" lib/app_config.g.dart + bash scripts/ensure_test_app_config.sh + # hive_ce emits a registrar nothing here imports; never delete it if + # someone has committed it. + if [ -f lib/hive_registrar.g.dart ] \ + && ! git ls-files --error-unmatch lib/hive_registrar.g.dart >/dev/null 2>&1; then + rm -f lib/hive_registrar.g.dart + fi + # Committed generated files are kept dart format clean (the format + # step above checks them like any other changed file), but the + # generators format with their own dart_style, so compare formatted + # output. + git ls-files -m -o --exclude-standard -- '*.mocks.dart' '*.g.dart' \ + | while read -r f; do if [ -f "$f" ]; then echo "$f"; fi; done \ + | sort -u | xargs -r dart format + + # build.yaml never runs build_runner, so releases are compiled from + # the committed *.g.dart; stale isar/drift output has to fail the job + # here or nothing checks it at all. + GENERATED_STATUS=$(git status --porcelain -- '*.mocks.dart' '*.g.dart') + if [ -n "$GENERATED_STATUS" ]; then + echo "$GENERATED_STATUS" + echo "::error::Committed generated files differ from build_runner output; re-run scripts/dev/build_runner.sh, dart format the changed files and commit the result." + exit 1 + fi + # - name: Analyze # run: flutter analyze - name: Test From e04dc8990e79f3f820487dedfbc90e289b7ec937 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 10 Nov 2026 14:12:24 -0600 Subject: [PATCH 2/3] test: refresh generated mocks and serializers --- .../models/blockchain_data/address.g.dart | 9 +- lib/models/isar/stack_theme.g.dart | 27 +- .../address_book_view_screen_test.mocks.dart | 20 +- ...d_address_book_view_screen_test.mocks.dart | 20 +- ..._entry_details_view_screen_test.mocks.dart | 32 +- ...ess_book_entry_view_screen_test.mocks.dart | 20 +- ...allet_settings_view_screen_test.mocks.dart | 31 + ...action_details_view_screen_test.mocks.dart | 32 +- ...saction_search_view_screen_test.mocks.dart | 20 +- .../bitcoin/bitcoin_wallet_test.mocks.dart | 878 ++++++++++-------- .../bitcoincash_wallet_test.mocks.dart | 878 ++++++++++-------- .../dogecoin/dogecoin_wallet_test.mocks.dart | 878 ++++++++++-------- .../namecoin/namecoin_wallet_test.mocks.dart | 878 ++++++++++-------- .../particl/particl_wallet_test.mocks.dart | 878 ++++++++++-------- .../address_book_card_test.mocks.dart | 20 +- 15 files changed, 2732 insertions(+), 1889 deletions(-) diff --git a/lib/models/isar/models/blockchain_data/address.g.dart b/lib/models/isar/models/blockchain_data/address.g.dart index 48017f56b5..6bd5857045 100644 --- a/lib/models/isar/models/blockchain_data/address.g.dart +++ b/lib/models/isar/models/blockchain_data/address.g.dart @@ -223,10 +223,11 @@ P _addressDeserializeProp

( return (reader.readLong(offset)) as P; case 1: return (reader.readObjectOrNull( - offset, - DerivationPathSchema.deserialize, - allOffsets, - )) as P; + offset, + DerivationPathSchema.deserialize, + allOffsets, + )) + as P; case 2: return (reader.readStringOrNull(offset)) as P; case 3: diff --git a/lib/models/isar/stack_theme.g.dart b/lib/models/isar/stack_theme.g.dart index 1a98ae82da..adeb670265 100644 --- a/lib/models/isar/stack_theme.g.dart +++ b/lib/models/isar/stack_theme.g.dart @@ -1315,16 +1315,18 @@ P _stackThemeDeserializeProp

( return (reader.readLong(offset)) as P; case 6: return (reader.readObjectOrNull( - offset, - ThemeAssetsSchema.deserialize, - allOffsets, - )) as P; + offset, + ThemeAssetsSchema.deserialize, + allOffsets, + )) + as P; case 7: return (reader.readObjectOrNull( - offset, - ThemeAssetsV2Schema.deserialize, - allOffsets, - )) as P; + offset, + ThemeAssetsV2Schema.deserialize, + allOffsets, + )) + as P; case 8: return (reader.readLong(offset)) as P; case 9: @@ -1633,10 +1635,11 @@ P _stackThemeDeserializeProp

( return (reader.readLong(offset)) as P; case 161: return (reader.readObjectOrNull( - offset, - ThemeAssetsV3Schema.deserialize, - allOffsets, - )) as P; + offset, + ThemeAssetsV3Schema.deserialize, + allOffsets, + )) + as P; default: throw IsarError('Unknown property with id $propertyId'); } diff --git a/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart index b2bc328864..1aac8b7d41 100644 --- a/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart @@ -4,11 +4,14 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; -import 'dart:ui' as _i5; +import 'dart:ui' as _i7; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/isar/models/contact_entry.dart' as _i2; import 'package:stackwallet/services/address_book_service.dart' as _i3; +import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' + as _i6; +import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -97,6 +100,17 @@ class MockAddressBookService extends _i1.Mock ) as _i4.Future); + @override + _i4.Future updateMyStackContact( + Iterable<_i5.Wallet<_i6.CryptoCurrency>>? wallets, + ) => + (super.noSuchMethod( + Invocation.method(#updateMyStackContact, [wallets]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); + @override _i4.Future removeContact(String? id) => (super.noSuchMethod( @@ -107,13 +121,13 @@ class MockAddressBookService extends _i1.Mock as _i4.Future); @override - void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); diff --git a/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart index 95bb1f4418..73f0d42596 100644 --- a/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart @@ -4,13 +4,16 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; -import 'dart:ui' as _i7; +import 'dart:ui' as _i9; import 'package:flutter/material.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/isar/models/contact_entry.dart' as _i3; import 'package:stackwallet/services/address_book_service.dart' as _i6; import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i2; +import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' + as _i8; +import 'package:stackwallet/wallets/wallet/wallet.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -127,6 +130,17 @@ class MockAddressBookService extends _i1.Mock ) as _i4.Future); + @override + _i4.Future updateMyStackContact( + Iterable<_i7.Wallet<_i8.CryptoCurrency>>? wallets, + ) => + (super.noSuchMethod( + Invocation.method(#updateMyStackContact, [wallets]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); + @override _i4.Future removeContact(String? id) => (super.noSuchMethod( @@ -137,13 +151,13 @@ class MockAddressBookService extends _i1.Mock as _i4.Future); @override - void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); diff --git a/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart index 1e299205bf..fe2943d97a 100644 --- a/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart @@ -4,13 +4,16 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; -import 'dart:ui' as _i5; +import 'dart:ui' as _i7; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i7; +import 'package:mockito/src/dummies.dart' as _i9; import 'package:stackwallet/models/isar/models/contact_entry.dart' as _i2; import 'package:stackwallet/services/address_book_service.dart' as _i3; -import 'package:stackwallet/services/locale_service.dart' as _i6; +import 'package:stackwallet/services/locale_service.dart' as _i8; +import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' + as _i6; +import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -99,6 +102,17 @@ class MockAddressBookService extends _i1.Mock ) as _i4.Future); + @override + _i4.Future updateMyStackContact( + Iterable<_i5.Wallet<_i6.CryptoCurrency>>? wallets, + ) => + (super.noSuchMethod( + Invocation.method(#updateMyStackContact, [wallets]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); + @override _i4.Future removeContact(String? id) => (super.noSuchMethod( @@ -109,13 +123,13 @@ class MockAddressBookService extends _i1.Mock as _i4.Future); @override - void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @@ -136,7 +150,7 @@ class MockAddressBookService extends _i1.Mock /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i6.LocaleService { +class MockLocaleService extends _i1.Mock implements _i8.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -145,7 +159,7 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService { String get locale => (super.noSuchMethod( Invocation.getter(#locale), - returnValue: _i7.dummyValue( + returnValue: _i9.dummyValue( this, Invocation.getter(#locale), ), @@ -167,13 +181,13 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService { as _i4.Future); @override - void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); diff --git a/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart index bab7cfe2c3..f6e1d7fc9a 100644 --- a/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart @@ -4,11 +4,14 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; -import 'dart:ui' as _i5; +import 'dart:ui' as _i7; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/isar/models/contact_entry.dart' as _i2; import 'package:stackwallet/services/address_book_service.dart' as _i3; +import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' + as _i6; +import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -97,6 +100,17 @@ class MockAddressBookService extends _i1.Mock ) as _i4.Future); + @override + _i4.Future updateMyStackContact( + Iterable<_i5.Wallet<_i6.CryptoCurrency>>? wallets, + ) => + (super.noSuchMethod( + Invocation.method(#updateMyStackContact, [wallets]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); + @override _i4.Future removeContact(String? id) => (super.noSuchMethod( @@ -107,13 +121,13 @@ class MockAddressBookService extends _i1.Mock as _i4.Future); @override - void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart index 453540f038..c20cef34b9 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart @@ -82,6 +82,37 @@ class MockCachedElectrumXClient extends _i1.Mock ) as String); + @override + _i5.Future getAuthenticatedRawTransaction({ + required String? txHash, + required _i6.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#getAuthenticatedRawTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i5.Future.value(), + ) + as _i5.Future); + + @override + _i5.Future putAuthenticatedRawTransaction({ + required String? txHash, + required String? rawTxHex, + required _i6.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#putAuthenticatedRawTransaction, [], { + #txHash: txHash, + #rawTxHex: rawTxHex, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); + @override _i5.Future> getTransaction({ required String? txHash, diff --git a/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart index e35771508e..fe923bb757 100644 --- a/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart @@ -4,13 +4,16 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; -import 'dart:ui' as _i5; +import 'dart:ui' as _i7; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i7; +import 'package:mockito/src/dummies.dart' as _i9; import 'package:stackwallet/models/isar/models/contact_entry.dart' as _i2; import 'package:stackwallet/services/address_book_service.dart' as _i3; -import 'package:stackwallet/services/locale_service.dart' as _i6; +import 'package:stackwallet/services/locale_service.dart' as _i8; +import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' + as _i6; +import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -99,6 +102,17 @@ class MockAddressBookService extends _i1.Mock ) as _i4.Future); + @override + _i4.Future updateMyStackContact( + Iterable<_i5.Wallet<_i6.CryptoCurrency>>? wallets, + ) => + (super.noSuchMethod( + Invocation.method(#updateMyStackContact, [wallets]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); + @override _i4.Future removeContact(String? id) => (super.noSuchMethod( @@ -109,13 +123,13 @@ class MockAddressBookService extends _i1.Mock as _i4.Future); @override - void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); @@ -136,7 +150,7 @@ class MockAddressBookService extends _i1.Mock /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i6.LocaleService { +class MockLocaleService extends _i1.Mock implements _i8.LocaleService { MockLocaleService() { _i1.throwOnMissingStub(this); } @@ -145,7 +159,7 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService { String get locale => (super.noSuchMethod( Invocation.getter(#locale), - returnValue: _i7.dummyValue( + returnValue: _i9.dummyValue( this, Invocation.getter(#locale), ), @@ -167,13 +181,13 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService { as _i4.Future); @override - void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); diff --git a/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart index e61edd6c93..ac2efdea52 100644 --- a/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart @@ -4,11 +4,14 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; -import 'dart:ui' as _i5; +import 'dart:ui' as _i7; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/isar/models/contact_entry.dart' as _i2; import 'package:stackwallet/services/address_book_service.dart' as _i3; +import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' + as _i6; +import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -97,6 +100,17 @@ class MockAddressBookService extends _i1.Mock ) as _i4.Future); + @override + _i4.Future updateMyStackContact( + Iterable<_i5.Wallet<_i6.CryptoCurrency>>? wallets, + ) => + (super.noSuchMethod( + Invocation.method(#updateMyStackContact, [wallets]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); + @override _i4.Future removeContact(String? id) => (super.noSuchMethod( @@ -107,13 +121,13 @@ class MockAddressBookService extends _i1.Mock as _i4.Future); @override - void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); diff --git a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart index a168dd6d5a..506214fa17 100644 --- a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart +++ b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart @@ -69,25 +69,31 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue(this, Invocation.getter(#host)), - ) as String); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override int get port => @@ -99,20 +105,23 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { as bool); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override Duration get connectionTimeoutForSpecialCaseJsonRPCClients => (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override set currentFailoverIndex(int? value) => super.noSuchMethod( @@ -121,18 +130,22 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method(#closeAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method(#checkElectrumAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -141,16 +154,18 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, int? retries = 2, Duration? requestTimeout = const Duration(seconds: 60), - }) => (super.noSuchMethod( - Invocation.method(#request, [], { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -158,316 +173,372 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? args, Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, - }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future ping({ String? requestID, int? retryCount = 1, Duration? timeout = const Duration(seconds: 30), - }) => (super.noSuchMethod( - Invocation.method(#ping, [], { - #requestID: requestID, - #retryCount: retryCount, - #timeout: timeout, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + #timeout: timeout, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - returnValue: _i8.Future.value( - _i7.dummyValue( - this, - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - ), - ), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchHistory({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getUTXOs, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchUTXOs({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getLelantusAnonymitySet({ String? groupId = '1', String? blockhash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusMintData, [], { - #mints: mints, - #requestID: requestID, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusUsedCoinSerials, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusLatestCoinId, [], { - #requestID: requestID, - }), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ String? coinGroupId = '1', String? startBlockHash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkAnonymitySet, [], { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getSparkLatestCoinId, [], {#requestID: requestID}), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, - }) => (super.noSuchMethod( - Invocation.method(#getMempoolSparkData, [], { - #requestID: requestID, - #txids: txids, - }), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getSparkNames({ String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNames, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - <({String address, String name})>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - returnValue: - _i8.Future< - ({String additionalInfo, String address, int validUntil}) - >.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - ), - address: _i7.dummyValue( - this, + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( Invocation.method(#getSparkNameData, [], { #sparkName: sparkName, #requestID: requestID, }), - ), - validUntil: 0, - )), - ) as _i8.Future<({String additionalInfo, String address, int validUntil})>); + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _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>); + }) => + (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({ @@ -476,70 +547,79 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { 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>); + }) => + (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, - }) => (super.noSuchMethod( - Invocation.method(#isMasterNodeCollateral, [], { - #requestID: requestID, - #txid: txid, - #index: index, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, - }) => (super.noSuchMethod( - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - ), - ), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#relayFee, [], {#requestID: requestID}), - ), - ), - ) as _i8.Future<_i4.Decimal>); + }) => + (super.noSuchMethod( + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -552,70 +632,115 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToHex, [source]), - ), - ) as String); + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToReverseHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToReverseHex, [source]), - ), - ) as String); + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); + + @override + _i8.Future getAuthenticatedRawTransaction({ + required String? txHash, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#getAuthenticatedRawTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future putAuthenticatedRawTransaction({ + required String? txHash, + required String? rawTxHex, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#putAuthenticatedRawTransaction, [], { + #txHash: txHash, + #rawTxHex: rawTxHex, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future clearSharedTransactionCache({ required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], { - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -628,10 +753,15 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue(this, Invocation.getter(#walletId)), - ) as String); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); @override List get pendings => @@ -639,41 +769,53 @@ class MockTransactionNotificationTracker extends _i1.Mock as List); @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedPending, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method(#deleteTransaction, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + 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 1928385a3f..9bfbae1d1a 100644 --- a/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart +++ b/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart @@ -69,25 +69,31 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue(this, Invocation.getter(#host)), - ) as String); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override int get port => @@ -99,20 +105,23 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { as bool); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override Duration get connectionTimeoutForSpecialCaseJsonRPCClients => (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override set currentFailoverIndex(int? value) => super.noSuchMethod( @@ -121,18 +130,22 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method(#closeAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method(#checkElectrumAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -141,16 +154,18 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, int? retries = 2, Duration? requestTimeout = const Duration(seconds: 60), - }) => (super.noSuchMethod( - Invocation.method(#request, [], { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -158,316 +173,372 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? args, Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, - }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future ping({ String? requestID, int? retryCount = 1, Duration? timeout = const Duration(seconds: 30), - }) => (super.noSuchMethod( - Invocation.method(#ping, [], { - #requestID: requestID, - #retryCount: retryCount, - #timeout: timeout, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + #timeout: timeout, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - returnValue: _i8.Future.value( - _i7.dummyValue( - this, - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - ), - ), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchHistory({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getUTXOs, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchUTXOs({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getLelantusAnonymitySet({ String? groupId = '1', String? blockhash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusMintData, [], { - #mints: mints, - #requestID: requestID, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusUsedCoinSerials, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusLatestCoinId, [], { - #requestID: requestID, - }), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ String? coinGroupId = '1', String? startBlockHash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkAnonymitySet, [], { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getSparkLatestCoinId, [], {#requestID: requestID}), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, - }) => (super.noSuchMethod( - Invocation.method(#getMempoolSparkData, [], { - #requestID: requestID, - #txids: txids, - }), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getSparkNames({ String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNames, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - <({String address, String name})>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - returnValue: - _i8.Future< - ({String additionalInfo, String address, int validUntil}) - >.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - ), - address: _i7.dummyValue( - this, + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( Invocation.method(#getSparkNameData, [], { #sparkName: sparkName, #requestID: requestID, }), - ), - validUntil: 0, - )), - ) as _i8.Future<({String additionalInfo, String address, int validUntil})>); + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _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>); + }) => + (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({ @@ -476,70 +547,79 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { 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>); + }) => + (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, - }) => (super.noSuchMethod( - Invocation.method(#isMasterNodeCollateral, [], { - #requestID: requestID, - #txid: txid, - #index: index, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, - }) => (super.noSuchMethod( - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - ), - ), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#relayFee, [], {#requestID: requestID}), - ), - ), - ) as _i8.Future<_i4.Decimal>); + }) => + (super.noSuchMethod( + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -552,70 +632,115 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToHex, [source]), - ), - ) as String); + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToReverseHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToReverseHex, [source]), - ), - ) as String); + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); + + @override + _i8.Future getAuthenticatedRawTransaction({ + required String? txHash, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#getAuthenticatedRawTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future putAuthenticatedRawTransaction({ + required String? txHash, + required String? rawTxHex, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#putAuthenticatedRawTransaction, [], { + #txHash: txHash, + #rawTxHex: rawTxHex, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future clearSharedTransactionCache({ required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], { - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -628,10 +753,15 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue(this, Invocation.getter(#walletId)), - ) as String); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); @override List get pendings => @@ -639,41 +769,53 @@ class MockTransactionNotificationTracker extends _i1.Mock as List); @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedPending, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method(#deleteTransaction, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + 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 ab777ebfe6..8c003c6bc8 100644 --- a/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart +++ b/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart @@ -69,25 +69,31 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue(this, Invocation.getter(#host)), - ) as String); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override int get port => @@ -99,20 +105,23 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { as bool); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override Duration get connectionTimeoutForSpecialCaseJsonRPCClients => (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override set currentFailoverIndex(int? value) => super.noSuchMethod( @@ -121,18 +130,22 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method(#closeAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method(#checkElectrumAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -141,16 +154,18 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, int? retries = 2, Duration? requestTimeout = const Duration(seconds: 60), - }) => (super.noSuchMethod( - Invocation.method(#request, [], { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -158,316 +173,372 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? args, Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, - }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future ping({ String? requestID, int? retryCount = 1, Duration? timeout = const Duration(seconds: 30), - }) => (super.noSuchMethod( - Invocation.method(#ping, [], { - #requestID: requestID, - #retryCount: retryCount, - #timeout: timeout, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + #timeout: timeout, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - returnValue: _i8.Future.value( - _i7.dummyValue( - this, - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - ), - ), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchHistory({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getUTXOs, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchUTXOs({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getLelantusAnonymitySet({ String? groupId = '1', String? blockhash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusMintData, [], { - #mints: mints, - #requestID: requestID, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusUsedCoinSerials, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusLatestCoinId, [], { - #requestID: requestID, - }), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ String? coinGroupId = '1', String? startBlockHash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkAnonymitySet, [], { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getSparkLatestCoinId, [], {#requestID: requestID}), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, - }) => (super.noSuchMethod( - Invocation.method(#getMempoolSparkData, [], { - #requestID: requestID, - #txids: txids, - }), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getSparkNames({ String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNames, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - <({String address, String name})>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - returnValue: - _i8.Future< - ({String additionalInfo, String address, int validUntil}) - >.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - ), - address: _i7.dummyValue( - this, + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( Invocation.method(#getSparkNameData, [], { #sparkName: sparkName, #requestID: requestID, }), - ), - validUntil: 0, - )), - ) as _i8.Future<({String additionalInfo, String address, int validUntil})>); + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _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>); + }) => + (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({ @@ -476,70 +547,79 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { 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>); + }) => + (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, - }) => (super.noSuchMethod( - Invocation.method(#isMasterNodeCollateral, [], { - #requestID: requestID, - #txid: txid, - #index: index, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, - }) => (super.noSuchMethod( - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - ), - ), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#relayFee, [], {#requestID: requestID}), - ), - ), - ) as _i8.Future<_i4.Decimal>); + }) => + (super.noSuchMethod( + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -552,70 +632,115 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToHex, [source]), - ), - ) as String); + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToReverseHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToReverseHex, [source]), - ), - ) as String); + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); + + @override + _i8.Future getAuthenticatedRawTransaction({ + required String? txHash, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#getAuthenticatedRawTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future putAuthenticatedRawTransaction({ + required String? txHash, + required String? rawTxHex, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#putAuthenticatedRawTransaction, [], { + #txHash: txHash, + #rawTxHex: rawTxHex, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future clearSharedTransactionCache({ required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], { - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -628,10 +753,15 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue(this, Invocation.getter(#walletId)), - ) as String); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); @override List get pendings => @@ -639,41 +769,53 @@ class MockTransactionNotificationTracker extends _i1.Mock as List); @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedPending, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method(#deleteTransaction, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + 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 404aec5e00..1055974428 100644 --- a/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart +++ b/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart @@ -69,25 +69,31 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue(this, Invocation.getter(#host)), - ) as String); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override int get port => @@ -99,20 +105,23 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { as bool); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override Duration get connectionTimeoutForSpecialCaseJsonRPCClients => (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override set currentFailoverIndex(int? value) => super.noSuchMethod( @@ -121,18 +130,22 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method(#closeAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method(#checkElectrumAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -141,16 +154,18 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, int? retries = 2, Duration? requestTimeout = const Duration(seconds: 60), - }) => (super.noSuchMethod( - Invocation.method(#request, [], { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -158,316 +173,372 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? args, Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, - }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future ping({ String? requestID, int? retryCount = 1, Duration? timeout = const Duration(seconds: 30), - }) => (super.noSuchMethod( - Invocation.method(#ping, [], { - #requestID: requestID, - #retryCount: retryCount, - #timeout: timeout, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + #timeout: timeout, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - returnValue: _i8.Future.value( - _i7.dummyValue( - this, - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - ), - ), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchHistory({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getUTXOs, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchUTXOs({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getLelantusAnonymitySet({ String? groupId = '1', String? blockhash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusMintData, [], { - #mints: mints, - #requestID: requestID, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusUsedCoinSerials, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusLatestCoinId, [], { - #requestID: requestID, - }), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ String? coinGroupId = '1', String? startBlockHash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkAnonymitySet, [], { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getSparkLatestCoinId, [], {#requestID: requestID}), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, - }) => (super.noSuchMethod( - Invocation.method(#getMempoolSparkData, [], { - #requestID: requestID, - #txids: txids, - }), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getSparkNames({ String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNames, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - <({String address, String name})>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - returnValue: - _i8.Future< - ({String additionalInfo, String address, int validUntil}) - >.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - ), - address: _i7.dummyValue( - this, + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( Invocation.method(#getSparkNameData, [], { #sparkName: sparkName, #requestID: requestID, }), - ), - validUntil: 0, - )), - ) as _i8.Future<({String additionalInfo, String address, int validUntil})>); + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _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>); + }) => + (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({ @@ -476,70 +547,79 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { 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>); + }) => + (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, - }) => (super.noSuchMethod( - Invocation.method(#isMasterNodeCollateral, [], { - #requestID: requestID, - #txid: txid, - #index: index, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, - }) => (super.noSuchMethod( - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - ), - ), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#relayFee, [], {#requestID: requestID}), - ), - ), - ) as _i8.Future<_i4.Decimal>); + }) => + (super.noSuchMethod( + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -552,70 +632,115 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToHex, [source]), - ), - ) as String); + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToReverseHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToReverseHex, [source]), - ), - ) as String); + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); + + @override + _i8.Future getAuthenticatedRawTransaction({ + required String? txHash, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#getAuthenticatedRawTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future putAuthenticatedRawTransaction({ + required String? txHash, + required String? rawTxHex, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#putAuthenticatedRawTransaction, [], { + #txHash: txHash, + #rawTxHex: rawTxHex, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future clearSharedTransactionCache({ required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], { - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -628,10 +753,15 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue(this, Invocation.getter(#walletId)), - ) as String); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); @override List get pendings => @@ -639,41 +769,53 @@ class MockTransactionNotificationTracker extends _i1.Mock as List); @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedPending, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method(#deleteTransaction, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + 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 0bac81a604..849ee36b8a 100644 --- a/test/services/coins/particl/particl_wallet_test.mocks.dart +++ b/test/services/coins/particl/particl_wallet_test.mocks.dart @@ -69,25 +69,31 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i6.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i6.TorPlainNetworkOption.tor, - ) as _i6.TorPlainNetworkOption); + _i6.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i6.TorPlainNetworkOption.tor, + ) + as _i6.TorPlainNetworkOption); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i7.dummyValue(this, Invocation.getter(#host)), - ) as String); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i7.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override int get port => @@ -99,20 +105,23 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { as bool); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override Duration get connectionTimeoutForSpecialCaseJsonRPCClients => (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override set currentFailoverIndex(int? value) => super.noSuchMethod( @@ -121,18 +130,22 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { ); @override - _i8.Future closeAdapter() => (super.noSuchMethod( - Invocation.method(#closeAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method(#checkElectrumAdapter, []), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future request({ @@ -141,16 +154,18 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { String? requestID, int? retries = 2, Duration? requestTimeout = const Duration(seconds: 60), - }) => (super.noSuchMethod( - Invocation.method(#request, [], { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> batchRequest({ @@ -158,316 +173,372 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { required List? args, Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, - }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }), - returnValue: _i8.Future>.value([]), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i8.Future>.value([]), + ) + as _i8.Future>); @override _i8.Future ping({ String? requestID, int? retryCount = 1, Duration? timeout = const Duration(seconds: 30), - }) => (super.noSuchMethod( - Invocation.method(#ping, [], { - #requestID: requestID, - #retryCount: retryCount, - #timeout: timeout, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + #timeout: timeout, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future broadcastTransaction({ required String? rawTx, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - returnValue: _i8.Future.value( - _i7.dummyValue( - this, - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - ), - ), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + returnValue: _i8.Future.value( + _i7.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i8.Future); @override _i8.Future> getBalance({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getHistory({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchHistory({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future>> getUTXOs({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getUTXOs, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future>>> getBatchUTXOs({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: _i8.Future>>>.value( - >>[], - ), - ) as _i8.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i8.Future>>>.value( + >>[], + ), + ) + as _i8.Future>>>); @override _i8.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #requestID: requestID, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #requestID: requestID, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getLelantusAnonymitySet({ String? groupId = '1', String? blockhash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusMintData, [], { - #mints: mints, - #requestID: requestID, - }), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusUsedCoinSerials, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusLatestCoinId, [], { - #requestID: requestID, - }), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getSparkAnonymitySet({ String? coinGroupId = '1', String? startBlockHash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkAnonymitySet, [], { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getSparkLatestCoinId, [], {#requestID: requestID}), - returnValue: _i8.Future.value(0), - ) as _i8.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i8.Future.value(0), + ) + as _i8.Future); @override _i8.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i8.Future>.value({}), + ) + as _i8.Future>); @override _i8.Future> getMempoolSparkData({ String? requestID, required List? txids, - }) => (super.noSuchMethod( - Invocation.method(#getMempoolSparkData, [], { - #requestID: requestID, - #txids: txids, - }), - returnValue: _i8.Future>.value( - <_i3.SparkMempoolData>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i8.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i8.Future>); @override _i8.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i8.Future>>.value(>[]), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future> getSparkNames({ String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNames, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - <({String address, String name})>[], - ), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i8.Future>.value( + <({String address, String name})>[], + ), + ) + as _i8.Future>); @override _i8.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - returnValue: - _i8.Future< - ({String additionalInfo, String address, int validUntil}) - >.value(( - additionalInfo: _i7.dummyValue( - this, - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - ), - address: _i7.dummyValue( - this, + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( Invocation.method(#getSparkNameData, [], { #sparkName: sparkName, #requestID: requestID, }), - ), - validUntil: 0, - )), - ) as _i8.Future<({String additionalInfo, String address, int validUntil})>); + returnValue: + _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i7.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i8.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _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>); + }) => + (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({ @@ -476,70 +547,79 @@ class MockElectrumXClient extends _i1.Mock implements _i5.ElectrumXClient { 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>); + }) => + (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, - }) => (super.noSuchMethod( - Invocation.method(#isMasterNodeCollateral, [], { - #requestID: requestID, - #txid: txid, - #index: index, - }), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: _i8.Future>.value( - {}, - ), - ) as _i8.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, - }) => (super.noSuchMethod( - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - ), - ), - ) as _i8.Future<_i4.Decimal>); - - @override - _i8.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: _i8.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#relayFee, [], {#requestID: requestID}), - ), - ), - ) as _i8.Future<_i4.Decimal>); + }) => + (super.noSuchMethod( + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i8.Future<_i4.Decimal>); + + @override + _i8.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i8.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i8.Future<_i4.Decimal>); } /// A class which mocks [CachedElectrumXClient]. @@ -552,70 +632,115 @@ class MockCachedElectrumXClient extends _i1.Mock } @override - _i5.ElectrumXClient get electrumXClient => (super.noSuchMethod( - Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumXClient_4( - this, - Invocation.getter(#electrumXClient), - ), - ) as _i5.ElectrumXClient); + _i5.ElectrumXClient get electrumXClient => + (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumXClient_4( + this, + Invocation.getter(#electrumXClient), + ), + ) + as _i5.ElectrumXClient); @override - String base64ToHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToHex, [source]), - ), - ) as String); + String base64ToHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToHex, [source]), + ), + ) + as String); @override - String base64ToReverseHex(String? source) => (super.noSuchMethod( - Invocation.method(#base64ToReverseHex, [source]), - returnValue: _i7.dummyValue( - this, - Invocation.method(#base64ToReverseHex, [source]), - ), - ) as String); + String base64ToReverseHex(String? source) => + (super.noSuchMethod( + Invocation.method(#base64ToReverseHex, [source]), + returnValue: _i7.dummyValue( + this, + Invocation.method(#base64ToReverseHex, [source]), + ), + ) + as String); + + @override + _i8.Future getAuthenticatedRawTransaction({ + required String? txHash, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#getAuthenticatedRawTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + ) + as _i8.Future); + + @override + _i8.Future putAuthenticatedRawTransaction({ + required String? txHash, + required String? rawTxHex, + required _i2.CryptoCurrency? cryptoCurrency, + }) => + (super.noSuchMethod( + Invocation.method(#putAuthenticatedRawTransaction, [], { + #txHash: txHash, + #rawTxHex: rawTxHex, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override _i8.Future> getTransaction({ required String? txHash, required _i2.CryptoCurrency? cryptoCurrency, bool? verbose = true, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #cryptoCurrency: cryptoCurrency, - #verbose: verbose, - }), - returnValue: _i8.Future>.value({}), - ) as _i8.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #cryptoCurrency: cryptoCurrency, + #verbose: verbose, + }), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.Future>); @override _i8.Future>> getBatchTransactions({ required List? txHashes, required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future>>.value( - >[], - ), - ) as _i8.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future>>.value( + >[], + ), + ) + as _i8.Future>>); @override _i8.Future clearSharedTransactionCache({ required _i2.CryptoCurrency? cryptoCurrency, - }) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], { - #cryptoCurrency: cryptoCurrency, - }), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + }) => + (super.noSuchMethod( + Invocation.method(#clearSharedTransactionCache, [], { + #cryptoCurrency: cryptoCurrency, + }), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } /// A class which mocks [TransactionNotificationTracker]. @@ -628,10 +753,15 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => (super.noSuchMethod( - Invocation.getter(#walletId), - returnValue: _i7.dummyValue(this, Invocation.getter(#walletId)), - ) as String); + String get walletId => + (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#walletId), + ), + ) + as String); @override List get pendings => @@ -639,41 +769,53 @@ class MockTransactionNotificationTracker extends _i1.Mock as List); @override - List get confirmeds => (super.noSuchMethod( - Invocation.getter(#confirmeds), - returnValue: [], - ) as List); + List get confirmeds => + (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) + as List); @override - bool wasNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedPending, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedPending(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedPending, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedPending(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedPending, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false, - ) as bool); + bool wasNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#wasNotifiedConfirmed, [txid]), + returnValue: false, + ) + as bool); @override - _i8.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( - Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future addNotifiedConfirmed(String? txid) => + (super.noSuchMethod( + Invocation.method(#addNotifiedConfirmed, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); @override - _i8.Future deleteTransaction(String? txid) => (super.noSuchMethod( - Invocation.method(#deleteTransaction, [txid]), - returnValue: _i8.Future.value(), - returnValueForMissingStub: _i8.Future.value(), - ) as _i8.Future); + _i8.Future deleteTransaction(String? txid) => + (super.noSuchMethod( + Invocation.method(#deleteTransaction, [txid]), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) + as _i8.Future); } diff --git a/test/widget_tests/address_book_card_test.mocks.dart b/test/widget_tests/address_book_card_test.mocks.dart index 69a4da3a6b..3736f21a61 100644 --- a/test/widget_tests/address_book_card_test.mocks.dart +++ b/test/widget_tests/address_book_card_test.mocks.dart @@ -4,11 +4,14 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; -import 'dart:ui' as _i5; +import 'dart:ui' as _i7; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/isar/models/contact_entry.dart' as _i2; import 'package:stackwallet/services/address_book_service.dart' as _i3; +import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart' + as _i6; +import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -97,6 +100,17 @@ class MockAddressBookService extends _i1.Mock ) as _i4.Future); + @override + _i4.Future updateMyStackContact( + Iterable<_i5.Wallet<_i6.CryptoCurrency>>? wallets, + ) => + (super.noSuchMethod( + Invocation.method(#updateMyStackContact, [wallets]), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); + @override _i4.Future removeContact(String? id) => (super.noSuchMethod( @@ -107,13 +121,13 @@ class MockAddressBookService extends _i1.Mock as _i4.Future); @override - void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#addListener, [listener]), returnValueForMissingStub: null, ); @override - void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null, ); From e2cf80a54b933f0fac374c665ba27f2bc94f9c5d Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 10 Nov 2026 14:12:29 -0600 Subject: [PATCH 3/3] test: refresh root test mocks --- test/cached_electrumx_test.mocks.dart | 1004 ++++++++++------- ...r_secure_storage_interface_test.mocks.dart | 254 +++-- 2 files changed, 726 insertions(+), 532 deletions(-) diff --git a/test/cached_electrumx_test.mocks.dart b/test/cached_electrumx_test.mocks.dart index 4d7104c80f..1fd47df1d1 100644 --- a/test/cached_electrumx_test.mocks.dart +++ b/test/cached_electrumx_test.mocks.dart @@ -73,25 +73,31 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { } @override - _i2.CryptoCurrency get cryptoCurrency => (super.noSuchMethod( - Invocation.getter(#cryptoCurrency), - returnValue: _FakeCryptoCurrency_0( - this, - Invocation.getter(#cryptoCurrency), - ), - ) as _i2.CryptoCurrency); + _i2.CryptoCurrency get cryptoCurrency => + (super.noSuchMethod( + Invocation.getter(#cryptoCurrency), + returnValue: _FakeCryptoCurrency_0( + this, + Invocation.getter(#cryptoCurrency), + ), + ) + as _i2.CryptoCurrency); @override - _i7.TorPlainNetworkOption get netType => (super.noSuchMethod( - Invocation.getter(#netType), - returnValue: _i7.TorPlainNetworkOption.tor, - ) as _i7.TorPlainNetworkOption); + _i7.TorPlainNetworkOption get netType => + (super.noSuchMethod( + Invocation.getter(#netType), + returnValue: _i7.TorPlainNetworkOption.tor, + ) + as _i7.TorPlainNetworkOption); @override - String get host => (super.noSuchMethod( - Invocation.getter(#host), - returnValue: _i8.dummyValue(this, Invocation.getter(#host)), - ) as String); + String get host => + (super.noSuchMethod( + Invocation.getter(#host), + returnValue: _i8.dummyValue(this, Invocation.getter(#host)), + ) + as String); @override int get port => @@ -103,20 +109,23 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { as bool); @override - int get currentFailoverIndex => (super.noSuchMethod( - Invocation.getter(#currentFailoverIndex), - returnValue: 0, - ) as int); + int get currentFailoverIndex => + (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) + as int); @override Duration get connectionTimeoutForSpecialCaseJsonRPCClients => (super.noSuchMethod( - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - returnValue: _FakeDuration_1( - this, - Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), - ), - ) as Duration); + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_1( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) + as Duration); @override set currentFailoverIndex(int? value) => super.noSuchMethod( @@ -125,18 +134,22 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { ); @override - _i9.Future closeAdapter() => (super.noSuchMethod( - Invocation.method(#closeAdapter, []), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future closeAdapter() => + (super.noSuchMethod( + Invocation.method(#closeAdapter, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future checkElectrumAdapter() => (super.noSuchMethod( - Invocation.method(#checkElectrumAdapter, []), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future checkElectrumAdapter() => + (super.noSuchMethod( + Invocation.method(#checkElectrumAdapter, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future request({ @@ -145,16 +158,18 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { String? requestID, int? retries = 2, Duration? requestTimeout = const Duration(seconds: 60), - }) => (super.noSuchMethod( - Invocation.method(#request, [], { - #command: command, - #args: args, - #requestID: requestID, - #retries: retries, - #requestTimeout: requestTimeout, - }), - returnValue: _i9.Future.value(), - ) as _i9.Future); + }) => + (super.noSuchMethod( + Invocation.method(#request, [], { + #command: command, + #args: args, + #requestID: requestID, + #retries: retries, + #requestTimeout: requestTimeout, + }), + returnValue: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future> batchRequest({ @@ -162,316 +177,372 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { required List? args, Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, - }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #requestTimeout: requestTimeout, - #retries: retries, - }), - returnValue: _i9.Future>.value([]), - ) as _i9.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#batchRequest, [], { + #command: command, + #args: args, + #requestTimeout: requestTimeout, + #retries: retries, + }), + returnValue: _i9.Future>.value([]), + ) + as _i9.Future>); @override _i9.Future ping({ String? requestID, int? retryCount = 1, Duration? timeout = const Duration(seconds: 30), - }) => (super.noSuchMethod( - Invocation.method(#ping, [], { - #requestID: requestID, - #retryCount: retryCount, - #timeout: timeout, - }), - returnValue: _i9.Future.value(false), - ) as _i9.Future); + }) => + (super.noSuchMethod( + Invocation.method(#ping, [], { + #requestID: requestID, + #retryCount: retryCount, + #timeout: timeout, + }), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); @override _i9.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: _i9.Future>.value( - {}, - ), - ) as _i9.Future>); + Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: _i9.Future>.value( - {}, - ), - ) as _i9.Future>); + Invocation.method(#getServerFeatures, [], {#requestID: requestID}), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future broadcastTransaction({ required String? rawTx, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - returnValue: _i9.Future.value( - _i8.dummyValue( - this, - Invocation.method(#broadcastTransaction, [], { - #rawTx: rawTx, - #requestID: requestID, - }), - ), - ), - ) as _i9.Future); + }) => + (super.noSuchMethod( + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + returnValue: _i9.Future.value( + _i8.dummyValue( + this, + Invocation.method(#broadcastTransaction, [], { + #rawTx: rawTx, + #requestID: requestID, + }), + ), + ), + ) + as _i9.Future); @override _i9.Future> getBalance({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i9.Future>.value({}), - ) as _i9.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getBalance, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future>> getHistory({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i9.Future>>.value( - >[], - ), - ) as _i9.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getHistory, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i9.Future>>.value( + >[], + ), + ) + as _i9.Future>>); @override _i9.Future>>> getBatchHistory({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: _i9.Future>>>.value( - >>[], - ), - ) as _i9.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchHistory, [], {#args: args}), + returnValue: _i9.Future>>>.value( + >>[], + ), + ) + as _i9.Future>>>); @override _i9.Future>> getUTXOs({ required String? scripthash, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getUTXOs, [], { - #scripthash: scripthash, - #requestID: requestID, - }), - returnValue: _i9.Future>>.value( - >[], - ), - ) as _i9.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getUTXOs, [], { + #scripthash: scripthash, + #requestID: requestID, + }), + returnValue: _i9.Future>>.value( + >[], + ), + ) + as _i9.Future>>); @override _i9.Future>>> getBatchUTXOs({ required List? args, - }) => (super.noSuchMethod( - Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: _i9.Future>>>.value( - >>[], - ), - ) as _i9.Future>>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchUTXOs, [], {#args: args}), + returnValue: _i9.Future>>>.value( + >>[], + ), + ) + as _i9.Future>>>); @override _i9.Future> getTransaction({ required String? txHash, bool? verbose = true, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], { - #txHash: txHash, - #verbose: verbose, - #requestID: requestID, - }), - returnValue: _i9.Future>.value({}), - ) as _i9.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getTransaction, [], { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future>> getBatchTransactions({ required List? txHashes, String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getBatchTransactions, [], { - #txHashes: txHashes, - #requestID: requestID, - }), - returnValue: _i9.Future>>.value( - >[], - ), - ) as _i9.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getBatchTransactions, [], { + #txHashes: txHashes, + #requestID: requestID, + }), + returnValue: _i9.Future>>.value( + >[], + ), + ) + as _i9.Future>>); @override _i9.Future> getLelantusAnonymitySet({ String? groupId = '1', String? blockhash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID, - }), - returnValue: _i9.Future>.value({}), - ) as _i9.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusAnonymitySet, [], { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future getLelantusMintData({dynamic mints, String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusMintData, [], { - #mints: mints, - #requestID: requestID, - }), - returnValue: _i9.Future.value(), - ) as _i9.Future); + Invocation.method(#getLelantusMintData, [], { + #mints: mints, + #requestID: requestID, + }), + returnValue: _i9.Future.value(), + ) + as _i9.Future); @override _i9.Future> getLelantusUsedCoinSerials({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getLelantusUsedCoinSerials, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i9.Future>.value({}), - ) as _i9.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getLelantusUsedCoinSerials, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future getLelantusLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLelantusLatestCoinId, [], { - #requestID: requestID, - }), - returnValue: _i9.Future.value(0), - ) as _i9.Future); + Invocation.method(#getLelantusLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i9.Future.value(0), + ) + as _i9.Future); @override _i9.Future> getSparkAnonymitySet({ String? coinGroupId = '1', String? startBlockHash = '', String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkAnonymitySet, [], { - #coinGroupId: coinGroupId, - #startBlockHash: startBlockHash, - #requestID: requestID, - }), - returnValue: _i9.Future>.value({}), - ) as _i9.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkAnonymitySet, [], { + #coinGroupId: coinGroupId, + #startBlockHash: startBlockHash, + #requestID: requestID, + }), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future getSparkLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getSparkLatestCoinId, [], {#requestID: requestID}), - returnValue: _i9.Future.value(0), - ) as _i9.Future); + Invocation.method(#getSparkLatestCoinId, [], { + #requestID: requestID, + }), + returnValue: _i9.Future.value(0), + ) + as _i9.Future); @override _i9.Future> getMempoolTxids({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), - returnValue: _i9.Future>.value({}), - ) as _i9.Future>); + Invocation.method(#getMempoolTxids, [], {#requestID: requestID}), + returnValue: _i9.Future>.value({}), + ) + as _i9.Future>); @override _i9.Future> getMempoolSparkData({ String? requestID, required List? txids, - }) => (super.noSuchMethod( - Invocation.method(#getMempoolSparkData, [], { - #requestID: requestID, - #txids: txids, - }), - returnValue: _i9.Future>.value( - <_i3.SparkMempoolData>[], - ), - ) as _i9.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getMempoolSparkData, [], { + #requestID: requestID, + #txids: txids, + }), + returnValue: _i9.Future>.value( + <_i3.SparkMempoolData>[], + ), + ) + as _i9.Future>); @override _i9.Future>> getSparkUnhashedUsedCoinsTagsWithTxHashes({ String? requestID, required int? startNumber, - }) => (super.noSuchMethod( - Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { - #requestID: requestID, - #startNumber: startNumber, - }), - returnValue: _i9.Future>>.value(>[]), - ) as _i9.Future>>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkUnhashedUsedCoinsTagsWithTxHashes, [], { + #requestID: requestID, + #startNumber: startNumber, + }), + returnValue: _i9.Future>>.value( + >[], + ), + ) + as _i9.Future>>); @override _i9.Future> getSparkNames({ String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNames, [], {#requestID: requestID}), - returnValue: _i9.Future>.value( - <({String address, String name})>[], - ), - ) as _i9.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#getSparkNames, [], {#requestID: requestID}), + returnValue: + _i9.Future>.value( + <({String address, String name})>[], + ), + ) + as _i9.Future>); @override _i9.Future<({String additionalInfo, String address, int validUntil})> - getSparkNameData({ - required String? sparkName, - String? requestID, - }) => (super.noSuchMethod( - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - returnValue: - _i9.Future< - ({String additionalInfo, String address, int validUntil}) - >.value(( - additionalInfo: _i8.dummyValue( - this, - Invocation.method(#getSparkNameData, [], { - #sparkName: sparkName, - #requestID: requestID, - }), - ), - address: _i8.dummyValue( - this, + getSparkNameData({required String? sparkName, String? requestID}) => + (super.noSuchMethod( Invocation.method(#getSparkNameData, [], { #sparkName: sparkName, #requestID: requestID, }), - ), - validUntil: 0, - )), - ) as _i9.Future<({String additionalInfo, String address, int validUntil})>); + returnValue: + _i9.Future< + ({String additionalInfo, String address, int validUntil}) + >.value(( + additionalInfo: _i8.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + address: _i8.dummyValue( + this, + Invocation.method(#getSparkNameData, [], { + #sparkName: sparkName, + #requestID: requestID, + }), + ), + validUntil: 0, + )), + ) + as _i9.Future< + ({String additionalInfo, String address, int validUntil}) + >); @override _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>); + }) => + (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({ @@ -480,70 +551,79 @@ class MockElectrumXClient extends _i1.Mock implements _i6.ElectrumXClient { 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>); + }) => + (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, - }) => (super.noSuchMethod( - Invocation.method(#isMasterNodeCollateral, [], { - #requestID: requestID, - #txid: txid, - #index: index, - }), - returnValue: _i9.Future.value(false), - ) as _i9.Future); + }) => + (super.noSuchMethod( + Invocation.method(#isMasterNodeCollateral, [], { + #requestID: requestID, + #txid: txid, + #index: index, + }), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); @override _i9.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: _i9.Future>.value( - {}, - ), - ) as _i9.Future>); + Invocation.method(#getFeeRate, [], {#requestID: requestID}), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.Future>); @override _i9.Future<_i4.Decimal> estimateFee({ String? requestID, required int? blocks, - }) => (super.noSuchMethod( - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - returnValue: _i9.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#estimateFee, [], { - #requestID: requestID, - #blocks: blocks, - }), - ), - ), - ) as _i9.Future<_i4.Decimal>); - - @override - _i9.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: _i9.Future<_i4.Decimal>.value( - _FakeDecimal_3( - this, - Invocation.method(#relayFee, [], {#requestID: requestID}), - ), - ), - ) as _i9.Future<_i4.Decimal>); + }) => + (super.noSuchMethod( + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + returnValue: _i9.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#estimateFee, [], { + #requestID: requestID, + #blocks: blocks, + }), + ), + ), + ) + as _i9.Future<_i4.Decimal>); + + @override + _i9.Future<_i4.Decimal> relayFee({String? requestID}) => + (super.noSuchMethod( + Invocation.method(#relayFee, [], {#requestID: requestID}), + returnValue: _i9.Future<_i4.Decimal>.value( + _FakeDecimal_3( + this, + Invocation.method(#relayFee, [], {#requestID: requestID}), + ), + ), + ) + as _i9.Future<_i4.Decimal>); } /// A class which mocks [Prefs]. @@ -560,10 +640,12 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { as bool); @override - int get lastUnlockedTimeout => (super.noSuchMethod( - Invocation.getter(#lastUnlockedTimeout), - returnValue: 0, - ) as int); + int get lastUnlockedTimeout => + (super.noSuchMethod( + Invocation.getter(#lastUnlockedTimeout), + returnValue: 0, + ) + as int); @override int get lastUnlocked => @@ -571,22 +653,28 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { as int); @override - int get currentNotificationId => (super.noSuchMethod( - Invocation.getter(#currentNotificationId), - returnValue: 0, - ) as int); + int get currentNotificationId => + (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) + as int); @override - List get walletIdsSyncOnStartup => (super.noSuchMethod( - Invocation.getter(#walletIdsSyncOnStartup), - returnValue: [], - ) as List); + List get walletIdsSyncOnStartup => + (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) + as List); @override - _i11.SyncingType get syncType => (super.noSuchMethod( - Invocation.getter(#syncType), - returnValue: _i11.SyncingType.currentWalletOnly, - ) as _i11.SyncingType); + _i11.SyncingType get syncType => + (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i11.SyncingType.currentWalletOnly, + ) + as _i11.SyncingType); @override bool get wifiOnly => @@ -594,22 +682,34 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { as bool); @override - bool get showFavoriteWallets => (super.noSuchMethod( - Invocation.getter(#showFavoriteWallets), - returnValue: false, - ) as bool); + bool get showFavoriteWallets => + (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) + as bool); @override - String get language => (super.noSuchMethod( - Invocation.getter(#language), - returnValue: _i8.dummyValue(this, Invocation.getter(#language)), - ) as String); + String get language => + (super.noSuchMethod( + Invocation.getter(#language), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#language), + ), + ) + as String); @override - String get currency => (super.noSuchMethod( - Invocation.getter(#currency), - returnValue: _i8.dummyValue(this, Invocation.getter(#currency)), - ) as String); + String get currency => + (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#currency), + ), + ) + as String); @override bool get randomizePIN => @@ -632,10 +732,12 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { as bool); @override - bool get biometricsDuress => (super.noSuchMethod( - Invocation.getter(#biometricsDuress), - returnValue: false, - ) as bool); + bool get biometricsDuress => + (super.noSuchMethod( + Invocation.getter(#biometricsDuress), + returnValue: false, + ) + as bool); @override int get familiarity => @@ -648,34 +750,44 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { as bool); @override - bool get showTestNetCoins => (super.noSuchMethod( - Invocation.getter(#showTestNetCoins), - returnValue: false, - ) as bool); + bool get showTestNetCoins => + (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) + as bool); @override - bool get isAutoBackupEnabled => (super.noSuchMethod( - Invocation.getter(#isAutoBackupEnabled), - returnValue: false, - ) as bool); + bool get isAutoBackupEnabled => + (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) + as bool); @override - _i12.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( - Invocation.getter(#backupFrequencyType), - returnValue: _i12.BackupFrequencyType.everyTenMinutes, - ) as _i12.BackupFrequencyType); + _i12.BackupFrequencyType get backupFrequencyType => + (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i12.BackupFrequencyType.everyTenMinutes, + ) + as _i12.BackupFrequencyType); @override - bool get hideBlockExplorerWarning => (super.noSuchMethod( - Invocation.getter(#hideBlockExplorerWarning), - returnValue: false, - ) as bool); + bool get hideBlockExplorerWarning => + (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) + as bool); @override - bool get gotoWalletOnStartup => (super.noSuchMethod( - Invocation.getter(#gotoWalletOnStartup), - returnValue: false, - ) as bool); + bool get gotoWalletOnStartup => + (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) + as bool); @override bool get externalCalls => @@ -683,40 +795,53 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { as bool); @override - bool get enableCoinControl => (super.noSuchMethod( - Invocation.getter(#enableCoinControl), - returnValue: false, - ) as bool); + bool get enableCoinControl => + (super.noSuchMethod( + Invocation.getter(#enableCoinControl), + returnValue: false, + ) + as bool); @override - bool get enableSystemBrightness => (super.noSuchMethod( - Invocation.getter(#enableSystemBrightness), - returnValue: false, - ) as bool); + bool get enableSystemBrightness => + (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) + as bool); @override - String get themeId => (super.noSuchMethod( - Invocation.getter(#themeId), - returnValue: _i8.dummyValue(this, Invocation.getter(#themeId)), - ) as String); + String get themeId => + (super.noSuchMethod( + Invocation.getter(#themeId), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#themeId), + ), + ) + as String); @override - String get systemBrightnessLightThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessLightThemeId), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#systemBrightnessLightThemeId), - ), - ) as String); + String get systemBrightnessLightThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightThemeId), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#systemBrightnessLightThemeId), + ), + ) + as String); @override - String get systemBrightnessDarkThemeId => (super.noSuchMethod( - Invocation.getter(#systemBrightnessDarkThemeId), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#systemBrightnessDarkThemeId), - ), - ) as String); + String get systemBrightnessDarkThemeId => + (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkThemeId), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#systemBrightnessDarkThemeId), + ), + ) + as String); @override bool get useTor => @@ -729,28 +854,36 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { as bool); @override - bool get enableExchange => (super.noSuchMethod( - Invocation.getter(#enableExchange), - returnValue: false, - ) as bool); + bool get enableExchange => + (super.noSuchMethod( + Invocation.getter(#enableExchange), + returnValue: false, + ) + as bool); @override - bool get advancedFiroFeatures => (super.noSuchMethod( - Invocation.getter(#advancedFiroFeatures), - returnValue: false, - ) as bool); + bool get advancedFiroFeatures => + (super.noSuchMethod( + Invocation.getter(#advancedFiroFeatures), + returnValue: false, + ) + as bool); @override - _i13.Level get logLevel => (super.noSuchMethod( - Invocation.getter(#logLevel), - returnValue: _i13.Level.all, - ) as _i13.Level); + _i13.Level get logLevel => + (super.noSuchMethod( + Invocation.getter(#logLevel), + returnValue: _i13.Level.all, + ) + as _i13.Level); @override - ({bool enabled, int minutes}) get autoLockInfo => (super.noSuchMethod( - Invocation.getter(#autoLockInfo), - returnValue: (enabled: false, minutes: 0), - ) as ({bool enabled, int minutes})); + ({bool enabled, int minutes}) get autoLockInfo => + (super.noSuchMethod( + Invocation.getter(#autoLockInfo), + returnValue: (enabled: false, minutes: 0), + ) + as ({bool enabled, int minutes})); @override bool get privacyScreen => @@ -758,10 +891,12 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { as bool); @override - bool get disableScreenShots => (super.noSuchMethod( - Invocation.getter(#disableScreenShots), - returnValue: false, - ) as bool); + bool get disableScreenShots => + (super.noSuchMethod( + Invocation.getter(#disableScreenShots), + returnValue: false, + ) + as bool); @override set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( @@ -1010,43 +1145,55 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { as bool); @override - _i9.Future init() => (super.noSuchMethod( - Invocation.method(#init, []), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future init() => + (super.noSuchMethod( + Invocation.method(#init, []), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method(#incrementCurrentNotificationIndex, []), - returnValue: _i9.Future.value(0), - ) as _i9.Future); + _i9.Future incrementCurrentNotificationIndex() => + (super.noSuchMethod( + Invocation.method(#incrementCurrentNotificationIndex, []), + returnValue: _i9.Future.value(0), + ) + as _i9.Future); @override - _i9.Future isExternalCallsSet() => (super.noSuchMethod( - Invocation.method(#isExternalCallsSet, []), - returnValue: _i9.Future.value(false), - ) as _i9.Future); + _i9.Future isExternalCallsSet() => + (super.noSuchMethod( + Invocation.method(#isExternalCallsSet, []), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); @override - _i9.Future saveUserID(String? userId) => (super.noSuchMethod( - Invocation.method(#saveUserID, [userId]), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future saveUserID(String? userId) => + (super.noSuchMethod( + Invocation.method(#saveUserID, [userId]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i9.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( - Invocation.method(#saveSignupEpoch, [signupEpoch]), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); + _i9.Future saveSignupEpoch(int? signupEpoch) => + (super.noSuchMethod( + Invocation.method(#saveSignupEpoch, [signupEpoch]), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) + as _i9.Future); @override - _i14.AmountUnit amountUnit(_i2.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method(#amountUnit, [coin]), - returnValue: _i14.AmountUnit.normal, - ) as _i14.AmountUnit); + _i14.AmountUnit amountUnit(_i2.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#amountUnit, [coin]), + returnValue: _i14.AmountUnit.normal, + ) + as _i14.AmountUnit); @override void updateAmountUnit({ @@ -1061,10 +1208,12 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { ); @override - int maxDecimals(_i2.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method(#maxDecimals, [coin]), - returnValue: 0, - ) as int); + int maxDecimals(_i2.CryptoCurrency? coin) => + (super.noSuchMethod( + Invocation.method(#maxDecimals, [coin]), + returnValue: 0, + ) + as int); @override void updateMaxDecimals({ @@ -1081,12 +1230,13 @@ class MockPrefs extends _i1.Mock implements _i10.Prefs { @override _i5.FusionInfo getFusionServerInfo(_i2.CryptoCurrency? coin) => (super.noSuchMethod( - Invocation.method(#getFusionServerInfo, [coin]), - returnValue: _FakeFusionInfo_4( - this, - Invocation.method(#getFusionServerInfo, [coin]), - ), - ) as _i5.FusionInfo); + Invocation.method(#getFusionServerInfo, [coin]), + returnValue: _FakeFusionInfo_4( + this, + Invocation.method(#getFusionServerInfo, [coin]), + ), + ) + as _i5.FusionInfo); @override void setFusionServerInfo( diff --git a/test/flutter_secure_storage_interface_test.mocks.dart b/test/flutter_secure_storage_interface_test.mocks.dart index 332ec379c7..209dcc62f8 100644 --- a/test/flutter_secure_storage_interface_test.mocks.dart +++ b/test/flutter_secure_storage_interface_test.mocks.dart @@ -66,47 +66,75 @@ class MockFlutterSecureStorage extends _i1.Mock } @override - _i2.IOSOptions get iOptions => (super.noSuchMethod( - Invocation.getter(#iOptions), - returnValue: _FakeIOSOptions_0(this, Invocation.getter(#iOptions)), - ) as _i2.IOSOptions); + _i2.IOSOptions get iOptions => + (super.noSuchMethod( + Invocation.getter(#iOptions), + returnValue: _FakeIOSOptions_0(this, Invocation.getter(#iOptions)), + ) + as _i2.IOSOptions); @override - _i2.AndroidOptions get aOptions => (super.noSuchMethod( - Invocation.getter(#aOptions), - returnValue: _FakeAndroidOptions_1(this, Invocation.getter(#aOptions)), - ) as _i2.AndroidOptions); + _i2.AndroidOptions get aOptions => + (super.noSuchMethod( + Invocation.getter(#aOptions), + returnValue: _FakeAndroidOptions_1( + this, + Invocation.getter(#aOptions), + ), + ) + as _i2.AndroidOptions); @override - _i2.LinuxOptions get lOptions => (super.noSuchMethod( - Invocation.getter(#lOptions), - returnValue: _FakeLinuxOptions_2(this, Invocation.getter(#lOptions)), - ) as _i2.LinuxOptions); + _i2.LinuxOptions get lOptions => + (super.noSuchMethod( + Invocation.getter(#lOptions), + returnValue: _FakeLinuxOptions_2( + this, + Invocation.getter(#lOptions), + ), + ) + as _i2.LinuxOptions); @override - _i2.WindowsOptions get wOptions => (super.noSuchMethod( - Invocation.getter(#wOptions), - returnValue: _FakeWindowsOptions_3(this, Invocation.getter(#wOptions)), - ) as _i2.WindowsOptions); + _i2.WindowsOptions get wOptions => + (super.noSuchMethod( + Invocation.getter(#wOptions), + returnValue: _FakeWindowsOptions_3( + this, + Invocation.getter(#wOptions), + ), + ) + as _i2.WindowsOptions); @override - _i2.WebOptions get webOptions => (super.noSuchMethod( - Invocation.getter(#webOptions), - returnValue: _FakeWebOptions_4(this, Invocation.getter(#webOptions)), - ) as _i2.WebOptions); + _i2.WebOptions get webOptions => + (super.noSuchMethod( + Invocation.getter(#webOptions), + returnValue: _FakeWebOptions_4( + this, + Invocation.getter(#webOptions), + ), + ) + as _i2.WebOptions); @override - _i2.AppleOptions get mOptions => (super.noSuchMethod( - Invocation.getter(#mOptions), - returnValue: _FakeAppleOptions_5(this, Invocation.getter(#mOptions)), - ) as _i2.AppleOptions); + _i2.AppleOptions get mOptions => + (super.noSuchMethod( + Invocation.getter(#mOptions), + returnValue: _FakeAppleOptions_5( + this, + Invocation.getter(#mOptions), + ), + ) + as _i2.AppleOptions); @override Map>> get getListeners => (super.noSuchMethod( - Invocation.getter(#getListeners), - returnValue: >>{}, - ) as Map>>); + Invocation.getter(#getListeners), + returnValue: >>{}, + ) + as Map>>); @override void registerListener({ @@ -152,20 +180,22 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WebOptions? webOptions, _i2.AppleOptions? mOptions, _i2.WindowsOptions? wOptions, - }) => (super.noSuchMethod( - Invocation.method(#write, [], { - #key: key, - #value: value, - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + }) => + (super.noSuchMethod( + Invocation.method(#write, [], { + #key: key, + #value: value, + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i4.Future read({ @@ -176,18 +206,20 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WebOptions? webOptions, _i2.AppleOptions? mOptions, _i2.WindowsOptions? wOptions, - }) => (super.noSuchMethod( - Invocation.method(#read, [], { - #key: key, - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }), - returnValue: _i4.Future.value(), - ) as _i4.Future); + }) => + (super.noSuchMethod( + Invocation.method(#read, [], { + #key: key, + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i4.Future.value(), + ) + as _i4.Future); @override _i4.Future containsKey({ @@ -198,18 +230,20 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WebOptions? webOptions, _i2.AppleOptions? mOptions, _i2.WindowsOptions? wOptions, - }) => (super.noSuchMethod( - Invocation.method(#containsKey, [], { - #key: key, - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }), - returnValue: _i4.Future.value(false), - ) as _i4.Future); + }) => + (super.noSuchMethod( + Invocation.method(#containsKey, [], { + #key: key, + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i4.Future.value(false), + ) + as _i4.Future); @override _i4.Future delete({ @@ -220,19 +254,21 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WebOptions? webOptions, _i2.AppleOptions? mOptions, _i2.WindowsOptions? wOptions, - }) => (super.noSuchMethod( - Invocation.method(#delete, [], { - #key: key, - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + }) => + (super.noSuchMethod( + Invocation.method(#delete, [], { + #key: key, + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override _i4.Future> readAll({ @@ -242,17 +278,21 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WebOptions? webOptions, _i2.AppleOptions? mOptions, _i2.WindowsOptions? wOptions, - }) => (super.noSuchMethod( - Invocation.method(#readAll, [], { - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }), - returnValue: _i4.Future>.value({}), - ) as _i4.Future>); + }) => + (super.noSuchMethod( + Invocation.method(#readAll, [], { + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i4.Future>.value( + {}, + ), + ) + as _i4.Future>); @override _i4.Future deleteAll({ @@ -262,22 +302,26 @@ class MockFlutterSecureStorage extends _i1.Mock _i2.WebOptions? webOptions, _i2.AppleOptions? mOptions, _i2.WindowsOptions? wOptions, - }) => (super.noSuchMethod( - Invocation.method(#deleteAll, [], { - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions, - }), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + }) => + (super.noSuchMethod( + Invocation.method(#deleteAll, [], { + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) + as _i4.Future); @override - _i4.Future isCupertinoProtectedDataAvailable() => (super.noSuchMethod( - Invocation.method(#isCupertinoProtectedDataAvailable, []), - returnValue: _i4.Future.value(), - ) as _i4.Future); + _i4.Future isCupertinoProtectedDataAvailable() => + (super.noSuchMethod( + Invocation.method(#isCupertinoProtectedDataAvailable, []), + returnValue: _i4.Future.value(), + ) + as _i4.Future); }