From 44aab53c9ff71e0bbcdba47bf4154bf8a9c3535a Mon Sep 17 00:00:00 2001 From: Diego Salazar Date: Thu, 27 Jul 2023 11:38:28 -0600 Subject: [PATCH 01/14] Bump version (v1.7.17, build 183) --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d3c93e77a..dc984bcb8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Stack Wallet # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.7.16+182 +version: 1.7.17+183 environment: sdk: ">=3.0.2 <4.0.0" From c584cb862dd445944ca055eaa0230fe00080ab29 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 27 Jul 2023 14:47:16 -0500 Subject: [PATCH 02/14] don't assume list isn't null --- lib/services/litescribe_api.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/services/litescribe_api.dart b/lib/services/litescribe_api.dart index d5cd3d733..0822c34a7 100644 --- a/lib/services/litescribe_api.dart +++ b/lib/services/litescribe_api.dart @@ -44,7 +44,10 @@ class LitescribeAPI { // Check if the number of returned inscriptions equals the limit final list = response.data['result']['list']; final int total = response.data['result']['total'] as int; - final int currentSize = list.length as int; + int currentSize = 0; + if (list != null) { + currentSize = list.length as int; + } if (currentSize == size && currentSize < total) { // If the number of returned inscriptions equals the limit and there are more inscriptions available, From c847656ca5d86174fd27f53a5dde605d5f57f15a Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 27 Jul 2023 14:47:22 -0500 Subject: [PATCH 03/14] autoformatting --- lib/services/litescribe_api.dart | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/services/litescribe_api.dart b/lib/services/litescribe_api.dart index 0822c34a7..ab713e0f9 100644 --- a/lib/services/litescribe_api.dart +++ b/lib/services/litescribe_api.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:http/http.dart' as http; +import 'package:http/http.dart' as http; import 'package:stackwallet/dto/ordinals/inscription_data.dart'; import 'package:stackwallet/dto/ordinals/litescribe_response.dart'; @@ -21,7 +21,8 @@ class LitescribeAPI { if (response.statusCode == 200) { return LitescribeResponse(data: _validateJson(response.body)); } else { - throw Exception('LitescribeAPI _getResponse exception: Failed to load data'); + throw Exception( + 'LitescribeAPI _getResponse exception: Failed to load data'); } } @@ -30,16 +31,19 @@ class LitescribeAPI { if (parsed is Map) { return parsed; } else { - throw const FormatException('LitescribeAPI _validateJson exception: Invalid JSON format'); + throw const FormatException( + 'LitescribeAPI _validateJson exception: Invalid JSON format'); } } - Future> getInscriptionsByAddress(String address, {int cursor = 0, int size = 1000}) async { + Future> getInscriptionsByAddress(String address, + {int cursor = 0, int size = 1000}) async { // size param determines how many inscriptions are returned per response // default of 1000 is used to cover most addresses (I assume) // if the total number of inscriptions at the address exceeds the length of the list of inscriptions returned, another call with a higher size is made final int defaultLimit = 1000; - final response = await _getResponse('/address/inscriptions?address=$address&cursor=$cursor&size=$size'); + final response = await _getResponse( + '/address/inscriptions?address=$address&cursor=$cursor&size=$size'); // Check if the number of returned inscriptions equals the limit final list = response.data['result']['list']; @@ -54,18 +58,19 @@ class LitescribeAPI { // increment the cursor and make the next API call to fetch the remaining inscriptions. final int newCursor = cursor + size; return getInscriptionsByAddress(address, cursor: newCursor, size: size); - } else { try { // Iterate through the list and create InscriptionData objects from each element final List inscriptions = (list as List) - .map((json) => InscriptionData.fromJson(json as Map)) + .map((json) => + InscriptionData.fromJson(json as Map)) .toList(); return inscriptions; } catch (e) { - throw const FormatException('LitescribeAPI getInscriptionsByAddress exception: AddressInscriptionResponse.fromJson failure'); + throw const FormatException( + 'LitescribeAPI getInscriptionsByAddress exception: AddressInscriptionResponse.fromJson failure'); } } } -} \ No newline at end of file +} From 1674c04020142c411dd79af3cc9cdf2fe6d78037 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 27 Jul 2023 14:47:29 -0500 Subject: [PATCH 04/14] test mock update --- test/widget_tests/table_view/table_view_row_test.mocks.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/widget_tests/table_view/table_view_row_test.mocks.dart b/test/widget_tests/table_view/table_view_row_test.mocks.dart index cfae6ecb9..92a96f9a3 100644 --- a/test/widget_tests/table_view/table_view_row_test.mocks.dart +++ b/test/widget_tests/table_view/table_view_row_test.mocks.dart @@ -2203,6 +2203,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasFusionSupport => (super.noSuchMethod( + Invocation.getter(#hasFusionSupport), + returnValue: false, + ) as bool); + @override bool get hasTokenSupport => (super.noSuchMethod( Invocation.getter(#hasTokenSupport), returnValue: false, From 8b8ce89ced603b7dc0c82fe14e401117b6892c47 Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Thu, 27 Jul 2023 14:08:08 -0600 Subject: [PATCH 05/14] Monkey option only shows for banano wallets --- lib/pages/wallet_view/wallet_view.dart | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/lib/pages/wallet_view/wallet_view.dart b/lib/pages/wallet_view/wallet_view.dart index 5e9fc8eba..33126e8ac 100644 --- a/lib/pages/wallet_view/wallet_view.dart +++ b/lib/pages/wallet_view/wallet_view.dart @@ -927,22 +927,23 @@ class _WalletViewState extends ConsumerState { ); }, ), - WalletNavigationBarItemData( - icon: SvgPicture.asset( - Assets.svg.monkey, - height: 20, - width: 20, - color: Theme.of(context) - .extension()! - .bottomNavIconIcon, - ), - label: "MonKey", - onTap: () { - Navigator.of(context).pushNamed( - MonkeyView.routeName, - arguments: widget.walletId, - ); - }), + if (coin == Coin.banano) + WalletNavigationBarItemData( + icon: SvgPicture.asset( + Assets.svg.monkey, + height: 20, + width: 20, + color: Theme.of(context) + .extension()! + .bottomNavIconIcon, + ), + label: "MonKey", + onTap: () { + Navigator.of(context).pushNamed( + MonkeyView.routeName, + arguments: widget.walletId, + ); + }), if (ref.watch( walletsChangeNotifierProvider.select( (value) => value From 5f604eba3cb1daefa72672de53fd1b5d5e24c3ab Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 27 Jul 2023 15:32:18 -0500 Subject: [PATCH 06/14] fix response-counting logic could be improved yet... --- lib/services/litescribe_api.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/services/litescribe_api.dart b/lib/services/litescribe_api.dart index ab713e0f9..1acc047b8 100644 --- a/lib/services/litescribe_api.dart +++ b/lib/services/litescribe_api.dart @@ -46,13 +46,16 @@ class LitescribeAPI { '/address/inscriptions?address=$address&cursor=$cursor&size=$size'); // Check if the number of returned inscriptions equals the limit - final list = response.data['result']['list']; final int total = response.data['result']['total'] as int; + int currentSize = 0; - if (list != null) { - currentSize = list.length as int; + if (total == 0) { + return []; } + final list = response.data['result']!['list']; + currentSize = list.length as int; + if (currentSize == size && currentSize < total) { // If the number of returned inscriptions equals the limit and there are more inscriptions available, // increment the cursor and make the next API call to fetch the remaining inscriptions. From c44623a8eaf2c64785cade0b40e6c346f757395c Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 27 Jul 2023 15:32:32 -0500 Subject: [PATCH 07/14] hasWhirlpoolSupport->hasOrdinalsSupport --- .../wallet_view/sub_widgets/desktop_wallet_features.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart index 2a6cadf11..7679956f3 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart @@ -354,7 +354,7 @@ class _DesktopWalletFeaturesState extends ConsumerState { manager.coin == Coin.firoTestNet || manager.hasWhirlpoolSupport || manager.coin == Coin.banano || - manager.hasWhirlpoolSupport; + manager.hasOrdinalsSupport; return Row( children: [ if (Constants.enableExchange) From 085895fb4df1d6ab3225e6b9a69a9e57d7c9ca51 Mon Sep 17 00:00:00 2001 From: Diego Salazar Date: Thu, 27 Jul 2023 11:38:28 -0600 Subject: [PATCH 08/14] Bump version (v1.7.17, build 183) --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d3c93e77a..dc984bcb8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Stack Wallet # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.7.16+182 +version: 1.7.17+183 environment: sdk: ">=3.0.2 <4.0.0" From 7765ed2465e0e70cd35ea71bcbcebc7f21a5980e Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 27 Jul 2023 14:39:48 -0600 Subject: [PATCH 09/14] fix request timeout bug --- lib/electrumx_rpc/electrumx.dart | 69 +++++++++++++++++++------------- lib/electrumx_rpc/rpc.dart | 19 ++++++--- 2 files changed, 54 insertions(+), 34 deletions(-) diff --git a/lib/electrumx_rpc/electrumx.dart b/lib/electrumx_rpc/electrumx.dart index 804a1364c..c9417116d 100644 --- a/lib/electrumx_rpc/electrumx.dart +++ b/lib/electrumx_rpc/electrumx.dart @@ -69,13 +69,18 @@ class ElectrumX { List? failovers; int currentFailoverIndex = -1; - ElectrumX( - {required String host, - required int port, - required bool useSSL, - required Prefs prefs, - required List failovers, - JsonRPC? client}) { + final Duration connectionTimeoutForSpecialCaseJsonRPCClients; + + ElectrumX({ + required String host, + required int port, + required bool useSSL, + required Prefs prefs, + required List failovers, + JsonRPC? client, + this.connectionTimeoutForSpecialCaseJsonRPCClients = + const Duration(seconds: 60), + }) { _prefs = prefs; _host = host; _port = port; @@ -108,9 +113,9 @@ class ElectrumX { Future request({ required String command, List args = const [], - Duration connectionTimeout = const Duration(seconds: 60), String? requestID, int retries = 2, + Duration requestTimeout = const Duration(seconds: 60), }) async { if (!(await _allow())) { throw WifiOnlyException(); @@ -121,26 +126,31 @@ class ElectrumX { host: host, port: port, useSSL: useSSL, - connectionTimeout: connectionTimeout, + connectionTimeout: connectionTimeoutForSpecialCaseJsonRPCClients, ); } else { _rpcClient = JsonRPC( host: failovers![currentFailoverIndex].address, port: failovers![currentFailoverIndex].port, useSSL: failovers![currentFailoverIndex].useSSL, - connectionTimeout: connectionTimeout, + connectionTimeout: connectionTimeoutForSpecialCaseJsonRPCClients, ); } try { final requestId = requestID ?? const Uuid().v1(); final jsonArgs = json.encode(args); - final jsonRequestString = - '{"jsonrpc": "2.0", "id": "$requestId","method": "$command","params": $jsonArgs}'; + final jsonRequestString = '{"jsonrpc": "2.0", ' + '"id": "$requestId",' + '"method": "$command",' + '"params": $jsonArgs}'; // Logging.instance.log("ElectrumX jsonRequestString: $jsonRequestString"); - final response = await _rpcClient!.request(jsonRequestString); + final response = await _rpcClient!.request( + jsonRequestString, + requestTimeout, + ); if (response.exception != null) { throw response.exception!; @@ -174,7 +184,7 @@ class ElectrumX { return request( command: command, args: args, - connectionTimeout: connectionTimeout, + requestTimeout: requestTimeout, requestID: requestID, retries: retries - 1, ); @@ -187,7 +197,7 @@ class ElectrumX { return request( command: command, args: args, - connectionTimeout: connectionTimeout, + requestTimeout: requestTimeout, requestID: requestID, ); } else { @@ -204,7 +214,7 @@ class ElectrumX { Future>> batchRequest({ required String command, required Map> args, - Duration connectionTimeout = const Duration(seconds: 60), + Duration requestTimeout = const Duration(seconds: 60), int retries = 2, }) async { if (!(await _allow())) { @@ -216,14 +226,14 @@ class ElectrumX { host: host, port: port, useSSL: useSSL, - connectionTimeout: connectionTimeout, + connectionTimeout: connectionTimeoutForSpecialCaseJsonRPCClients, ); } else { _rpcClient = JsonRPC( host: failovers![currentFailoverIndex].address, port: failovers![currentFailoverIndex].port, useSSL: failovers![currentFailoverIndex].useSSL, - connectionTimeout: connectionTimeout, + connectionTimeout: connectionTimeoutForSpecialCaseJsonRPCClients, ); } @@ -246,7 +256,8 @@ class ElectrumX { // Logging.instance.log("batch request: $request"); // send batch request - final jsonRpcResponse = (await _rpcClient!.request(request)); + final jsonRpcResponse = + (await _rpcClient!.request(request, requestTimeout)); if (jsonRpcResponse.exception != null) { throw jsonRpcResponse.exception!; @@ -281,7 +292,7 @@ class ElectrumX { return batchRequest( command: command, args: args, - connectionTimeout: connectionTimeout, + requestTimeout: requestTimeout, retries: retries - 1, ); } else { @@ -293,7 +304,7 @@ class ElectrumX { return batchRequest( command: command, args: args, - connectionTimeout: connectionTimeout, + requestTimeout: requestTimeout, ); } else { currentFailoverIndex = -1; @@ -310,7 +321,7 @@ class ElectrumX { final response = await request( requestID: requestID, command: 'server.ping', - connectionTimeout: const Duration(seconds: 2), + requestTimeout: const Duration(seconds: 2), retries: retryCount, ).timeout(const Duration(seconds: 2)) as Map; return response.keys.contains("result") && response["result"] == null; @@ -442,7 +453,7 @@ class ElectrumX { final response = await request( requestID: requestID, command: 'blockchain.scripthash.get_history', - connectionTimeout: const Duration(minutes: 5), + requestTimeout: const Duration(minutes: 5), args: [ scripthash, ], @@ -666,11 +677,13 @@ class ElectrumX { }) async { try { final response = await request( - requestID: requestID, - command: 'lelantus.getusedcoinserials', - args: [ - "$startNumber", - ]); + requestID: requestID, + command: 'lelantus.getusedcoinserials', + args: [ + "$startNumber", + ], + requestTimeout: const Duration(minutes: 2), + ); return Map.from(response["result"] as Map); } catch (e) { Logging.instance.log(e, level: LogLevel.Error); diff --git a/lib/electrumx_rpc/rpc.dart b/lib/electrumx_rpc/rpc.dart index e865356d6..2dc0d3a71 100644 --- a/lib/electrumx_rpc/rpc.dart +++ b/lib/electrumx_rpc/rpc.dart @@ -79,7 +79,6 @@ class JsonRPC { // TODO different timeout length? req.initiateTimeout( - Duration(seconds: connectionTimeout.inSeconds ~/ 2), onTimedOut: () { _requestQueue.remove(req); }, @@ -88,7 +87,10 @@ class JsonRPC { }); } - Future request(String jsonRpcRequest) async { + Future request( + String jsonRpcRequest, + Duration requestTimeout, + ) async { await _requestMutex.protect(() async { if (_socket == null) { Logging.instance.log( @@ -101,6 +103,7 @@ class JsonRPC { final req = _JsonRPCRequest( jsonRequest: jsonRpcRequest, + requestTimeout: requestTimeout, completer: Completer(), ); @@ -243,9 +246,14 @@ class _JsonRPCRequest { final String jsonRequest; final Completer completer; + final Duration requestTimeout; final List _responseData = []; - _JsonRPCRequest({required this.jsonRequest, required this.completer}); + _JsonRPCRequest({ + required this.jsonRequest, + required this.completer, + required this.requestTimeout, + }); void appendDataAndCheckIfComplete(List data) { _responseData.addAll(data); @@ -263,11 +271,10 @@ class _JsonRPCRequest { } } - void initiateTimeout( - Duration timeout, { + void initiateTimeout({ VoidCallback? onTimedOut, }) { - Future.delayed(timeout).then((_) { + Future.delayed(requestTimeout).then((_) { if (!isComplete) { try { throw Exception("_JsonRPCRequest timed out: $jsonRequest"); From 21d81a95747bd2fabbd7d836a0eea05f3ed42c6f Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 27 Jul 2023 15:08:43 -0600 Subject: [PATCH 10/14] update mocks --- test/cached_electrumx_test.mocks.dart | 39 ++++++++--- test/electrumx_test.mocks.dart | 19 +++-- ...r_secure_storage_interface_test.mocks.dart | 4 +- .../lelantus_coin_adapter_test.mocks.dart | 4 +- ...transactions_model_adapter_test.mocks.dart | 4 +- .../utxo_model_adapter_test.mocks.dart | 4 +- .../notification_card_test.mocks.dart | 4 +- .../pages/send_view/send_view_test.mocks.dart | 4 +- test/price_test.mocks.dart | 4 +- .../address_book_view_screen_test.mocks.dart | 4 +- ...d_address_book_view_screen_test.mocks.dart | 4 +- ..._entry_details_view_screen_test.mocks.dart | 4 +- ...ess_book_entry_view_screen_test.mocks.dart | 4 +- .../exchange/exchange_view_test.mocks.dart | 68 +++++++++--------- .../lockscreen_view_screen_test.mocks.dart | 4 +- .../main_view_screen_testA_test.mocks.dart | 4 +- .../main_view_screen_testB_test.mocks.dart | 4 +- .../main_view_screen_testC_test.mocks.dart | 4 +- .../backup_key_view_screen_test.mocks.dart | 4 +- ...up_key_warning_view_screen_test.mocks.dart | 4 +- .../create_pin_view_screen_test.mocks.dart | 4 +- ...me_your_wallet_view_screen_test.mocks.dart | 4 +- ...restore_wallet_view_screen_test.mocks.dart | 4 +- ...ify_backup_key_view_screen_test.mocks.dart | 4 +- .../currency_view_screen_test.mocks.dart | 4 +- ...dd_custom_node_view_screen_test.mocks.dart | 4 +- .../node_details_view_screen_test.mocks.dart | 4 +- ...twork_settings_view_screen_test.mocks.dart | 4 +- .../wallet_backup_view_screen_test.mocks.dart | 4 +- .../change_pin_view_screen_test.mocks.dart | 4 +- .../rename_wallet_view_screen_test.mocks.dart | 4 +- ...rescan_warning_view_screen_test.mocks.dart | 4 +- ...elete_mnemonic_view_screen_test.mocks.dart | 4 +- ...allet_settings_view_screen_test.mocks.dart | 4 +- .../settings_view_screen_test.mocks.dart | 4 +- ...action_details_view_screen_test.mocks.dart | 4 +- ...search_results_view_screen_test.mocks.dart | 4 +- ...saction_search_view_screen_test.mocks.dart | 4 +- .../confirm_send_view_screen_test.mocks.dart | 4 +- .../receive_view_screen_test.mocks.dart | 4 +- .../send_view_screen_test.mocks.dart | 4 +- .../wallet_view_screen_test.mocks.dart | 4 +- .../change_now/change_now_test.mocks.dart | 4 +- .../bitcoin/bitcoin_wallet_test.mocks.dart | 45 ++++++++---- .../bitcoincash_wallet_test.mocks.dart | 45 ++++++++---- .../dogecoin/dogecoin_wallet_test.mocks.dart | 45 ++++++++---- .../coins/firo/firo_wallet_test.mocks.dart | 70 ++++++++++++------- test/services/coins/manager_test.mocks.dart | 39 ++++++++--- .../namecoin/namecoin_wallet_test.mocks.dart | 45 ++++++++---- .../particl/particl_wallet_test.mocks.dart | 45 ++++++++---- test/services/wallets_service_test.mocks.dart | 4 +- .../address_book_card_test.mocks.dart | 4 +- .../favorite_toggle_test.mocks.dart | 4 +- .../custom_loading_overlay_test.mocks.dart | 4 +- .../desktop/desktop_scaffold_test.mocks.dart | 4 +- .../managed_favorite_test.mocks.dart | 4 +- test/widget_tests/node_card_test.mocks.dart | 4 +- .../node_options_sheet_test.mocks.dart | 4 +- .../table_view/table_view_row_test.mocks.dart | 9 +-- test/widget_tests/trade_card_test.mocks.dart | 4 +- .../transaction_card_test.mocks.dart | 7 +- test/widget_tests/wallet_card_test.mocks.dart | 4 +- ...et_info_row_balance_future_test.mocks.dart | 4 +- .../wallet_info_row_test.mocks.dart | 4 +- 64 files changed, 355 insertions(+), 329 deletions(-) diff --git a/test/cached_electrumx_test.mocks.dart b/test/cached_electrumx_test.mocks.dart index 45cd27285..cdda4902b 100644 --- a/test/cached_electrumx_test.mocks.dart +++ b/test/cached_electrumx_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/cached_electrumx_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:ui' as _i10; @@ -28,8 +26,18 @@ import 'package:stackwallet/utilities/prefs.dart' as _i5; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { - _FakeDecimal_0( +class _FakeDuration_0 extends _i1.SmartFake implements Duration { + _FakeDuration_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDecimal_1 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_1( Object parent, Invocation parentInvocation, ) : super( @@ -68,6 +76,15 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { returnValueForMissingStub: null, ); @override + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_0( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) as Duration); + @override String get host => (super.noSuchMethod( Invocation.getter(#host), returnValue: '', @@ -86,9 +103,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future request({ required String? command, List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), String? requestID, int? retries = 2, + Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( Invocation.method( @@ -97,9 +114,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, #requestID: requestID, #retries: retries, + #requestTimeout: requestTimeout, }, ), returnValue: _i4.Future.value(), @@ -108,7 +125,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future>> batchRequest({ required String? command, required Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), + Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, }) => (super.noSuchMethod( @@ -118,7 +135,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, + #requestTimeout: requestTimeout, #retries: retries, }, ), @@ -359,7 +376,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { #blocks: blocks, }, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #estimateFee, @@ -378,7 +395,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { [], {#requestID: requestID}, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #relayFee, diff --git a/test/electrumx_test.mocks.dart b/test/electrumx_test.mocks.dart index 41fd2d3b3..578b1fe56 100644 --- a/test/electrumx_test.mocks.dart +++ b/test/electrumx_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/electrumx_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:ui' as _i9; @@ -80,18 +78,27 @@ class MockJsonRPC extends _i1.Mock implements _i2.JsonRPC { ), ) as Duration); @override - _i3.Future<_i2.JsonRPCResponse> request(String? jsonRpcRequest) => + _i3.Future<_i2.JsonRPCResponse> request( + String? jsonRpcRequest, + Duration? requestTimeout, + ) => (super.noSuchMethod( Invocation.method( #request, - [jsonRpcRequest], + [ + jsonRpcRequest, + requestTimeout, + ], ), returnValue: _i3.Future<_i2.JsonRPCResponse>.value(_FakeJsonRPCResponse_1( this, Invocation.method( #request, - [jsonRpcRequest], + [ + jsonRpcRequest, + requestTimeout, + ], ), )), ) as _i3.Future<_i2.JsonRPCResponse>); diff --git a/test/flutter_secure_storage_interface_test.mocks.dart b/test/flutter_secure_storage_interface_test.mocks.dart index aa9520e43..e1541d3a2 100644 --- a/test/flutter_secure_storage_interface_test.mocks.dart +++ b/test/flutter_secure_storage_interface_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/flutter_secure_storage_interface_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; diff --git a/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart b/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart index a77b63d95..0ca7abc8d 100644 --- a/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart +++ b/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/models/type_adapter_tests/lelantus_coin_adapter_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:convert' as _i5; import 'dart:typed_data' as _i4; diff --git a/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart b/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart index fce3b87a7..3d5db62f2 100644 --- a/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart +++ b/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/models/type_adapter_tests/transactions_model_adapter_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:convert' as _i5; import 'dart:typed_data' as _i4; diff --git a/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart b/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart index 7ac8384e6..f326e8cbc 100644 --- a/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart +++ b/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/models/type_adapter_tests/utxo_model_adapter_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:convert' as _i5; import 'dart:typed_data' as _i4; diff --git a/test/notifications/notification_card_test.mocks.dart b/test/notifications/notification_card_test.mocks.dart index 30790fd20..3f1f4b29c 100644 --- a/test/notifications/notification_card_test.mocks.dart +++ b/test/notifications/notification_card_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/notifications/notification_card_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:typed_data' as _i6; diff --git a/test/pages/send_view/send_view_test.mocks.dart b/test/pages/send_view/send_view_test.mocks.dart index 6ad56e711..c9414583d 100644 --- a/test/pages/send_view/send_view_test.mocks.dart +++ b/test/pages/send_view/send_view_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/pages/send_view/send_view_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i23; import 'dart:typed_data' as _i30; diff --git a/test/price_test.mocks.dart b/test/price_test.mocks.dart index 09b4af616..8c38f59f9 100644 --- a/test/price_test.mocks.dart +++ b/test/price_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/price_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:convert' as _i4; 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 5504140a9..b359426c3 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 @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/address_book_view/address_book_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:ui' as _i5; 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 b389043c0..5edc4c538 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 @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i9; import 'dart:ui' as _i11; 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 87f97997e..a84bb6a51 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 @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i9; 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 72ac2f1a7..f44df83ca 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 @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i9; diff --git a/test/screen_tests/exchange/exchange_view_test.mocks.dart b/test/screen_tests/exchange/exchange_view_test.mocks.dart index bf61af30c..7b55ab9e0 100644 --- a/test/screen_tests/exchange/exchange_view_test.mocks.dart +++ b/test/screen_tests/exchange/exchange_view_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/exchange/exchange_view_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:ui' as _i9; @@ -1031,8 +1029,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i13.ChangeNowAPI { [], {#apiKey: apiKey}, ), - returnValue: _i6.Future< - _i2.ExchangeResponse>>.value( + returnValue: _i6 + .Future<_i2.ExchangeResponse>>.value( _FakeExchangeResponse_0>( this, Invocation.method( @@ -1073,8 +1071,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i13.ChangeNowAPI { #apiKey: apiKey, }, ), - returnValue: _i6.Future< - _i2.ExchangeResponse<_i21.ExchangeTransaction>>.value( + returnValue: _i6 + .Future<_i2.ExchangeResponse<_i21.ExchangeTransaction>>.value( _FakeExchangeResponse_0<_i21.ExchangeTransaction>( this, Invocation.method( @@ -1130,8 +1128,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i13.ChangeNowAPI { #apiKey: apiKey, }, ), - returnValue: _i6.Future< - _i2.ExchangeResponse<_i21.ExchangeTransaction>>.value( + returnValue: _i6 + .Future<_i2.ExchangeResponse<_i21.ExchangeTransaction>>.value( _FakeExchangeResponse_0<_i21.ExchangeTransaction>( this, Invocation.method( @@ -1155,35 +1153,35 @@ class MockChangeNowAPI extends _i1.Mock implements _i13.ChangeNowAPI { )), ) as _i6.Future<_i2.ExchangeResponse<_i21.ExchangeTransaction>>); @override - _i6.Future<_i2.ExchangeResponse<_i22.ExchangeTransactionStatus>> - getTransactionStatus({ + _i6.Future< + _i2 + .ExchangeResponse<_i22.ExchangeTransactionStatus>> getTransactionStatus({ required String? id, String? apiKey, }) => - (super.noSuchMethod( - Invocation.method( - #getTransactionStatus, - [], - { - #id: id, - #apiKey: apiKey, - }, - ), - returnValue: _i6.Future< - _i2.ExchangeResponse<_i22.ExchangeTransactionStatus>>.value( - _FakeExchangeResponse_0<_i22.ExchangeTransactionStatus>( - this, - Invocation.method( - #getTransactionStatus, - [], - { - #id: id, - #apiKey: apiKey, - }, - ), - )), - ) as _i6 - .Future<_i2.ExchangeResponse<_i22.ExchangeTransactionStatus>>); + (super.noSuchMethod( + Invocation.method( + #getTransactionStatus, + [], + { + #id: id, + #apiKey: apiKey, + }, + ), + returnValue: _i6 + .Future<_i2.ExchangeResponse<_i22.ExchangeTransactionStatus>>.value( + _FakeExchangeResponse_0<_i22.ExchangeTransactionStatus>( + this, + Invocation.method( + #getTransactionStatus, + [], + { + #id: id, + #apiKey: apiKey, + }, + ), + )), + ) as _i6.Future<_i2.ExchangeResponse<_i22.ExchangeTransactionStatus>>); @override _i6.Future<_i2.ExchangeResponse>> getAvailableFloatingRatePairs({bool? includePartners = false}) => diff --git a/test/screen_tests/lockscreen_view_screen_test.mocks.dart b/test/screen_tests/lockscreen_view_screen_test.mocks.dart index b028c6819..35a1a5f20 100644 --- a/test/screen_tests/lockscreen_view_screen_test.mocks.dart +++ b/test/screen_tests/lockscreen_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/lockscreen_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart index d0f5f89a4..8526c77f3 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/main_view_tests/main_view_screen_testA_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i9; diff --git a/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart index fa528b669..ba9350c78 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/main_view_tests/main_view_screen_testB_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i9; diff --git a/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart index be30eacbc..5f8055c5a 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/main_view_tests/main_view_screen_testC_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i9; diff --git a/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart b/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart index 34f177901..d621a4ae0 100644 --- a/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/onboarding/backup_key_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart b/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart index 9e5723ef5..6802650ab 100644 --- a/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/onboarding/backup_key_warning_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i9; diff --git a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart index bb9e1c91b..a9b4549a0 100644 --- a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/onboarding/create_pin_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart b/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart index 809c10f8f..ac36cefb3 100644 --- a/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/onboarding/name_your_wallet_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:ui' as _i5; diff --git a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart index bd475e066..a33b13e7a 100644 --- a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/onboarding/restore_wallet_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i9; import 'dart:ui' as _i12; diff --git a/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart b/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart index a02c62b4d..e372e3781 100644 --- a/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/onboarding/verify_backup_key_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart index fbf9c2ed5..ece50ef76 100644 --- a/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart index 5922e7f9b..b56c08998 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i9; import 'dart:ui' as _i11; diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart index 133ca38a5..5e62fd6d4 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i9; import 'dart:ui' as _i11; diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart index 7aa96da8b..d364e457c 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:ui' as _i7; diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart index 99b8dc33f..671af0d4b 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart index 1475c23e2..1391c64aa 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:ui' as _i5; diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart index 38c18d714..f189731e2 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:ui' as _i5; diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart index c216d11b3..e3a475bdd 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart index f12df9272..439dd35ca 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i9; 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 6f60f60bc..cc20dce98 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 @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i14; diff --git a/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart index 6b20221c3..4cfabb7bc 100644 --- a/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i9; 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 fd928ab12..95ef22442 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 @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:ui' as _i5; diff --git a/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart index cffb87869..b48b433a9 100644 --- a/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; 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 52b725907..b4b3ec001 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 @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:ui' as _i5; diff --git a/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart index 01c78d796..df0e2d613 100644 --- a/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/wallet_view/confirm_send_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart index b5999d56c..e00ef1039 100644 --- a/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/wallet_view/receive_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart index 964343a65..e5e86bf6e 100644 --- a/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/wallet_view/send_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i12; diff --git a/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart index e4b7791c6..674ad6549 100644 --- a/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/screen_tests/wallet_view/wallet_view_screen_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; diff --git a/test/services/change_now/change_now_test.mocks.dart b/test/services/change_now/change_now_test.mocks.dart index 233216e30..21ccddff8 100644 --- a/test/services/change_now/change_now_test.mocks.dart +++ b/test/services/change_now/change_now_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/services/change_now/change_now_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:convert' as _i4; diff --git a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart index 806152407..32719f306 100644 --- a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart +++ b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/services/coins/bitcoin/bitcoin_wallet_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; @@ -26,8 +24,8 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { - _FakeDecimal_0( +class _FakeDuration_0 extends _i1.SmartFake implements Duration { + _FakeDuration_0( Object parent, Invocation parentInvocation, ) : super( @@ -36,8 +34,18 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { ); } -class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX { - _FakeElectrumX_1( +class _FakeDecimal_1 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_2 extends _i1.SmartFake implements _i3.ElectrumX { + _FakeElectrumX_2( Object parent, Invocation parentInvocation, ) : super( @@ -76,6 +84,15 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { returnValueForMissingStub: null, ); @override + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_0( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) as Duration); + @override String get host => (super.noSuchMethod( Invocation.getter(#host), returnValue: '', @@ -94,9 +111,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future request({ required String? command, List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), String? requestID, int? retries = 2, + Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( Invocation.method( @@ -105,9 +122,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, #requestID: requestID, #retries: retries, + #requestTimeout: requestTimeout, }, ), returnValue: _i4.Future.value(), @@ -116,7 +133,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future>> batchRequest({ required String? command, required Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), + Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, }) => (super.noSuchMethod( @@ -126,7 +143,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, + #requestTimeout: requestTimeout, #retries: retries, }, ), @@ -367,7 +384,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { #blocks: blocks, }, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #estimateFee, @@ -386,7 +403,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { [], {#requestID: requestID}, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #relayFee, @@ -408,7 +425,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX { @override _i3.ElectrumX get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumX_1( + returnValue: _FakeElectrumX_2( this, Invocation.getter(#electrumXClient), ), diff --git a/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart b/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart index 992f7d49a..5599f3a29 100644 --- a/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart +++ b/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; @@ -26,8 +24,8 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { - _FakeDecimal_0( +class _FakeDuration_0 extends _i1.SmartFake implements Duration { + _FakeDuration_0( Object parent, Invocation parentInvocation, ) : super( @@ -36,8 +34,18 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { ); } -class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX { - _FakeElectrumX_1( +class _FakeDecimal_1 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_2 extends _i1.SmartFake implements _i3.ElectrumX { + _FakeElectrumX_2( Object parent, Invocation parentInvocation, ) : super( @@ -76,6 +84,15 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { returnValueForMissingStub: null, ); @override + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_0( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) as Duration); + @override String get host => (super.noSuchMethod( Invocation.getter(#host), returnValue: '', @@ -94,9 +111,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future request({ required String? command, List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), String? requestID, int? retries = 2, + Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( Invocation.method( @@ -105,9 +122,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, #requestID: requestID, #retries: retries, + #requestTimeout: requestTimeout, }, ), returnValue: _i4.Future.value(), @@ -116,7 +133,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future>> batchRequest({ required String? command, required Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), + Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, }) => (super.noSuchMethod( @@ -126,7 +143,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, + #requestTimeout: requestTimeout, #retries: retries, }, ), @@ -367,7 +384,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { #blocks: blocks, }, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #estimateFee, @@ -386,7 +403,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { [], {#requestID: requestID}, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #relayFee, @@ -408,7 +425,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX { @override _i3.ElectrumX get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumX_1( + returnValue: _FakeElectrumX_2( this, Invocation.getter(#electrumXClient), ), diff --git a/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart b/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart index 7413c926a..b084875f5 100644 --- a/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart +++ b/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/services/coins/dogecoin/dogecoin_wallet_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; @@ -26,8 +24,8 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { - _FakeDecimal_0( +class _FakeDuration_0 extends _i1.SmartFake implements Duration { + _FakeDuration_0( Object parent, Invocation parentInvocation, ) : super( @@ -36,8 +34,18 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { ); } -class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX { - _FakeElectrumX_1( +class _FakeDecimal_1 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_2 extends _i1.SmartFake implements _i3.ElectrumX { + _FakeElectrumX_2( Object parent, Invocation parentInvocation, ) : super( @@ -76,6 +84,15 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { returnValueForMissingStub: null, ); @override + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_0( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) as Duration); + @override String get host => (super.noSuchMethod( Invocation.getter(#host), returnValue: '', @@ -94,9 +111,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future request({ required String? command, List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), String? requestID, int? retries = 2, + Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( Invocation.method( @@ -105,9 +122,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, #requestID: requestID, #retries: retries, + #requestTimeout: requestTimeout, }, ), returnValue: _i4.Future.value(), @@ -116,7 +133,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future>> batchRequest({ required String? command, required Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), + Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, }) => (super.noSuchMethod( @@ -126,7 +143,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, + #requestTimeout: requestTimeout, #retries: retries, }, ), @@ -367,7 +384,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { #blocks: blocks, }, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #estimateFee, @@ -386,7 +403,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { [], {#requestID: requestID}, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #relayFee, @@ -408,7 +425,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX { @override _i3.ElectrumX get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumX_1( + returnValue: _FakeElectrumX_2( this, Invocation.getter(#electrumXClient), ), diff --git a/test/services/coins/firo/firo_wallet_test.mocks.dart b/test/services/coins/firo/firo_wallet_test.mocks.dart index 9548981a4..0f7a0b0a3 100644 --- a/test/services/coins/firo/firo_wallet_test.mocks.dart +++ b/test/services/coins/firo/firo_wallet_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/services/coins/firo/firo_wallet_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; @@ -32,8 +30,8 @@ import 'package:tuple/tuple.dart' as _i13; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { - _FakeDecimal_0( +class _FakeDuration_0 extends _i1.SmartFake implements Duration { + _FakeDuration_0( Object parent, Invocation parentInvocation, ) : super( @@ -42,8 +40,8 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { ); } -class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX { - _FakeElectrumX_1( +class _FakeDecimal_1 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_1( Object parent, Invocation parentInvocation, ) : super( @@ -52,8 +50,8 @@ class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX { ); } -class _FakeIsar_2 extends _i1.SmartFake implements _i4.Isar { - _FakeIsar_2( +class _FakeElectrumX_2 extends _i1.SmartFake implements _i3.ElectrumX { + _FakeElectrumX_2( Object parent, Invocation parentInvocation, ) : super( @@ -62,9 +60,19 @@ class _FakeIsar_2 extends _i1.SmartFake implements _i4.Isar { ); } -class _FakeQueryBuilder_3 extends _i1.SmartFake +class _FakeIsar_3 extends _i1.SmartFake implements _i4.Isar { + _FakeIsar_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeQueryBuilder_4 extends _i1.SmartFake implements _i4.QueryBuilder { - _FakeQueryBuilder_3( + _FakeQueryBuilder_4( Object parent, Invocation parentInvocation, ) : super( @@ -103,6 +111,15 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { returnValueForMissingStub: null, ); @override + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_0( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) as Duration); + @override String get host => (super.noSuchMethod( Invocation.getter(#host), returnValue: '', @@ -121,9 +138,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i5.Future request({ required String? command, List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), String? requestID, int? retries = 2, + Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( Invocation.method( @@ -132,9 +149,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, #requestID: requestID, #retries: retries, + #requestTimeout: requestTimeout, }, ), returnValue: _i5.Future.value(), @@ -143,7 +160,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i5.Future>> batchRequest({ required String? command, required Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), + Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, }) => (super.noSuchMethod( @@ -153,7 +170,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, + #requestTimeout: requestTimeout, #retries: retries, }, ), @@ -394,7 +411,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { #blocks: blocks, }, ), - returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #estimateFee, @@ -413,7 +430,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { [], {#requestID: requestID}, ), - returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #relayFee, @@ -435,7 +452,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { @override _i3.ElectrumX get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumX_1( + returnValue: _FakeElectrumX_2( this, Invocation.getter(#electrumXClient), ), @@ -603,7 +620,7 @@ class MockMainDB extends _i1.Mock implements _i9.MainDB { @override _i4.Isar get isar => (super.noSuchMethod( Invocation.getter(#isar), - returnValue: _FakeIsar_2( + returnValue: _FakeIsar_3( this, Invocation.getter(#isar), ), @@ -688,7 +705,7 @@ class MockMainDB extends _i1.Mock implements _i9.MainDB { #getAddresses, [walletId], ), - returnValue: _FakeQueryBuilder_3<_i12.Address, _i12.Address, + returnValue: _FakeQueryBuilder_4<_i12.Address, _i12.Address, _i4.QAfterWhereClause>( this, Invocation.method( @@ -761,7 +778,7 @@ class MockMainDB extends _i1.Mock implements _i9.MainDB { #getTransactions, [walletId], ), - returnValue: _FakeQueryBuilder_3<_i12.Transaction, _i12.Transaction, + returnValue: _FakeQueryBuilder_4<_i12.Transaction, _i12.Transaction, _i4.QAfterWhereClause>( this, Invocation.method( @@ -829,7 +846,7 @@ class MockMainDB extends _i1.Mock implements _i9.MainDB { [walletId], ), returnValue: - _FakeQueryBuilder_3<_i12.UTXO, _i12.UTXO, _i4.QAfterWhereClause>( + _FakeQueryBuilder_4<_i12.UTXO, _i12.UTXO, _i4.QAfterWhereClause>( this, Invocation.method( #getUTXOs, @@ -868,8 +885,7 @@ class MockMainDB extends _i1.Mock implements _i9.MainDB { utxos, ], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), + returnValue: _i5.Future.value(false), ) as _i5.Future); @override _i5.Stream<_i12.UTXO?> watchUTXO({ @@ -896,7 +912,7 @@ class MockMainDB extends _i1.Mock implements _i9.MainDB { #getTransactionNotes, [walletId], ), - returnValue: _FakeQueryBuilder_3<_i12.TransactionNote, + returnValue: _FakeQueryBuilder_4<_i12.TransactionNote, _i12.TransactionNote, _i4.QAfterWhereClause>( this, Invocation.method( @@ -965,7 +981,7 @@ class MockMainDB extends _i1.Mock implements _i9.MainDB { #getAddressLabels, [walletId], ), - returnValue: _FakeQueryBuilder_3<_i12.AddressLabel, + returnValue: _FakeQueryBuilder_4<_i12.AddressLabel, _i12.AddressLabel, _i4.QAfterWhereClause>( this, Invocation.method( @@ -1107,7 +1123,7 @@ class MockMainDB extends _i1.Mock implements _i9.MainDB { #getEthContracts, [], ), - returnValue: _FakeQueryBuilder_3<_i12.EthContract, _i12.EthContract, + returnValue: _FakeQueryBuilder_4<_i12.EthContract, _i12.EthContract, _i4.QWhere>( this, Invocation.method( diff --git a/test/services/coins/manager_test.mocks.dart b/test/services/coins/manager_test.mocks.dart index 5656feb88..ba4c8eb37 100644 --- a/test/services/coins/manager_test.mocks.dart +++ b/test/services/coins/manager_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/services/coins/manager_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i11; @@ -105,8 +103,18 @@ class _FakeAmount_6 extends _i1.SmartFake implements _i8.Amount { ); } -class _FakeDecimal_7 extends _i1.SmartFake implements _i9.Decimal { - _FakeDecimal_7( +class _FakeDuration_7 extends _i1.SmartFake implements Duration { + _FakeDuration_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDecimal_8 extends _i1.SmartFake implements _i9.Decimal { + _FakeDecimal_8( Object parent, Invocation parentInvocation, ) : super( @@ -1074,6 +1082,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { returnValueForMissingStub: null, ); @override + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_7( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) as Duration); + @override String get host => (super.noSuchMethod( Invocation.getter(#host), returnValue: '', @@ -1092,9 +1109,9 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { _i11.Future request({ required String? command, List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), String? requestID, int? retries = 2, + Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( Invocation.method( @@ -1103,9 +1120,9 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, #requestID: requestID, #retries: retries, + #requestTimeout: requestTimeout, }, ), returnValue: _i11.Future.value(), @@ -1114,7 +1131,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { _i11.Future>> batchRequest({ required String? command, required Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), + Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, }) => (super.noSuchMethod( @@ -1124,7 +1141,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, + #requestTimeout: requestTimeout, #retries: retries, }, ), @@ -1365,7 +1382,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { #blocks: blocks, }, ), - returnValue: _i11.Future<_i9.Decimal>.value(_FakeDecimal_7( + returnValue: _i11.Future<_i9.Decimal>.value(_FakeDecimal_8( this, Invocation.method( #estimateFee, @@ -1384,7 +1401,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { [], {#requestID: requestID}, ), - returnValue: _i11.Future<_i9.Decimal>.value(_FakeDecimal_7( + returnValue: _i11.Future<_i9.Decimal>.value(_FakeDecimal_8( this, Invocation.method( #relayFee, diff --git a/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart b/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart index b464d141c..ea48f7e85 100644 --- a/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart +++ b/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/services/coins/namecoin/namecoin_wallet_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; @@ -26,8 +24,8 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { - _FakeDecimal_0( +class _FakeDuration_0 extends _i1.SmartFake implements Duration { + _FakeDuration_0( Object parent, Invocation parentInvocation, ) : super( @@ -36,8 +34,18 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { ); } -class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX { - _FakeElectrumX_1( +class _FakeDecimal_1 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_2 extends _i1.SmartFake implements _i3.ElectrumX { + _FakeElectrumX_2( Object parent, Invocation parentInvocation, ) : super( @@ -76,6 +84,15 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { returnValueForMissingStub: null, ); @override + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_0( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) as Duration); + @override String get host => (super.noSuchMethod( Invocation.getter(#host), returnValue: '', @@ -94,9 +111,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future request({ required String? command, List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), String? requestID, int? retries = 2, + Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( Invocation.method( @@ -105,9 +122,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, #requestID: requestID, #retries: retries, + #requestTimeout: requestTimeout, }, ), returnValue: _i4.Future.value(), @@ -116,7 +133,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future>> batchRequest({ required String? command, required Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), + Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, }) => (super.noSuchMethod( @@ -126,7 +143,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, + #requestTimeout: requestTimeout, #retries: retries, }, ), @@ -367,7 +384,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { #blocks: blocks, }, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #estimateFee, @@ -386,7 +403,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { [], {#requestID: requestID}, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #relayFee, @@ -408,7 +425,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX { @override _i3.ElectrumX get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumX_1( + returnValue: _FakeElectrumX_2( this, Invocation.getter(#electrumXClient), ), diff --git a/test/services/coins/particl/particl_wallet_test.mocks.dart b/test/services/coins/particl/particl_wallet_test.mocks.dart index f0e94f2ec..862c352d2 100644 --- a/test/services/coins/particl/particl_wallet_test.mocks.dart +++ b/test/services/coins/particl/particl_wallet_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/services/coins/particl/particl_wallet_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; @@ -26,8 +24,8 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { - _FakeDecimal_0( +class _FakeDuration_0 extends _i1.SmartFake implements Duration { + _FakeDuration_0( Object parent, Invocation parentInvocation, ) : super( @@ -36,8 +34,18 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { ); } -class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX { - _FakeElectrumX_1( +class _FakeDecimal_1 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_2 extends _i1.SmartFake implements _i3.ElectrumX { + _FakeElectrumX_2( Object parent, Invocation parentInvocation, ) : super( @@ -76,6 +84,15 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { returnValueForMissingStub: null, ); @override + Duration get connectionTimeoutForSpecialCaseJsonRPCClients => + (super.noSuchMethod( + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + returnValue: _FakeDuration_0( + this, + Invocation.getter(#connectionTimeoutForSpecialCaseJsonRPCClients), + ), + ) as Duration); + @override String get host => (super.noSuchMethod( Invocation.getter(#host), returnValue: '', @@ -94,9 +111,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future request({ required String? command, List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), String? requestID, int? retries = 2, + Duration? requestTimeout = const Duration(seconds: 60), }) => (super.noSuchMethod( Invocation.method( @@ -105,9 +122,9 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, #requestID: requestID, #retries: retries, + #requestTimeout: requestTimeout, }, ), returnValue: _i4.Future.value(), @@ -116,7 +133,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { _i4.Future>> batchRequest({ required String? command, required Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), + Duration? requestTimeout = const Duration(seconds: 60), int? retries = 2, }) => (super.noSuchMethod( @@ -126,7 +143,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { { #command: command, #args: args, - #connectionTimeout: connectionTimeout, + #requestTimeout: requestTimeout, #retries: retries, }, ), @@ -367,7 +384,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { #blocks: blocks, }, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #estimateFee, @@ -386,7 +403,7 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { [], {#requestID: requestID}, ), - returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1( this, Invocation.method( #relayFee, @@ -408,7 +425,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX { @override _i3.ElectrumX get electrumXClient => (super.noSuchMethod( Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumX_1( + returnValue: _FakeElectrumX_2( this, Invocation.getter(#electrumXClient), ), diff --git a/test/services/wallets_service_test.mocks.dart b/test/services/wallets_service_test.mocks.dart index 4e2b60412..b2d820427 100644 --- a/test/services/wallets_service_test.mocks.dart +++ b/test/services/wallets_service_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/services/wallets_service_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; diff --git a/test/widget_tests/address_book_card_test.mocks.dart b/test/widget_tests/address_book_card_test.mocks.dart index 1956952d8..b24ff6ed7 100644 --- a/test/widget_tests/address_book_card_test.mocks.dart +++ b/test/widget_tests/address_book_card_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/address_book_card_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:ui' as _i5; diff --git a/test/widget_tests/custom_buttons/favorite_toggle_test.mocks.dart b/test/widget_tests/custom_buttons/favorite_toggle_test.mocks.dart index 142582194..0abed1954 100644 --- a/test/widget_tests/custom_buttons/favorite_toggle_test.mocks.dart +++ b/test/widget_tests/custom_buttons/favorite_toggle_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/custom_buttons/favorite_toggle_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:typed_data' as _i6; diff --git a/test/widget_tests/custom_loading_overlay_test.mocks.dart b/test/widget_tests/custom_loading_overlay_test.mocks.dart index c70d52974..c96558898 100644 --- a/test/widget_tests/custom_loading_overlay_test.mocks.dart +++ b/test/widget_tests/custom_loading_overlay_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/custom_loading_overlay_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:typed_data' as _i6; diff --git a/test/widget_tests/desktop/desktop_scaffold_test.mocks.dart b/test/widget_tests/desktop/desktop_scaffold_test.mocks.dart index c292cdafa..37476e4c3 100644 --- a/test/widget_tests/desktop/desktop_scaffold_test.mocks.dart +++ b/test/widget_tests/desktop/desktop_scaffold_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/desktop/desktop_scaffold_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:typed_data' as _i6; diff --git a/test/widget_tests/managed_favorite_test.mocks.dart b/test/widget_tests/managed_favorite_test.mocks.dart index 723a76d30..f81f66ebd 100644 --- a/test/widget_tests/managed_favorite_test.mocks.dart +++ b/test/widget_tests/managed_favorite_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/managed_favorite_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i23; import 'dart:typed_data' as _i29; diff --git a/test/widget_tests/node_card_test.mocks.dart b/test/widget_tests/node_card_test.mocks.dart index da768f3c6..0b5f8128b 100644 --- a/test/widget_tests/node_card_test.mocks.dart +++ b/test/widget_tests/node_card_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/node_card_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:ui' as _i7; diff --git a/test/widget_tests/node_options_sheet_test.mocks.dart b/test/widget_tests/node_options_sheet_test.mocks.dart index 7b35c18e9..86fdf5727 100644 --- a/test/widget_tests/node_options_sheet_test.mocks.dart +++ b/test/widget_tests/node_options_sheet_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/node_options_sheet_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i11; import 'dart:ui' as _i13; diff --git a/test/widget_tests/table_view/table_view_row_test.mocks.dart b/test/widget_tests/table_view/table_view_row_test.mocks.dart index 92a96f9a3..2079f64b0 100644 --- a/test/widget_tests/table_view/table_view_row_test.mocks.dart +++ b/test/widget_tests/table_view/table_view_row_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/table_view/table_view_row_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i22; import 'dart:typed_data' as _i27; @@ -2203,11 +2201,6 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override - bool get hasFusionSupport => (super.noSuchMethod( - Invocation.getter(#hasFusionSupport), - returnValue: false, - ) as bool); - @override bool get hasTokenSupport => (super.noSuchMethod( Invocation.getter(#hasTokenSupport), returnValue: false, diff --git a/test/widget_tests/trade_card_test.mocks.dart b/test/widget_tests/trade_card_test.mocks.dart index bf205972c..1bb236eb4 100644 --- a/test/widget_tests/trade_card_test.mocks.dart +++ b/test/widget_tests/trade_card_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/trade_card_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:typed_data' as _i6; diff --git a/test/widget_tests/transaction_card_test.mocks.dart b/test/widget_tests/transaction_card_test.mocks.dart index ad152959a..66bd37cf0 100644 --- a/test/widget_tests/transaction_card_test.mocks.dart +++ b/test/widget_tests/transaction_card_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/transaction_card_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i19; import 'dart:typed_data' as _i34; @@ -3215,8 +3213,7 @@ class MockMainDB extends _i1.Mock implements _i14.MainDB { utxos, ], ), - returnValue: _i19.Future.value(), - returnValueForMissingStub: _i19.Future.value(), + returnValue: _i19.Future.value(false), ) as _i19.Future); @override _i19.Stream<_i22.UTXO?> watchUTXO({ diff --git a/test/widget_tests/wallet_card_test.mocks.dart b/test/widget_tests/wallet_card_test.mocks.dart index 2e9675869..f2d6e83b1 100644 --- a/test/widget_tests/wallet_card_test.mocks.dart +++ b/test/widget_tests/wallet_card_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/wallet_card_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i21; import 'dart:typed_data' as _i28; diff --git a/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart index 56c5d2485..36d369769 100644 --- a/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart +++ b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i23; import 'dart:typed_data' as _i29; diff --git a/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart b/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart index a234b0e9c..357672d7a 100644 --- a/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart +++ b/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart @@ -1,9 +1,7 @@ -// Mocks generated by Mockito 5.4.1 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in stackwallet/test/widget_tests/wallet_info_row/wallet_info_row_test.dart. // Do not manually edit this file. -// @dart=2.19 - // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i23; import 'dart:typed_data' as _i28; From 4991ca3341e188a7238fbd728def3f75705c3c5e Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 27 Jul 2023 15:18:02 -0600 Subject: [PATCH 11/14] update rpc related tests --- test/electrumx_test.dart | 35 +++++++++++++++++++++++++++++++++++ test/json_rpc_test.dart | 17 ++++++++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/test/electrumx_test.dart b/test/electrumx_test.dart index 8d29f63e9..93fc77ba5 100644 --- a/test/electrumx_test.dart +++ b/test/electrumx_test.dart @@ -59,6 +59,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -97,6 +98,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -132,6 +134,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -161,6 +164,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 2), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -195,6 +199,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 2), ), ).thenThrow(Exception()); @@ -224,6 +229,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -281,6 +287,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -310,6 +317,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -345,6 +353,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -377,6 +386,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -415,6 +425,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -446,6 +457,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(minutes: 5), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -503,6 +515,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(minutes: 5), ), ).thenThrow(Exception()); @@ -534,6 +547,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -599,6 +613,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -630,6 +645,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -667,6 +683,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -699,6 +716,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -734,6 +752,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -765,6 +784,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -800,6 +820,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -831,6 +852,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(minutes: 2), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -866,6 +888,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(minutes: 2), ), ).thenThrow(Exception()); @@ -897,6 +920,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -931,6 +955,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -963,6 +988,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -998,6 +1024,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -1031,6 +1058,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -1066,6 +1094,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -1099,6 +1128,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(minutes: 2), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -1134,6 +1164,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(minutes: 2), ), ).thenThrow(Exception()); @@ -1165,6 +1196,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -1199,6 +1231,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); @@ -1228,6 +1261,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenAnswer( (_) async => JsonRPCResponse(data: { @@ -1264,6 +1298,7 @@ void main() { mockClient.request( '{"jsonrpc": "2.0", "id": "some requestId",' '"method": "$command","params": $jsonArgs}', + const Duration(seconds: 60), ), ).thenThrow(Exception()); diff --git a/test/json_rpc_test.dart b/test/json_rpc_test.dart index 1c7cc4a00..333c1bde6 100644 --- a/test/json_rpc_test.dart +++ b/test/json_rpc_test.dart @@ -15,7 +15,10 @@ void main() { const jsonRequestString = '{"jsonrpc": "2.0", "id": "some id","method": "server.ping","params": []}'; - final result = await jsonRPC.request(jsonRequestString); + final result = await jsonRPC.request( + jsonRequestString, + const Duration(seconds: 1), + ); expect(result.data, {"jsonrpc": "2.0", "result": null, "id": "some id"}); }); @@ -30,7 +33,11 @@ void main() { const jsonRequestString = '{"jsonrpc": "2.0", "id": "some id","method": "server.ping","params": []}'; - expect(() => jsonRPC.request(jsonRequestString), + expect( + () => jsonRPC.request( + jsonRequestString, + const Duration(seconds: 1), + ), throwsA(isA())); }); @@ -45,7 +52,11 @@ void main() { const jsonRequestString = '{"jsonrpc": "2.0", "id": "some id","method": "server.ping","params": []}'; - expect(() => jsonRPC.request(jsonRequestString), + expect( + () => jsonRPC.request( + jsonRequestString, + const Duration(seconds: 1), + ), throwsA(isA())); }); } From e38f845f00e8adc31847ed559f746faf81ad57b0 Mon Sep 17 00:00:00 2001 From: Diego Salazar Date: Thu, 27 Jul 2023 15:34:55 -0600 Subject: [PATCH 12/14] Bump version (1.7.17, build 184) --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index dc984bcb8..f7c0c093d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Stack Wallet # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.7.17+183 +version: 1.7.17+184 environment: sdk: ">=3.0.2 <4.0.0" From c1b7c9239b495af9cb97c470c5922d9e215424b5 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 27 Jul 2023 15:36:14 -0600 Subject: [PATCH 13/14] monke fix --- .../wallet_view/desktop_wallet_view.dart | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart index 003c735b2..a43b9eca3 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart @@ -10,6 +10,7 @@ import 'dart:async'; import 'dart:io'; +import 'dart:typed_data'; import 'package:event_bus/event_bus.dart'; import 'package:flutter/material.dart'; @@ -28,6 +29,7 @@ import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub import 'package:stackwallet/providers/global/auto_swb_service_provider.dart'; import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/providers/ui/transaction_filter_provider.dart'; +import 'package:stackwallet/services/coins/banano/banano_wallet.dart'; import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart'; import 'package:stackwallet/services/event_bus/global_event_bus.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart'; @@ -153,6 +155,10 @@ class _DesktopWalletViewState extends ConsumerState { final managerProvider = ref.watch(walletsChangeNotifierProvider .select((value) => value.getManagerProvider(widget.walletId))); + final monke = coin == Coin.banano + ? (manager.wallet as BananoWallet).getMonkeyImageBytes() + : null; + return ConditionalParent( condition: _rescanningOnOpen, builder: (child) { @@ -334,13 +340,20 @@ class _DesktopWalletViewState extends ConsumerState { padding: const EdgeInsets.all(20), child: Row( children: [ - SvgPicture.file( - File( - ref.watch(coinIconProvider(coin)), + if (monke != null) + SvgPicture.memory( + Uint8List.fromList(monke!), + width: 60, + height: 60, + ), + if (monke == null) + SvgPicture.file( + File( + ref.watch(coinIconProvider(coin)), + ), + width: 40, + height: 40, ), - width: 40, - height: 40, - ), const SizedBox( width: 10, ), From a6a7b53837762f9be0dbca6cb4ae9c2087abf115 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 27 Jul 2023 15:42:58 -0600 Subject: [PATCH 14/14] show file path on image save --- lib/pages/monkey/monkey_view.dart | 9 +++++++-- lib/pages/ordinals/ordinal_details_view.dart | 12 +++++------- .../ordinals/desktop_ordinal_details_view.dart | 13 +++++-------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/pages/monkey/monkey_view.dart b/lib/pages/monkey/monkey_view.dart index 85ee8d5f2..ebc18843c 100644 --- a/lib/pages/monkey/monkey_view.dart +++ b/lib/pages/monkey/monkey_view.dart @@ -66,6 +66,8 @@ class _MonkeyViewState extends ConsumerState { } } + String _monkeyPath = ""; + Future _saveMonKeyToFile({ required Uint8List bytes, bool isPNG = false, @@ -96,6 +98,7 @@ class _MonkeyViewState extends ConsumerState { } await imgFile.writeAsBytes(bytes); + _monkeyPath = filePath; } @override @@ -369,7 +372,8 @@ class _MonkeyViewState extends ConsumerState { if (!didError && mounted) { await showFloatingFlushBar( type: FlushBarType.success, - message: "SVG MonKey image saved", + message: + "SVG MonKey image saved to $_monkeyPath", context: context, ); } @@ -421,7 +425,8 @@ class _MonkeyViewState extends ConsumerState { if (!didError && mounted) { await showFloatingFlushBar( type: FlushBarType.success, - message: "PNG MonKey image saved", + message: + "PNG MonKey image saved to $_monkeyPath", context: context, ); } diff --git a/lib/pages/ordinals/ordinal_details_view.dart b/lib/pages/ordinals/ordinal_details_view.dart index 2057c91db..041401767 100644 --- a/lib/pages/ordinals/ordinal_details_view.dart +++ b/lib/pages/ordinals/ordinal_details_view.dart @@ -229,7 +229,7 @@ class _OrdinalImageGroup extends StatelessWidget { static const _spacing = 12.0; - Future _savePngToFile() async { + Future _savePngToFile() async { final response = await get(Uri.parse(ordinal.content)); if (response.statusCode != 200) { @@ -257,6 +257,7 @@ class _OrdinalImageGroup extends StatelessWidget { } await imgFile.writeAsBytes(bytes); + return filePath; } @override @@ -309,11 +310,8 @@ class _OrdinalImageGroup extends StatelessWidget { iconSpacing: 4, onPressed: () async { bool didError = false; - await showLoading( - whileFuture: Future.wait([ - _savePngToFile(), - Future.delayed(const Duration(seconds: 2)), - ]), + final filePath = await showLoading( + whileFuture: _savePngToFile(), context: context, isDesktop: true, message: "Saving ordinal image", @@ -334,7 +332,7 @@ class _OrdinalImageGroup extends StatelessWidget { if (!didError && context.mounted) { await showFloatingFlushBar( type: FlushBarType.success, - message: "Image saved", + message: "Image saved to $filePath", context: context, ); } diff --git a/lib/pages_desktop_specific/ordinals/desktop_ordinal_details_view.dart b/lib/pages_desktop_specific/ordinals/desktop_ordinal_details_view.dart index 0ec19a19f..b0225f286 100644 --- a/lib/pages_desktop_specific/ordinals/desktop_ordinal_details_view.dart +++ b/lib/pages_desktop_specific/ordinals/desktop_ordinal_details_view.dart @@ -49,7 +49,7 @@ class _DesktopOrdinalDetailsViewState late final UTXO? utxo; - Future _savePngToFile() async { + Future _savePngToFile() async { final response = await get(Uri.parse(widget.ordinal.content)); if (response.statusCode != 200) { @@ -77,6 +77,7 @@ class _DesktopOrdinalDetailsViewState } await imgFile.writeAsBytes(bytes); + return filePath; } @override @@ -224,12 +225,8 @@ class _DesktopOrdinalDetailsViewState iconSpacing: 8, onPressed: () async { bool didError = false; - await showLoading( - whileFuture: Future.wait([ - _savePngToFile(), - Future.delayed( - const Duration(seconds: 2)), - ]), + final path = await showLoading( + whileFuture: _savePngToFile(), context: context, isDesktop: true, message: "Saving ordinal image", @@ -251,7 +248,7 @@ class _DesktopOrdinalDetailsViewState if (!didError && mounted) { await showFloatingFlushBar( type: FlushBarType.success, - message: "Image saved", + message: "Image saved to $path", context: context, ); }