diff --git a/lib/models/isar/models/address_label.dart b/lib/models/isar/models/address_label.dart index f3efa8acf..9988c83c0 100644 --- a/lib/models/isar/models/address_label.dart +++ b/lib/models/isar/models/address_label.dart @@ -8,6 +8,7 @@ class AddressLabel { required this.walletId, required this.addressString, required this.value, + required this.tags, }); Id id = Isar.autoIncrement; @@ -20,11 +21,14 @@ class AddressLabel { late final String value; - AddressLabel copyWith({String? label, Id? id}) { + late final List? tags; + + AddressLabel copyWith({String? label, Id? id, List? tags}) { final addressLabel = AddressLabel( walletId: walletId, addressString: addressString, value: label ?? value, + tags: tags ?? this.tags, ); addressLabel.id = id ?? this.id; return addressLabel; diff --git a/lib/models/isar/models/address_label.g.dart b/lib/models/isar/models/address_label.g.dart index 1cd21f035..2a6b41e70 100644 --- a/lib/models/isar/models/address_label.g.dart +++ b/lib/models/isar/models/address_label.g.dart @@ -22,13 +22,18 @@ const AddressLabelSchema = CollectionSchema( name: r'addressString', type: IsarType.string, ), - r'value': PropertySchema( + r'tags': PropertySchema( id: 1, + name: r'tags', + type: IsarType.stringList, + ), + r'value': PropertySchema( + id: 2, name: r'value', type: IsarType.string, ), r'walletId': PropertySchema( - id: 2, + id: 3, name: r'walletId', type: IsarType.string, ) @@ -86,6 +91,18 @@ int _addressLabelEstimateSize( ) { var bytesCount = offsets.last; bytesCount += 3 + object.addressString.length * 3; + { + final list = object.tags; + if (list != null) { + bytesCount += 3 + list.length * 3; + { + for (var i = 0; i < list.length; i++) { + final value = list[i]; + bytesCount += value.length * 3; + } + } + } + } bytesCount += 3 + object.value.length * 3; bytesCount += 3 + object.walletId.length * 3; return bytesCount; @@ -98,8 +115,9 @@ void _addressLabelSerialize( Map> allOffsets, ) { writer.writeString(offsets[0], object.addressString); - writer.writeString(offsets[1], object.value); - writer.writeString(offsets[2], object.walletId); + writer.writeStringList(offsets[1], object.tags); + writer.writeString(offsets[2], object.value); + writer.writeString(offsets[3], object.walletId); } AddressLabel _addressLabelDeserialize( @@ -110,8 +128,9 @@ AddressLabel _addressLabelDeserialize( ) { final object = AddressLabel( addressString: reader.readString(offsets[0]), - value: reader.readString(offsets[1]), - walletId: reader.readString(offsets[2]), + tags: reader.readStringList(offsets[1]), + value: reader.readString(offsets[2]), + walletId: reader.readString(offsets[3]), ); object.id = id; return object; @@ -127,9 +146,11 @@ P _addressLabelDeserializeProp

( case 0: return (reader.readString(offset)) as P; case 1: - return (reader.readString(offset)) as P; + return (reader.readStringList(offset)) as P; case 2: return (reader.readString(offset)) as P; + case 3: + return (reader.readString(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -649,6 +670,248 @@ extension AddressLabelQueryFilter }); } + QueryBuilder tagsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'tags', + )); + }); + } + + QueryBuilder + tagsIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'tags', + )); + }); + } + + QueryBuilder + tagsElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'tags', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + tagsElementGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'tags', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + tagsElementLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'tags', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + tagsElementBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'tags', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + tagsElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'tags', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + tagsElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'tags', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + tagsElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'tags', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + tagsElementMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'tags', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + tagsElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'tags', + value: '', + )); + }); + } + + QueryBuilder + tagsElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'tags', + value: '', + )); + }); + } + + QueryBuilder + tagsLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tags', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder + tagsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tags', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder + tagsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tags', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder + tagsLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tags', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder + tagsLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tags', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder + tagsLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tags', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + QueryBuilder valueEqualTo( String value, { bool caseSensitive = true, @@ -1028,6 +1291,12 @@ extension AddressLabelQueryWhereDistinct }); } + QueryBuilder distinctByTags() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'tags'); + }); + } + QueryBuilder distinctByValue( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { @@ -1057,6 +1326,12 @@ extension AddressLabelQueryProperty }); } + QueryBuilder?, QQueryOperations> tagsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'tags'); + }); + } + QueryBuilder valueProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'value'); diff --git a/lib/pages/receive_view/addresses/address_card.dart b/lib/pages/receive_view/addresses/address_card.dart index 0bc922e9c..3f6edb585 100644 --- a/lib/pages/receive_view/addresses/address_card.dart +++ b/lib/pages/receive_view/addresses/address_card.dart @@ -56,6 +56,11 @@ class _AddressCardState extends State { walletId: widget.walletId, addressString: address.value, value: "", + tags: address.subType == AddressSubType.receiving + ? ["receiving"] + : address.subType == AddressSubType.change + ? ["change"] + : null, ); id = MainDB.instance.putAddressLabelSync(label!); } diff --git a/lib/utilities/constants.dart b/lib/utilities/constants.dart index 9f1eaa4c7..55569a6d3 100644 --- a/lib/utilities/constants.dart +++ b/lib/utilities/constants.dart @@ -41,7 +41,7 @@ abstract class Constants { // Enable Logger.print statements static const bool disableLogger = false; - static const int currentHiveDbVersion = 6; + static const int currentHiveDbVersion = 7; static const int rescanV1 = 1; diff --git a/lib/utilities/db_version_migration.dart b/lib/utilities/db_version_migration.dart index c732ee9c2..c3bd082da 100644 --- a/lib/utilities/db_version_migration.dart +++ b/lib/utilities/db_version_migration.dart @@ -1,9 +1,11 @@ import 'package:hive/hive.dart'; +import 'package:isar/isar.dart'; import 'package:stackwallet/db/main_db.dart'; import 'package:stackwallet/electrumx_rpc/electrumx.dart'; import 'package:stackwallet/hive/db.dart'; import 'package:stackwallet/models/exchange/change_now/exchange_transaction.dart'; import 'package:stackwallet/models/exchange/response_objects/trade.dart'; +import 'package:stackwallet/models/isar/models/blockchain_data/address.dart'; import 'package:stackwallet/models/isar/models/isar_models.dart' as isar_models; import 'package:stackwallet/models/models.dart'; import 'package:stackwallet/models/node_model.dart'; @@ -205,6 +207,61 @@ class DbVersionMigrator with WalletDB { // try to continue migrating return await migrate(6, secureStore: secureStore); + case 6: + // migrate + await MainDB.instance.initMainDB(); + final count = await MainDB.instance.isar.addresses.count(); + // add change/receiving tags to address labels + for (var i = 0; i < count; i += 50) { + final addresses = await MainDB.instance.isar.addresses + .where() + .offset(i) + .limit(50) + .findAll(); + + final List labels = []; + for (final address in addresses) { + final tags = address.subType == AddressSubType.receiving + ? ["receiving"] + : address.subType == AddressSubType.change + ? ["change"] + : null; + + // update/create label if tags is not empty + if (tags != null) { + isar_models.AddressLabel? label = await MainDB + .instance.isar.addressLabels + .where() + .addressStringWalletIdEqualTo(address.value, address.walletId) + .findFirst(); + if (label == null) { + label = isar_models.AddressLabel( + walletId: address.walletId, + value: "", + addressString: address.value, + tags: tags, + ); + } else if (label.tags == null) { + label = label.copyWith(tags: tags); + } + labels.add(label); + } + } + + if (labels.isNotEmpty) { + await MainDB.instance.isar.writeTxn(() async { + await MainDB.instance.isar.addressLabels.putAll(labels); + }); + } + } + + // update version + await DB.instance.put( + boxName: DB.boxNameDBInfo, key: "hive_data_version", value: 7); + + // try to continue migrating + return await migrate(7, secureStore: secureStore); + default: // finally return return; diff --git a/test/cached_electrumx_test.mocks.dart b/test/cached_electrumx_test.mocks.dart index ca8544cc4..6f96a5875 100644 --- a/test/cached_electrumx_test.mocks.dart +++ b/test/cached_electrumx_test.mocks.dart @@ -4,7 +4,7 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; -import 'dart:ui' as _i8; +import 'dart:ui' as _i9; import 'package:decimal/decimal.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; @@ -12,6 +12,7 @@ import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3; import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i7; import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i6; import 'package:stackwallet/utilities/prefs.dart' as _i5; +import 'package:stackwallet/utilities/theme/color_theme.dart' as _i8; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -665,6 +666,61 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs { returnValueForMissingStub: null, ); @override + bool get enableSystemBrightness => (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) as bool); + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter( + #enableSystemBrightness, + enableSystemBrightness, + ), + returnValueForMissingStub: null, + ); + @override + _i8.ThemeType get theme => (super.noSuchMethod( + Invocation.getter(#theme), + returnValue: _i8.ThemeType.light, + ) as _i8.ThemeType); + @override + set theme(_i8.ThemeType? theme) => super.noSuchMethod( + Invocation.setter( + #theme, + theme, + ), + returnValueForMissingStub: null, + ); + @override + _i8.ThemeType get systemBrightnessLightTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightTheme), + returnValue: _i8.ThemeType.light, + ) as _i8.ThemeType); + @override + set systemBrightnessLightTheme(_i8.ThemeType? systemBrightnessLightTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessLightTheme, + systemBrightnessLightTheme, + ), + returnValueForMissingStub: null, + ); + @override + _i8.ThemeType get systemBrightnessDarkTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkTheme), + returnValue: _i8.ThemeType.light, + ) as _i8.ThemeType); + @override + set systemBrightnessDarkTheme(_i8.ThemeType? systemBrightnessDarkTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessDarkTheme, + systemBrightnessDarkTheme, + ), + returnValueForMissingStub: null, + ); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, @@ -714,7 +770,7 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs { returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -722,7 +778,7 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs { returnValueForMissingStub: null, ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], diff --git a/test/electrumx_test.mocks.dart b/test/electrumx_test.mocks.dart index b7147a3b8..e18e0aedf 100644 --- a/test/electrumx_test.mocks.dart +++ b/test/electrumx_test.mocks.dart @@ -4,13 +4,14 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; -import 'dart:ui' as _i7; +import 'dart:ui' as _i8; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/electrumx_rpc/rpc.dart' as _i2; import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i6; import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i5; import 'package:stackwallet/utilities/prefs.dart' as _i4; +import 'package:stackwallet/utilities/theme/color_theme.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -386,6 +387,61 @@ class MockPrefs extends _i1.Mock implements _i4.Prefs { returnValueForMissingStub: null, ); @override + bool get enableSystemBrightness => (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) as bool); + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter( + #enableSystemBrightness, + enableSystemBrightness, + ), + returnValueForMissingStub: null, + ); + @override + _i7.ThemeType get theme => (super.noSuchMethod( + Invocation.getter(#theme), + returnValue: _i7.ThemeType.light, + ) as _i7.ThemeType); + @override + set theme(_i7.ThemeType? theme) => super.noSuchMethod( + Invocation.setter( + #theme, + theme, + ), + returnValueForMissingStub: null, + ); + @override + _i7.ThemeType get systemBrightnessLightTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightTheme), + returnValue: _i7.ThemeType.light, + ) as _i7.ThemeType); + @override + set systemBrightnessLightTheme(_i7.ThemeType? systemBrightnessLightTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessLightTheme, + systemBrightnessLightTheme, + ), + returnValueForMissingStub: null, + ); + @override + _i7.ThemeType get systemBrightnessDarkTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkTheme), + returnValue: _i7.ThemeType.light, + ) as _i7.ThemeType); + @override + set systemBrightnessDarkTheme(_i7.ThemeType? systemBrightnessDarkTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessDarkTheme, + systemBrightnessDarkTheme, + ), + returnValueForMissingStub: null, + ); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, @@ -435,7 +491,7 @@ class MockPrefs extends _i1.Mock implements _i4.Prefs { returnValueForMissingStub: _i3.Future.value(), ) as _i3.Future); @override - void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -443,7 +499,7 @@ class MockPrefs extends _i1.Mock implements _i4.Prefs { returnValueForMissingStub: null, ); @override - void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], diff --git a/test/pages/send_view/send_view_test.mocks.dart b/test/pages/send_view/send_view_test.mocks.dart index 47b651143..149d690b1 100644 --- a/test/pages/send_view/send_view_test.mocks.dart +++ b/test/pages/send_view/send_view_test.mocks.dart @@ -37,6 +37,7 @@ import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i31; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i7; import 'package:stackwallet/utilities/prefs.dart' as _i23; +import 'package:stackwallet/utilities/theme/color_theme.dart' as _i33; import 'package:tuple/tuple.dart' as _i15; // ignore_for_file: type=lint @@ -2547,6 +2548,61 @@ class MockPrefs extends _i1.Mock implements _i23.Prefs { returnValueForMissingStub: null, ); @override + bool get enableSystemBrightness => (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) as bool); + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter( + #enableSystemBrightness, + enableSystemBrightness, + ), + returnValueForMissingStub: null, + ); + @override + _i33.ThemeType get theme => (super.noSuchMethod( + Invocation.getter(#theme), + returnValue: _i33.ThemeType.light, + ) as _i33.ThemeType); + @override + set theme(_i33.ThemeType? theme) => super.noSuchMethod( + Invocation.setter( + #theme, + theme, + ), + returnValueForMissingStub: null, + ); + @override + _i33.ThemeType get systemBrightnessLightTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightTheme), + returnValue: _i33.ThemeType.light, + ) as _i33.ThemeType); + @override + set systemBrightnessLightTheme(_i33.ThemeType? systemBrightnessLightTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessLightTheme, + systemBrightnessLightTheme, + ), + returnValueForMissingStub: null, + ); + @override + _i33.ThemeType get systemBrightnessDarkTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkTheme), + returnValue: _i33.ThemeType.light, + ) as _i33.ThemeType); + @override + set systemBrightnessDarkTheme(_i33.ThemeType? systemBrightnessDarkTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessDarkTheme, + systemBrightnessDarkTheme, + ), + returnValueForMissingStub: null, + ); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, @@ -2781,6 +2837,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 010eb83a3..a36548d2d 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 addfaf6ee..b78f3f23e 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 ed28d7edc..68697c039 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, diff --git a/test/screen_tests/exchange/exchange_view_test.mocks.dart b/test/screen_tests/exchange/exchange_view_test.mocks.dart index 079c2ead2..d926e9e5b 100644 --- a/test/screen_tests/exchange/exchange_view_test.mocks.dart +++ b/test/screen_tests/exchange/exchange_view_test.mocks.dart @@ -3,35 +3,37 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; -import 'dart:ui' as _i7; +import 'dart:async' as _i7; +import 'dart:ui' as _i8; -import 'package:decimal/decimal.dart' as _i14; -import 'package:http/http.dart' as _i12; +import 'package:decimal/decimal.dart' as _i15; +import 'package:http/http.dart' as _i13; import 'package:mockito/mockito.dart' as _i1; import 'package:stackwallet/models/exchange/change_now/cn_exchange_estimate.dart' - as _i17; -import 'package:stackwallet/models/exchange/change_now/exchange_transaction.dart' - as _i19; -import 'package:stackwallet/models/exchange/change_now/exchange_transaction_status.dart' - as _i20; -import 'package:stackwallet/models/exchange/response_objects/estimate.dart' - as _i16; -import 'package:stackwallet/models/exchange/response_objects/fixed_rate_market.dart' as _i18; +import 'package:stackwallet/models/exchange/change_now/exchange_transaction.dart' + as _i20; +import 'package:stackwallet/models/exchange/change_now/exchange_transaction_status.dart' + as _i21; +import 'package:stackwallet/models/exchange/response_objects/estimate.dart' + as _i17; +import 'package:stackwallet/models/exchange/response_objects/fixed_rate_market.dart' + as _i19; import 'package:stackwallet/models/exchange/response_objects/range.dart' - as _i15; -import 'package:stackwallet/models/exchange/response_objects/trade.dart' as _i9; -import 'package:stackwallet/models/isar/exchange_cache/currency.dart' as _i13; -import 'package:stackwallet/models/isar/exchange_cache/pair.dart' as _i21; + as _i16; +import 'package:stackwallet/models/exchange/response_objects/trade.dart' + as _i10; +import 'package:stackwallet/models/isar/exchange_cache/currency.dart' as _i14; +import 'package:stackwallet/models/isar/exchange_cache/pair.dart' as _i22; import 'package:stackwallet/services/exchange/change_now/change_now_api.dart' - as _i11; + as _i12; import 'package:stackwallet/services/exchange/exchange_response.dart' as _i2; -import 'package:stackwallet/services/trade_notes_service.dart' as _i10; -import 'package:stackwallet/services/trade_service.dart' as _i8; +import 'package:stackwallet/services/trade_notes_service.dart' as _i11; +import 'package:stackwallet/services/trade_service.dart' as _i9; import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i5; import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i4; import 'package:stackwallet/utilities/prefs.dart' as _i3; +import 'package:stackwallet/utilities/theme/color_theme.dart' as _i6; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -335,56 +337,111 @@ class MockPrefs extends _i1.Mock implements _i3.Prefs { returnValueForMissingStub: null, ); @override + bool get enableSystemBrightness => (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) as bool); + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter( + #enableSystemBrightness, + enableSystemBrightness, + ), + returnValueForMissingStub: null, + ); + @override + _i6.ThemeType get theme => (super.noSuchMethod( + Invocation.getter(#theme), + returnValue: _i6.ThemeType.light, + ) as _i6.ThemeType); + @override + set theme(_i6.ThemeType? theme) => super.noSuchMethod( + Invocation.setter( + #theme, + theme, + ), + returnValueForMissingStub: null, + ); + @override + _i6.ThemeType get systemBrightnessLightTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightTheme), + returnValue: _i6.ThemeType.light, + ) as _i6.ThemeType); + @override + set systemBrightnessLightTheme(_i6.ThemeType? systemBrightnessLightTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessLightTheme, + systemBrightnessLightTheme, + ), + returnValueForMissingStub: null, + ); + @override + _i6.ThemeType get systemBrightnessDarkTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkTheme), + returnValue: _i6.ThemeType.light, + ) as _i6.ThemeType); + @override + set systemBrightnessDarkTheme(_i6.ThemeType? systemBrightnessDarkTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessDarkTheme, + systemBrightnessDarkTheme, + ), + returnValueForMissingStub: null, + ); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i6.Future init() => (super.noSuchMethod( + _i7.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( + _i7.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( Invocation.method( #incrementCurrentNotificationIndex, [], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future isExternalCallsSet() => (super.noSuchMethod( + _i7.Future isExternalCallsSet() => (super.noSuchMethod( Invocation.method( #isExternalCallsSet, [], ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override - _i6.Future saveUserID(String? userId) => (super.noSuchMethod( + _i7.Future saveUserID(String? userId) => (super.noSuchMethod( Invocation.method( #saveUserID, [userId], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( + _i7.Future saveSignupEpoch(int? signupEpoch) => (super.noSuchMethod( Invocation.method( #saveSignupEpoch, [signupEpoch], ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -392,7 +449,7 @@ class MockPrefs extends _i1.Mock implements _i3.Prefs { returnValueForMissingStub: null, ); @override - void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -420,29 +477,29 @@ class MockPrefs extends _i1.Mock implements _i3.Prefs { /// A class which mocks [TradesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockTradesService extends _i1.Mock implements _i8.TradesService { +class MockTradesService extends _i1.Mock implements _i9.TradesService { MockTradesService() { _i1.throwOnMissingStub(this); } @override - List<_i9.Trade> get trades => (super.noSuchMethod( + List<_i10.Trade> get trades => (super.noSuchMethod( Invocation.getter(#trades), - returnValue: <_i9.Trade>[], - ) as List<_i9.Trade>); + returnValue: <_i10.Trade>[], + ) as List<_i10.Trade>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, ) as bool); @override - _i9.Trade? get(String? tradeId) => (super.noSuchMethod(Invocation.method( + _i10.Trade? get(String? tradeId) => (super.noSuchMethod(Invocation.method( #get, [tradeId], - )) as _i9.Trade?); + )) as _i10.Trade?); @override - _i6.Future add({ - required _i9.Trade? trade, + _i7.Future add({ + required _i10.Trade? trade, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -454,12 +511,12 @@ class MockTradesService extends _i1.Mock implements _i8.TradesService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future edit({ - required _i9.Trade? trade, + _i7.Future edit({ + required _i10.Trade? trade, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -471,12 +528,12 @@ class MockTradesService extends _i1.Mock implements _i8.TradesService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future delete({ - required _i9.Trade? trade, + _i7.Future delete({ + required _i10.Trade? trade, required bool? shouldNotifyListeners, }) => (super.noSuchMethod( @@ -488,11 +545,11 @@ class MockTradesService extends _i1.Mock implements _i8.TradesService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future deleteByUuid({ + _i7.Future deleteByUuid({ required String? uuid, required bool? shouldNotifyListeners, }) => @@ -505,11 +562,11 @@ class MockTradesService extends _i1.Mock implements _i8.TradesService { #shouldNotifyListeners: shouldNotifyListeners, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -517,7 +574,7 @@ class MockTradesService extends _i1.Mock implements _i8.TradesService { returnValueForMissingStub: null, ); @override - void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -545,7 +602,7 @@ class MockTradesService extends _i1.Mock implements _i8.TradesService { /// A class which mocks [TradeNotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockTradeNotesService extends _i1.Mock implements _i10.TradeNotesService { +class MockTradeNotesService extends _i1.Mock implements _i11.TradeNotesService { MockTradeNotesService() { _i1.throwOnMissingStub(this); } @@ -570,7 +627,7 @@ class MockTradeNotesService extends _i1.Mock implements _i10.TradeNotesService { returnValue: '', ) as String); @override - _i6.Future set({ + _i7.Future set({ required String? tradeId, required String? note, }) => @@ -583,21 +640,21 @@ class MockTradeNotesService extends _i1.Mock implements _i10.TradeNotesService { #note: note, }, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - _i6.Future delete({required String? tradeId}) => (super.noSuchMethod( + _i7.Future delete({required String? tradeId}) => (super.noSuchMethod( Invocation.method( #delete, [], {#tradeId: tradeId}, ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override - void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -605,7 +662,7 @@ class MockTradeNotesService extends _i1.Mock implements _i10.TradeNotesService { returnValueForMissingStub: null, ); @override - void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -633,13 +690,13 @@ class MockTradeNotesService extends _i1.Mock implements _i10.TradeNotesService { /// A class which mocks [ChangeNowAPI]. /// /// See the documentation for Mockito's code generation for more information. -class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { +class MockChangeNowAPI extends _i1.Mock implements _i12.ChangeNowAPI { MockChangeNowAPI() { _i1.throwOnMissingStub(this); } @override - set client(_i12.Client? _client) => super.noSuchMethod( + set client(_i13.Client? _client) => super.noSuchMethod( Invocation.setter( #client, _client, @@ -647,7 +704,7 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { returnValueForMissingStub: null, ); @override - _i6.Future<_i2.ExchangeResponse>> getAvailableCurrencies({ + _i7.Future<_i2.ExchangeResponse>> getAvailableCurrencies({ bool? fixedRate, bool? active, }) => @@ -661,8 +718,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), returnValue: - _i6.Future<_i2.ExchangeResponse>>.value( - _FakeExchangeResponse_0>( + _i7.Future<_i2.ExchangeResponse>>.value( + _FakeExchangeResponse_0>( this, Invocation.method( #getAvailableCurrencies, @@ -673,9 +730,9 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6.Future<_i2.ExchangeResponse>>); + ) as _i7.Future<_i2.ExchangeResponse>>); @override - _i6.Future<_i2.ExchangeResponse>> getPairedCurrencies({ + _i7.Future<_i2.ExchangeResponse>> getPairedCurrencies({ required String? ticker, bool? fixedRate, }) => @@ -689,8 +746,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), returnValue: - _i6.Future<_i2.ExchangeResponse>>.value( - _FakeExchangeResponse_0>( + _i7.Future<_i2.ExchangeResponse>>.value( + _FakeExchangeResponse_0>( this, Invocation.method( #getPairedCurrencies, @@ -701,9 +758,9 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6.Future<_i2.ExchangeResponse>>); + ) as _i7.Future<_i2.ExchangeResponse>>); @override - _i6.Future<_i2.ExchangeResponse<_i14.Decimal>> getMinimalExchangeAmount({ + _i7.Future<_i2.ExchangeResponse<_i15.Decimal>> getMinimalExchangeAmount({ required String? fromTicker, required String? toTicker, String? apiKey, @@ -718,8 +775,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { #apiKey: apiKey, }, ), - returnValue: _i6.Future<_i2.ExchangeResponse<_i14.Decimal>>.value( - _FakeExchangeResponse_0<_i14.Decimal>( + returnValue: _i7.Future<_i2.ExchangeResponse<_i15.Decimal>>.value( + _FakeExchangeResponse_0<_i15.Decimal>( this, Invocation.method( #getMinimalExchangeAmount, @@ -731,9 +788,9 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6.Future<_i2.ExchangeResponse<_i14.Decimal>>); + ) as _i7.Future<_i2.ExchangeResponse<_i15.Decimal>>); @override - _i6.Future<_i2.ExchangeResponse<_i15.Range>> getRange({ + _i7.Future<_i2.ExchangeResponse<_i16.Range>> getRange({ required String? fromTicker, required String? toTicker, required bool? isFixedRate, @@ -750,8 +807,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { #apiKey: apiKey, }, ), - returnValue: _i6.Future<_i2.ExchangeResponse<_i15.Range>>.value( - _FakeExchangeResponse_0<_i15.Range>( + returnValue: _i7.Future<_i2.ExchangeResponse<_i16.Range>>.value( + _FakeExchangeResponse_0<_i16.Range>( this, Invocation.method( #getRange, @@ -764,12 +821,12 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6.Future<_i2.ExchangeResponse<_i15.Range>>); + ) as _i7.Future<_i2.ExchangeResponse<_i16.Range>>); @override - _i6.Future<_i2.ExchangeResponse<_i16.Estimate>> getEstimatedExchangeAmount({ + _i7.Future<_i2.ExchangeResponse<_i17.Estimate>> getEstimatedExchangeAmount({ required String? fromTicker, required String? toTicker, - required _i14.Decimal? fromAmount, + required _i15.Decimal? fromAmount, String? apiKey, }) => (super.noSuchMethod( @@ -783,8 +840,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { #apiKey: apiKey, }, ), - returnValue: _i6.Future<_i2.ExchangeResponse<_i16.Estimate>>.value( - _FakeExchangeResponse_0<_i16.Estimate>( + returnValue: _i7.Future<_i2.ExchangeResponse<_i17.Estimate>>.value( + _FakeExchangeResponse_0<_i17.Estimate>( this, Invocation.method( #getEstimatedExchangeAmount, @@ -797,13 +854,13 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6.Future<_i2.ExchangeResponse<_i16.Estimate>>); + ) as _i7.Future<_i2.ExchangeResponse<_i17.Estimate>>); @override - _i6.Future<_i2.ExchangeResponse<_i16.Estimate>> + _i7.Future<_i2.ExchangeResponse<_i17.Estimate>> getEstimatedExchangeAmountFixedRate({ required String? fromTicker, required String? toTicker, - required _i14.Decimal? fromAmount, + required _i15.Decimal? fromAmount, required bool? reversed, bool? useRateId = true, String? apiKey, @@ -821,8 +878,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { #apiKey: apiKey, }, ), - returnValue: _i6.Future<_i2.ExchangeResponse<_i16.Estimate>>.value( - _FakeExchangeResponse_0<_i16.Estimate>( + returnValue: _i7.Future<_i2.ExchangeResponse<_i17.Estimate>>.value( + _FakeExchangeResponse_0<_i17.Estimate>( this, Invocation.method( #getEstimatedExchangeAmountFixedRate, @@ -837,17 +894,17 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6.Future<_i2.ExchangeResponse<_i16.Estimate>>); + ) as _i7.Future<_i2.ExchangeResponse<_i17.Estimate>>); @override - _i6.Future<_i2.ExchangeResponse<_i17.CNExchangeEstimate>> + _i7.Future<_i2.ExchangeResponse<_i18.CNExchangeEstimate>> getEstimatedExchangeAmountV2({ required String? fromTicker, required String? toTicker, - required _i17.CNEstimateType? fromOrTo, - required _i14.Decimal? amount, + required _i18.CNEstimateType? fromOrTo, + required _i15.Decimal? amount, String? fromNetwork, String? toNetwork, - _i17.CNFlowType? flow = _i17.CNFlowType.standard, + _i18.CNFlowType? flow = _i18.CNFlowType.standard, String? apiKey, }) => (super.noSuchMethod( @@ -866,8 +923,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), returnValue: - _i6.Future<_i2.ExchangeResponse<_i17.CNExchangeEstimate>>.value( - _FakeExchangeResponse_0<_i17.CNExchangeEstimate>( + _i7.Future<_i2.ExchangeResponse<_i18.CNExchangeEstimate>>.value( + _FakeExchangeResponse_0<_i18.CNExchangeEstimate>( this, Invocation.method( #getEstimatedExchangeAmountV2, @@ -884,18 +941,18 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6.Future<_i2.ExchangeResponse<_i17.CNExchangeEstimate>>); + ) as _i7.Future<_i2.ExchangeResponse<_i18.CNExchangeEstimate>>); @override - _i6.Future<_i2.ExchangeResponse>> + _i7.Future<_i2.ExchangeResponse>> getAvailableFixedRateMarkets({String? apiKey}) => (super.noSuchMethod( Invocation.method( #getAvailableFixedRateMarkets, [], {#apiKey: apiKey}, ), - returnValue: _i6.Future< - _i2.ExchangeResponse>>.value( - _FakeExchangeResponse_0>( + returnValue: _i7.Future< + _i2.ExchangeResponse>>.value( + _FakeExchangeResponse_0>( this, Invocation.method( #getAvailableFixedRateMarkets, @@ -903,14 +960,14 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { {#apiKey: apiKey}, ), )), - ) as _i6.Future<_i2.ExchangeResponse>>); + ) as _i7.Future<_i2.ExchangeResponse>>); @override - _i6.Future<_i2.ExchangeResponse<_i19.ExchangeTransaction>> + _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>> createStandardExchangeTransaction({ required String? fromTicker, required String? toTicker, required String? receivingAddress, - required _i14.Decimal? amount, + required _i15.Decimal? amount, String? extraId = r'', String? userId = r'', String? contactEmail = r'', @@ -935,9 +992,9 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { #apiKey: apiKey, }, ), - returnValue: _i6.Future< - _i2.ExchangeResponse<_i19.ExchangeTransaction>>.value( - _FakeExchangeResponse_0<_i19.ExchangeTransaction>( + returnValue: _i7.Future< + _i2.ExchangeResponse<_i20.ExchangeTransaction>>.value( + _FakeExchangeResponse_0<_i20.ExchangeTransaction>( this, Invocation.method( #createStandardExchangeTransaction, @@ -956,14 +1013,14 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6.Future<_i2.ExchangeResponse<_i19.ExchangeTransaction>>); + ) as _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>>); @override - _i6.Future<_i2.ExchangeResponse<_i19.ExchangeTransaction>> + _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>> createFixedRateExchangeTransaction({ required String? fromTicker, required String? toTicker, required String? receivingAddress, - required _i14.Decimal? amount, + required _i15.Decimal? amount, required String? rateId, required bool? reversed, String? extraId = r'', @@ -992,9 +1049,9 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { #apiKey: apiKey, }, ), - returnValue: _i6.Future< - _i2.ExchangeResponse<_i19.ExchangeTransaction>>.value( - _FakeExchangeResponse_0<_i19.ExchangeTransaction>( + returnValue: _i7.Future< + _i2.ExchangeResponse<_i20.ExchangeTransaction>>.value( + _FakeExchangeResponse_0<_i20.ExchangeTransaction>( this, Invocation.method( #createFixedRateExchangeTransaction, @@ -1015,9 +1072,9 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6.Future<_i2.ExchangeResponse<_i19.ExchangeTransaction>>); + ) as _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>>); @override - _i6.Future<_i2.ExchangeResponse<_i20.ExchangeTransactionStatus>> + _i7.Future<_i2.ExchangeResponse<_i21.ExchangeTransactionStatus>> getTransactionStatus({ required String? id, String? apiKey, @@ -1031,9 +1088,9 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { #apiKey: apiKey, }, ), - returnValue: _i6.Future< - _i2.ExchangeResponse<_i20.ExchangeTransactionStatus>>.value( - _FakeExchangeResponse_0<_i20.ExchangeTransactionStatus>( + returnValue: _i7.Future< + _i2.ExchangeResponse<_i21.ExchangeTransactionStatus>>.value( + _FakeExchangeResponse_0<_i21.ExchangeTransactionStatus>( this, Invocation.method( #getTransactionStatus, @@ -1044,10 +1101,10 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { }, ), )), - ) as _i6 - .Future<_i2.ExchangeResponse<_i20.ExchangeTransactionStatus>>); + ) as _i7 + .Future<_i2.ExchangeResponse<_i21.ExchangeTransactionStatus>>); @override - _i6.Future<_i2.ExchangeResponse>> + _i7.Future<_i2.ExchangeResponse>> getAvailableFloatingRatePairs({bool? includePartners = false}) => (super.noSuchMethod( Invocation.method( @@ -1056,8 +1113,8 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { {#includePartners: includePartners}, ), returnValue: - _i6.Future<_i2.ExchangeResponse>>.value( - _FakeExchangeResponse_0>( + _i7.Future<_i2.ExchangeResponse>>.value( + _FakeExchangeResponse_0>( this, Invocation.method( #getAvailableFloatingRatePairs, @@ -1065,5 +1122,5 @@ class MockChangeNowAPI extends _i1.Mock implements _i11.ChangeNowAPI { {#includePartners: includePartners}, ), )), - ) as _i6.Future<_i2.ExchangeResponse>>); + ) as _i7.Future<_i2.ExchangeResponse>>); } diff --git a/test/screen_tests/lockscreen_view_screen_test.mocks.dart b/test/screen_tests/lockscreen_view_screen_test.mocks.dart index 09c20af69..439ecd5c9 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 83f17a9da..d624d4171 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 092a08b8d..70c08470b 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 8ac5c53a2..1f2176350 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 e11d6e753..7377d155e 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 3070b5d69..2b31cb96c 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 80b636a27..54eec30cf 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 208bdfab9..e92f4d289 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 f7f149b62..13a6568c8 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 2c8902e82..82f4bcd3e 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 4894da3fe..fc4171b63 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 55a581fbd..f990ec83a 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 1ddfc95bc..44dd68cee 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 dd8109ad4..a7764e149 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 f25778670..4c7dbfd7a 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 373541050..e736cfdd8 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 5a96f3a7b..be1b24bcb 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 031b57e12..7cf8968b1 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 8df9045fd..81980dca0 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 c8f0c873a..3055cf6c6 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 0f6a3d551..533578e6c 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 4656dacc4..f71a62d92 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 hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, diff --git a/test/widget_tests/managed_favorite_test.mocks.dart b/test/widget_tests/managed_favorite_test.mocks.dart index 378a2f4e7..f8bda0845 100644 --- a/test/widget_tests/managed_favorite_test.mocks.dart +++ b/test/widget_tests/managed_favorite_test.mocks.dart @@ -2411,6 +2411,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, diff --git a/test/widget_tests/node_options_sheet_test.mocks.dart b/test/widget_tests/node_options_sheet_test.mocks.dart index 862afbb16..84f013ddb 100644 --- a/test/widget_tests/node_options_sheet_test.mocks.dart +++ b/test/widget_tests/node_options_sheet_test.mocks.dart @@ -9,7 +9,7 @@ import 'dart:ui' 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/models/node_model.dart' as _i16; +import 'package:stackwallet/models/node_model.dart' as _i17; import 'package:stackwallet/services/coins/manager.dart' as _i6; import 'package:stackwallet/services/node_service.dart' as _i3; import 'package:stackwallet/services/wallets.dart' as _i8; @@ -20,6 +20,7 @@ import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i14; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' as _i7; import 'package:stackwallet/utilities/prefs.dart' as _i12; +import 'package:stackwallet/utilities/theme/color_theme.dart' as _i16; import 'package:tuple/tuple.dart' as _i10; // ignore_for_file: type=lint @@ -574,6 +575,61 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs { returnValueForMissingStub: null, ); @override + bool get enableSystemBrightness => (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) as bool); + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter( + #enableSystemBrightness, + enableSystemBrightness, + ), + returnValueForMissingStub: null, + ); + @override + _i16.ThemeType get theme => (super.noSuchMethod( + Invocation.getter(#theme), + returnValue: _i16.ThemeType.light, + ) as _i16.ThemeType); + @override + set theme(_i16.ThemeType? theme) => super.noSuchMethod( + Invocation.setter( + #theme, + theme, + ), + returnValueForMissingStub: null, + ); + @override + _i16.ThemeType get systemBrightnessLightTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightTheme), + returnValue: _i16.ThemeType.light, + ) as _i16.ThemeType); + @override + set systemBrightnessLightTheme(_i16.ThemeType? systemBrightnessLightTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessLightTheme, + systemBrightnessLightTheme, + ), + returnValueForMissingStub: null, + ); + @override + _i16.ThemeType get systemBrightnessDarkTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkTheme), + returnValue: _i16.ThemeType.light, + ) as _i16.ThemeType); + @override + set systemBrightnessDarkTheme(_i16.ThemeType? systemBrightnessDarkTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessDarkTheme, + systemBrightnessDarkTheme, + ), + returnValueForMissingStub: null, + ); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, @@ -673,15 +729,15 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { ), ) as _i7.SecureStorageInterface); @override - List<_i16.NodeModel> get primaryNodes => (super.noSuchMethod( + List<_i17.NodeModel> get primaryNodes => (super.noSuchMethod( Invocation.getter(#primaryNodes), - returnValue: <_i16.NodeModel>[], - ) as List<_i16.NodeModel>); + returnValue: <_i17.NodeModel>[], + ) as List<_i17.NodeModel>); @override - List<_i16.NodeModel> get nodes => (super.noSuchMethod( + List<_i17.NodeModel> get nodes => (super.noSuchMethod( Invocation.getter(#nodes), - returnValue: <_i16.NodeModel>[], - ) as List<_i16.NodeModel>); + returnValue: <_i17.NodeModel>[], + ) as List<_i17.NodeModel>); @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), @@ -699,7 +755,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { @override _i11.Future setPrimaryNodeFor({ required _i9.Coin? coin, - required _i16.NodeModel? node, + required _i17.NodeModel? node, bool? shouldNotifyListeners = false, }) => (super.noSuchMethod( @@ -716,40 +772,40 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { returnValueForMissingStub: _i11.Future.value(), ) as _i11.Future); @override - _i16.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) => + _i17.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) => (super.noSuchMethod(Invocation.method( #getPrimaryNodeFor, [], {#coin: coin}, - )) as _i16.NodeModel?); + )) as _i17.NodeModel?); @override - List<_i16.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod( + List<_i17.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod( Invocation.method( #getNodesFor, [coin], ), - returnValue: <_i16.NodeModel>[], - ) as List<_i16.NodeModel>); + returnValue: <_i17.NodeModel>[], + ) as List<_i17.NodeModel>); @override - _i16.NodeModel? getNodeById({required String? id}) => + _i17.NodeModel? getNodeById({required String? id}) => (super.noSuchMethod(Invocation.method( #getNodeById, [], {#id: id}, - )) as _i16.NodeModel?); + )) as _i17.NodeModel?); @override - List<_i16.NodeModel> failoverNodesFor({required _i9.Coin? coin}) => + List<_i17.NodeModel> failoverNodesFor({required _i9.Coin? coin}) => (super.noSuchMethod( Invocation.method( #failoverNodesFor, [], {#coin: coin}, ), - returnValue: <_i16.NodeModel>[], - ) as List<_i16.NodeModel>); + returnValue: <_i17.NodeModel>[], + ) as List<_i17.NodeModel>); @override _i11.Future add( - _i16.NodeModel? node, + _i17.NodeModel? node, String? password, bool? shouldNotifyListeners, ) => @@ -801,7 +857,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService { ) as _i11.Future); @override _i11.Future edit( - _i16.NodeModel? editedNode, + _i17.NodeModel? editedNode, String? password, bool? shouldNotifyListeners, ) => 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 dc9c9e2eb..84cfac4c8 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 @@ -2136,6 +2136,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, diff --git a/test/widget_tests/transaction_card_test.mocks.dart b/test/widget_tests/transaction_card_test.mocks.dart index 5eb14f172..51afbec22 100644 --- a/test/widget_tests/transaction_card_test.mocks.dart +++ b/test/widget_tests/transaction_card_test.mocks.dart @@ -22,8 +22,8 @@ import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as _i22; import 'package:stackwallet/services/coins/manager.dart' as _i6; import 'package:stackwallet/services/locale_service.dart' as _i24; import 'package:stackwallet/services/node_service.dart' as _i3; -import 'package:stackwallet/services/notes_service.dart' as _i28; -import 'package:stackwallet/services/price_service.dart' as _i27; +import 'package:stackwallet/services/notes_service.dart' as _i29; +import 'package:stackwallet/services/price_service.dart' as _i28; import 'package:stackwallet/services/transaction_notification_tracker.dart' as _i10; import 'package:stackwallet/services/wallets.dart' as _i16; @@ -32,6 +32,7 @@ import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i26; import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i17; import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i25; import 'package:stackwallet/utilities/prefs.dart' as _i19; +import 'package:stackwallet/utilities/theme/color_theme.dart' as _i27; import 'package:tuple/tuple.dart' as _i15; // ignore_for_file: type=lint @@ -555,6 +556,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, @@ -2339,6 +2345,61 @@ class MockPrefs extends _i1.Mock implements _i19.Prefs { returnValueForMissingStub: null, ); @override + bool get enableSystemBrightness => (super.noSuchMethod( + Invocation.getter(#enableSystemBrightness), + returnValue: false, + ) as bool); + @override + set enableSystemBrightness(bool? enableSystemBrightness) => + super.noSuchMethod( + Invocation.setter( + #enableSystemBrightness, + enableSystemBrightness, + ), + returnValueForMissingStub: null, + ); + @override + _i27.ThemeType get theme => (super.noSuchMethod( + Invocation.getter(#theme), + returnValue: _i27.ThemeType.light, + ) as _i27.ThemeType); + @override + set theme(_i27.ThemeType? theme) => super.noSuchMethod( + Invocation.setter( + #theme, + theme, + ), + returnValueForMissingStub: null, + ); + @override + _i27.ThemeType get systemBrightnessLightTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessLightTheme), + returnValue: _i27.ThemeType.light, + ) as _i27.ThemeType); + @override + set systemBrightnessLightTheme(_i27.ThemeType? systemBrightnessLightTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessLightTheme, + systemBrightnessLightTheme, + ), + returnValueForMissingStub: null, + ); + @override + _i27.ThemeType get systemBrightnessDarkTheme => (super.noSuchMethod( + Invocation.getter(#systemBrightnessDarkTheme), + returnValue: _i27.ThemeType.light, + ) as _i27.ThemeType); + @override + set systemBrightnessDarkTheme(_i27.ThemeType? systemBrightnessDarkTheme) => + super.noSuchMethod( + Invocation.setter( + #systemBrightnessDarkTheme, + systemBrightnessDarkTheme, + ), + returnValueForMissingStub: null, + ); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, @@ -2424,7 +2485,7 @@ class MockPrefs extends _i1.Mock implements _i19.Prefs { /// A class which mocks [PriceService]. /// /// See the documentation for Mockito's code generation for more information. -class MockPriceService extends _i1.Mock implements _i27.PriceService { +class MockPriceService extends _i1.Mock implements _i28.PriceService { MockPriceService() { _i1.throwOnMissingStub(this); } @@ -2532,7 +2593,7 @@ class MockPriceService extends _i1.Mock implements _i27.PriceService { /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i28.NotesService { +class MockNotesService extends _i1.Mock implements _i29.NotesService { MockNotesService() { _i1.throwOnMissingStub(this); } 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 90e17eb18..028cd047e 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 @@ -2348,6 +2348,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0, 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 b63f037fa..8b75cb42e 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 @@ -2348,6 +2348,11 @@ class MockManager extends _i1.Mock implements _i6.Manager { returnValue: false, ) as bool); @override + bool get hasWhirlpoolSupport => (super.noSuchMethod( + Invocation.getter(#hasWhirlpoolSupport), + returnValue: false, + ) as bool); + @override int get rescanOnOpenVersion => (super.noSuchMethod( Invocation.getter(#rescanOnOpenVersion), returnValue: 0,