From 44a87df41c5fe7d485681e91044a483e4e0ba116 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 23 Mar 2023 18:21:09 -0600 Subject: [PATCH] merge clean up --- .../isar/models/blockchain_data/address.dart | 2 + .../create_or_restore_wallet_view.dart | 1 - .../addresses/address_details_view.dart | 2 +- .../appearance_settings_view.dart | 1 - .../settings_menu/appearance_settings.dart | 1 - lib/utilities/db_version_migration.dart | 2 +- .../pages/send_view/send_view_test.mocks.dart | 26 +++++++++++- ...d_address_book_view_screen_test.mocks.dart | 5 +++ ..._entry_details_view_screen_test.mocks.dart | 5 +++ ...ess_book_entry_view_screen_test.mocks.dart | 5 +++ .../exchange/exchange_view_test.mocks.dart | 17 ++++++++ .../lockscreen_view_screen_test.mocks.dart | 5 +++ .../main_view_screen_testA_test.mocks.dart | 5 +++ .../main_view_screen_testB_test.mocks.dart | 5 +++ .../main_view_screen_testC_test.mocks.dart | 5 +++ .../backup_key_view_screen_test.mocks.dart | 5 +++ ...up_key_warning_view_screen_test.mocks.dart | 5 +++ .../create_pin_view_screen_test.mocks.dart | 5 +++ ...restore_wallet_view_screen_test.mocks.dart | 5 +++ ...ify_backup_key_view_screen_test.mocks.dart | 5 +++ .../currency_view_screen_test.mocks.dart | 5 +++ ...dd_custom_node_view_screen_test.mocks.dart | 5 +++ .../node_details_view_screen_test.mocks.dart | 5 +++ .../wallet_backup_view_screen_test.mocks.dart | 5 +++ ...rescan_warning_view_screen_test.mocks.dart | 5 +++ ...elete_mnemonic_view_screen_test.mocks.dart | 5 +++ ...allet_settings_view_screen_test.mocks.dart | 5 +++ .../settings_view_screen_test.mocks.dart | 5 +++ ...search_results_view_screen_test.mocks.dart | 5 +++ .../confirm_send_view_screen_test.mocks.dart | 5 +++ .../receive_view_screen_test.mocks.dart | 5 +++ .../send_view_screen_test.mocks.dart | 5 +++ .../wallet_view_screen_test.mocks.dart | 5 +++ .../managed_favorite_test.mocks.dart | 26 +++++++++++- .../table_view/table_view_row_test.mocks.dart | 26 +++++++++++- .../transaction_card_test.mocks.dart | 41 ++++++++++++++++++- ...et_info_row_balance_future_test.mocks.dart | 26 +++++++++++- .../wallet_info_row_test.mocks.dart | 26 +++++++++++- 38 files changed, 311 insertions(+), 11 deletions(-) diff --git a/lib/models/isar/models/blockchain_data/address.dart b/lib/models/isar/models/blockchain_data/address.dart index 80b3d8a98..25281a629 100644 --- a/lib/models/isar/models/blockchain_data/address.dart +++ b/lib/models/isar/models/blockchain_data/address.dart @@ -141,6 +141,8 @@ enum AddressType { return "Unknown"; case AddressType.nonWallet: return "Non wallet/unknown"; + case AddressType.ethereum: + return "Ethereum"; } } } diff --git a/lib/pages/add_wallet_views/create_or_restore_wallet_view/create_or_restore_wallet_view.dart b/lib/pages/add_wallet_views/create_or_restore_wallet_view/create_or_restore_wallet_view.dart index 09cf78953..802910275 100644 --- a/lib/pages/add_wallet_views/create_or_restore_wallet_view/create_or_restore_wallet_view.dart +++ b/lib/pages/add_wallet_views/create_or_restore_wallet_view/create_or_restore_wallet_view.dart @@ -5,7 +5,6 @@ import 'package:stackwallet/pages/add_wallet_views/create_or_restore_wallet_view import 'package:stackwallet/pages/add_wallet_views/create_or_restore_wallet_view/sub_widgets/create_or_restore_wallet_title.dart'; import 'package:stackwallet/pages/add_wallet_views/create_or_restore_wallet_view/sub_widgets/create_wallet_button_group.dart'; import 'package:stackwallet/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart'; -import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/theme/color_theme.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/util.dart'; diff --git a/lib/pages/receive_view/addresses/address_details_view.dart b/lib/pages/receive_view/addresses/address_details_view.dart index 1ddf2f666..1eb3b820f 100644 --- a/lib/pages/receive_view/addresses/address_details_view.dart +++ b/lib/pages/receive_view/addresses/address_details_view.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:isar/isar.dart'; import 'package:qr_flutter/qr_flutter.dart'; -import 'package:stackwallet/db/main_db.dart'; +import 'package:stackwallet/db/isar/main_db.dart'; import 'package:stackwallet/models/isar/models/isar_models.dart'; import 'package:stackwallet/pages/receive_view/addresses/address_tag.dart'; import 'package:stackwallet/pages/wallet_view/sub_widgets/no_transactions_found.dart'; diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart index adde8eb4a..981ddc69c 100644 --- a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart +++ b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:stackwallet/db/hive/db.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/providers/ui/color_theme_provider.dart'; diff --git a/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart index f3250fe23..f10d91555 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/appearance_settings.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:stackwallet/db/hive/db.dart'; import 'package:stackwallet/providers/global/prefs_provider.dart'; import 'package:stackwallet/providers/ui/color_theme_provider.dart'; import 'package:stackwallet/utilities/assets.dart'; diff --git a/lib/utilities/db_version_migration.dart b/lib/utilities/db_version_migration.dart index 44e3682c8..220525f73 100644 --- a/lib/utilities/db_version_migration.dart +++ b/lib/utilities/db_version_migration.dart @@ -1,7 +1,7 @@ import 'package:hive/hive.dart'; +import 'package:isar/isar.dart'; import 'package:stackwallet/db/hive/db.dart'; import 'package:stackwallet/db/isar/main_db.dart'; -import 'package:isar/isar.dart'; import 'package:stackwallet/electrumx_rpc/electrumx.dart'; import 'package:stackwallet/models/exchange/change_now/exchange_transaction.dart'; import 'package:stackwallet/models/exchange/response_objects/trade.dart'; diff --git a/test/pages/send_view/send_view_test.mocks.dart b/test/pages/send_view/send_view_test.mocks.dart index 149d690b1..539f7b059 100644 --- a/test/pages/send_view/send_view_test.mocks.dart +++ b/test/pages/send_view/send_view_test.mocks.dart @@ -13,7 +13,7 @@ import 'package:bitcoindart/bitcoindart.dart' as _i14; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/main_db.dart' as _i13; +import 'package:stackwallet/db/isar/main_db.dart' as _i13; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i11; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i10; import 'package:stackwallet/models/balance.dart' as _i12; @@ -1641,6 +1641,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet { returnValueForMissingStub: _i22.Future.value(), ) as _i22.Future); @override + List getWalletTokenContractAddresses() => (super.noSuchMethod( + Invocation.method( + #getWalletTokenContractAddresses, + [], + ), + returnValue: [], + ) as List); + @override + _i22.Future updateWalletTokenContractAddresses( + List? contractAddresses) => + (super.noSuchMethod( + Invocation.method( + #updateWalletTokenContractAddresses, + [contractAddresses], + ), + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); + @override void initWalletDB({_i13.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( #initWalletDB, @@ -2837,6 +2856,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 a36548d2d..7d01dfbba 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 @@ -378,6 +378,11 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 b78f3f23e..e82f51d64 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 @@ -339,6 +339,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 68697c039..d150ff23d 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 @@ -337,6 +337,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, diff --git a/test/screen_tests/exchange/exchange_view_test.mocks.dart b/test/screen_tests/exchange/exchange_view_test.mocks.dart index d926e9e5b..7a0074677 100644 --- a/test/screen_tests/exchange/exchange_view_test.mocks.dart +++ b/test/screen_tests/exchange/exchange_view_test.mocks.dart @@ -732,6 +732,23 @@ class MockChangeNowAPI extends _i1.Mock implements _i12.ChangeNowAPI { )), ) as _i7.Future<_i2.ExchangeResponse>>); @override + _i7.Future<_i2.ExchangeResponse>> getCurrenciesV2() => + (super.noSuchMethod( + Invocation.method( + #getCurrenciesV2, + [], + ), + returnValue: + _i7.Future<_i2.ExchangeResponse>>.value( + _FakeExchangeResponse_0>( + this, + Invocation.method( + #getCurrenciesV2, + [], + ), + )), + ) as _i7.Future<_i2.ExchangeResponse>>); + @override _i7.Future<_i2.ExchangeResponse>> getPairedCurrencies({ required String? ticker, bool? fixedRate, diff --git a/test/screen_tests/lockscreen_view_screen_test.mocks.dart b/test/screen_tests/lockscreen_view_screen_test.mocks.dart index 439ecd5c9..1a535475b 100644 --- a/test/screen_tests/lockscreen_view_screen_test.mocks.dart +++ b/test/screen_tests/lockscreen_view_screen_test.mocks.dart @@ -646,6 +646,11 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 d624d4171..4833c56ee 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 @@ -433,6 +433,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 70c08470b..33c356d74 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 @@ -433,6 +433,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 1f2176350..b19d16114 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 @@ -433,6 +433,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 7377d155e..34a6a36fe 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 @@ -208,6 +208,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 2b31cb96c..f3967ade5 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 @@ -431,6 +431,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 54eec30cf..f1d3b0c4b 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 @@ -646,6 +646,11 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 e92f4d289..20ac25812 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 @@ -487,6 +487,11 @@ class MockManager extends _i1.Mock implements _i12.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 13a6568c8..93d4f4874 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 @@ -208,6 +208,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 82f4bcd3e..cfe9cd50e 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 @@ -208,6 +208,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 fc4171b63..8e5c07700 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 @@ -423,6 +423,11 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 f990ec83a..c3d4a7279 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 @@ -423,6 +423,11 @@ class MockManager extends _i1.Mock implements _i11.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 44dd68cee..8efc17d42 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 @@ -208,6 +208,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 a7764e149..5f5c9ee97 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 @@ -208,6 +208,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 4c7dbfd7a..c39df921e 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 @@ -431,6 +431,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 e736cfdd8..6f3828684 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 @@ -688,6 +688,11 @@ class MockManager extends _i1.Mock implements _i15.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 be1b24bcb..ea371aad5 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 @@ -431,6 +431,11 @@ class MockManager extends _i1.Mock implements _i9.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 7cf8968b1..9b4056348 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 @@ -210,6 +210,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 81980dca0..b0e4bcc7d 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 @@ -209,6 +209,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 3055cf6c6..6c02b46e1 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 @@ -208,6 +208,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 533578e6c..b3fcf528f 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 @@ -250,6 +250,11 @@ class MockManager extends _i1.Mock implements _i8.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 f71a62d92..5cbb93bc1 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 @@ -210,6 +210,11 @@ class MockManager extends _i1.Mock implements _i5.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, diff --git a/test/widget_tests/managed_favorite_test.mocks.dart b/test/widget_tests/managed_favorite_test.mocks.dart index f8bda0845..5abf517b7 100644 --- a/test/widget_tests/managed_favorite_test.mocks.dart +++ b/test/widget_tests/managed_favorite_test.mocks.dart @@ -13,7 +13,7 @@ import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/main_db.dart' as _i12; +import 'package:stackwallet/db/isar/main_db.dart' as _i12; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9; import 'package:stackwallet/models/balance.dart' as _i11; @@ -1432,6 +1432,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: _i22.Future.value(), ) as _i22.Future); @override + List getWalletTokenContractAddresses() => (super.noSuchMethod( + Invocation.method( + #getWalletTokenContractAddresses, + [], + ), + returnValue: [], + ) as List); + @override + _i22.Future updateWalletTokenContractAddresses( + List? contractAddresses) => + (super.noSuchMethod( + Invocation.method( + #updateWalletTokenContractAddresses, + [contractAddresses], + ), + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); + @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( #initWalletDB, @@ -2411,6 +2430,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 84cfac4c8..cc022b12e 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 @@ -13,7 +13,7 @@ import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/main_db.dart' as _i12; +import 'package:stackwallet/db/isar/main_db.dart' as _i12; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9; import 'package:stackwallet/models/balance.dart' as _i11; @@ -1419,6 +1419,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet { returnValueForMissingStub: _i21.Future.value(), ) as _i21.Future); @override + List getWalletTokenContractAddresses() => (super.noSuchMethod( + Invocation.method( + #getWalletTokenContractAddresses, + [], + ), + returnValue: [], + ) as List); + @override + _i21.Future updateWalletTokenContractAddresses( + List? contractAddresses) => + (super.noSuchMethod( + Invocation.method( + #updateWalletTokenContractAddresses, + [contractAddresses], + ), + returnValue: _i21.Future.value(), + returnValueForMissingStub: _i21.Future.value(), + ) as _i21.Future); + @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( #initWalletDB, @@ -2136,6 +2155,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, diff --git a/test/widget_tests/transaction_card_test.mocks.dart b/test/widget_tests/transaction_card_test.mocks.dart index 51afbec22..60a51073a 100644 --- a/test/widget_tests/transaction_card_test.mocks.dart +++ b/test/widget_tests/transaction_card_test.mocks.dart @@ -10,7 +10,7 @@ import 'package:decimal/decimal.dart' as _i14; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/main_db.dart' as _i13; +import 'package:stackwallet/db/isar/main_db.dart' as _i13; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i12; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i11; import 'package:stackwallet/models/balance.dart' as _i9; @@ -556,6 +556,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, @@ -1956,6 +1961,25 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet { returnValueForMissingStub: _i18.Future.value(), ) as _i18.Future); @override + List getWalletTokenContractAddresses() => (super.noSuchMethod( + Invocation.method( + #getWalletTokenContractAddresses, + [], + ), + returnValue: [], + ) as List); + @override + _i18.Future updateWalletTokenContractAddresses( + List? contractAddresses) => + (super.noSuchMethod( + Invocation.method( + #updateWalletTokenContractAddresses, + [contractAddresses], + ), + returnValue: _i18.Future.value(), + returnValueForMissingStub: _i18.Future.value(), + ) as _i18.Future); + @override void initWalletDB({_i13.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( #initWalletDB, @@ -2532,6 +2556,21 @@ class MockPriceService extends _i1.Mock implements _i28.PriceService { ), ) as _i15.Tuple2<_i14.Decimal, double>); @override + _i15.Tuple2<_i14.Decimal, double> getTokenPrice(String? contractAddress) => + (super.noSuchMethod( + Invocation.method( + #getTokenPrice, + [contractAddress], + ), + returnValue: _FakeTuple2_13<_i14.Decimal, double>( + this, + Invocation.method( + #getTokenPrice, + [contractAddress], + ), + ), + ) as _i15.Tuple2<_i14.Decimal, double>); + @override _i18.Future updatePrice() => (super.noSuchMethod( Invocation.method( #updatePrice, 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 028cd047e..5c2641dbb 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 @@ -13,7 +13,7 @@ import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/main_db.dart' as _i12; +import 'package:stackwallet/db/isar/main_db.dart' as _i12; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9; import 'package:stackwallet/models/balance.dart' as _i11; @@ -1431,6 +1431,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: _i22.Future.value(), ) as _i22.Future); @override + List getWalletTokenContractAddresses() => (super.noSuchMethod( + Invocation.method( + #getWalletTokenContractAddresses, + [], + ), + returnValue: [], + ) as List); + @override + _i22.Future updateWalletTokenContractAddresses( + List? contractAddresses) => + (super.noSuchMethod( + Invocation.method( + #updateWalletTokenContractAddresses, + [contractAddresses], + ), + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); + @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( #initWalletDB, @@ -2348,6 +2367,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false, 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 8b75cb42e..1f786dbab 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 @@ -13,7 +13,7 @@ import 'package:bitcoindart/bitcoindart.dart' as _i13; import 'package:flutter/foundation.dart' as _i4; import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/db/main_db.dart' as _i12; +import 'package:stackwallet/db/isar/main_db.dart' as _i12; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9; import 'package:stackwallet/models/balance.dart' as _i11; @@ -1431,6 +1431,25 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet { returnValueForMissingStub: _i22.Future.value(), ) as _i22.Future); @override + List getWalletTokenContractAddresses() => (super.noSuchMethod( + Invocation.method( + #getWalletTokenContractAddresses, + [], + ), + returnValue: [], + ) as List); + @override + _i22.Future updateWalletTokenContractAddresses( + List? contractAddresses) => + (super.noSuchMethod( + Invocation.method( + #updateWalletTokenContractAddresses, + [contractAddresses], + ), + returnValue: _i22.Future.value(), + returnValueForMissingStub: _i22.Future.value(), + ) as _i22.Future); + @override void initWalletDB({_i12.MainDB? mockableOverride}) => super.noSuchMethod( Invocation.method( #initWalletDB, @@ -2348,6 +2367,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasTokenSupport => (super.noSuchMethod( + Invocation.getter(#hasTokenSupport), + returnValue: false, + ) as bool); + @override bool get hasWhirlpoolSupport => (super.noSuchMethod( Invocation.getter(#hasWhirlpoolSupport), returnValue: false,