update mocks and relevant tests that use the new Amount

This commit is contained in:
julian-CStack 2023-04-09 17:02:11 -06:00
parent 8ed456acda
commit a5e7c32c23
41 changed files with 8409 additions and 7180 deletions

View file

@ -1,67 +1,7 @@
import 'package:decimal/decimal.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/format.dart';
void main() {
group("satoshisToAmount", () {
test("12345", () {
expect(Format.satoshisToAmount(12345, coin: Coin.bitcoin),
Decimal.parse("0.00012345"));
});
test("100012345", () {
expect(Format.satoshisToAmount(100012345, coin: Coin.bitcoin),
Decimal.parse("1.00012345"));
});
test("0", () {
expect(Format.satoshisToAmount(0, coin: Coin.bitcoin), Decimal.zero);
});
test("1000000000", () {
expect(Format.satoshisToAmount(1000000000, coin: Coin.bitcoin),
Decimal.parse("10"));
});
});
group("satoshiAmountToPrettyString", () {
const locale = "en_US";
test("12345", () {
expect(Format.satoshiAmountToPrettyString(12345, locale, Coin.bitcoin),
"0.00012345");
});
test("100012345", () {
expect(
Format.satoshiAmountToPrettyString(100012345, locale, Coin.bitcoin),
"1.00012345");
});
test("123450000", () {
expect(
Format.satoshiAmountToPrettyString(123450000, locale, Coin.bitcoin),
"1.23450000");
});
test("1230045000", () {
expect(
Format.satoshiAmountToPrettyString(1230045000, locale, Coin.bitcoin),
"12.30045000");
});
test("1000000000", () {
expect(
Format.satoshiAmountToPrettyString(1000000000, locale, Coin.bitcoin),
"10.00000000");
});
test("0", () {
expect(Format.satoshiAmountToPrettyString(0, locale, Coin.bitcoin),
"0.00000000");
});
});
group("extractDateFrom", () {
test("1614578400", () {
expect(Format.extractDateFrom(1614578400, localized: false),

File diff suppressed because it is too large Load diff

View file

@ -3,20 +3,21 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'dart:async' as _i9;
import 'dart:ui' as _i11;
import 'package:barcode_scan2/barcode_scan2.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i6;
import 'package:stackwallet/models/contact.dart' as _i3;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i14;
import 'package:stackwallet/models/models.dart' as _i5;
import 'package:stackwallet/services/address_book_service.dart' as _i9;
import 'package:stackwallet/services/address_book_service.dart' as _i10;
import 'package:stackwallet/services/coins/coin_service.dart' as _i4;
import 'package:stackwallet/services/coins/manager.dart' as _i11;
import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i12;
import 'package:stackwallet/services/coins/manager.dart' as _i12;
import 'package:stackwallet/utilities/amount/amount.dart' as _i7;
import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i8;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i13;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -80,17 +81,27 @@ class _FakeBalance_4 extends _i1.SmartFake implements _i6.Balance {
);
}
class _FakeAmount_5 extends _i1.SmartFake implements _i7.Amount {
_FakeAmount_5(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [BarcodeScannerWrapper].
///
/// See the documentation for Mockito's code generation for more information.
class MockBarcodeScannerWrapper extends _i1.Mock
implements _i7.BarcodeScannerWrapper {
implements _i8.BarcodeScannerWrapper {
MockBarcodeScannerWrapper() {
_i1.throwOnMissingStub(this);
}
@override
_i8.Future<_i2.ScanResult> scan(
_i9.Future<_i2.ScanResult> scan(
{_i2.ScanOptions? options = const _i2.ScanOptions()}) =>
(super.noSuchMethod(
Invocation.method(
@ -98,7 +109,7 @@ class MockBarcodeScannerWrapper extends _i1.Mock
[],
{#options: options},
),
returnValue: _i8.Future<_i2.ScanResult>.value(_FakeScanResult_0(
returnValue: _i9.Future<_i2.ScanResult>.value(_FakeScanResult_0(
this,
Invocation.method(
#scan,
@ -106,24 +117,24 @@ class MockBarcodeScannerWrapper extends _i1.Mock
{#options: options},
),
)),
) as _i8.Future<_i2.ScanResult>);
) as _i9.Future<_i2.ScanResult>);
}
/// A class which mocks [AddressBookService].
///
/// See the documentation for Mockito's code generation for more information.
class MockAddressBookService extends _i1.Mock
implements _i9.AddressBookService {
implements _i10.AddressBookService {
@override
List<_i3.Contact> get contacts => (super.noSuchMethod(
Invocation.getter(#contacts),
returnValue: <_i3.Contact>[],
) as List<_i3.Contact>);
@override
_i8.Future<List<_i3.Contact>> get addressBookEntries => (super.noSuchMethod(
_i9.Future<List<_i3.Contact>> get addressBookEntries => (super.noSuchMethod(
Invocation.getter(#addressBookEntries),
returnValue: _i8.Future<List<_i3.Contact>>.value(<_i3.Contact>[]),
) as _i8.Future<List<_i3.Contact>>);
returnValue: _i9.Future<List<_i3.Contact>>.value(<_i3.Contact>[]),
) as _i9.Future<List<_i3.Contact>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
@ -144,13 +155,13 @@ class MockAddressBookService extends _i1.Mock
),
) as _i3.Contact);
@override
_i8.Future<List<_i3.Contact>> search(String? text) => (super.noSuchMethod(
_i9.Future<List<_i3.Contact>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i8.Future<List<_i3.Contact>>.value(<_i3.Contact>[]),
) as _i8.Future<List<_i3.Contact>>);
returnValue: _i9.Future<List<_i3.Contact>>.value(<_i3.Contact>[]),
) as _i9.Future<List<_i3.Contact>>);
@override
bool matches(
String? term,
@ -167,33 +178,33 @@ class MockAddressBookService extends _i1.Mock
returnValue: false,
) as bool);
@override
_i8.Future<bool> addContact(_i3.Contact? contact) => (super.noSuchMethod(
_i9.Future<bool> addContact(_i3.Contact? contact) => (super.noSuchMethod(
Invocation.method(
#addContact,
[contact],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<bool> editContact(_i3.Contact? editedContact) =>
_i9.Future<bool> editContact(_i3.Contact? editedContact) =>
(super.noSuchMethod(
Invocation.method(
#editContact,
[editedContact],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> removeContact(String? id) => (super.noSuchMethod(
_i9.Future<void> removeContact(String? id) => (super.noSuchMethod(
Invocation.method(
#removeContact,
[id],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -201,7 +212,7 @@ class MockAddressBookService extends _i1.Mock
returnValueForMissingStub: null,
);
@override
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -229,7 +240,7 @@ class MockAddressBookService extends _i1.Mock
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i11.Manager {
class MockManager extends _i1.Mock implements _i12.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -257,10 +268,10 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: false,
) as bool);
@override
_i12.Coin get coin => (super.noSuchMethod(
_i13.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i12.Coin.bitcoin,
) as _i12.Coin);
returnValue: _i13.Coin.bitcoin,
) as _i13.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -293,23 +304,23 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<_i5.FeeObject> get fees => (super.noSuchMethod(
_i9.Future<_i5.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i8.Future<_i5.FeeObject>.value(_FakeFeeObject_3(
returnValue: _i9.Future<_i5.FeeObject>.value(_FakeFeeObject_3(
this,
Invocation.getter(#fees),
)),
) as _i8.Future<_i5.FeeObject>);
) as _i9.Future<_i5.FeeObject>);
@override
_i8.Future<int> get maxFee => (super.noSuchMethod(
_i9.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<int>.value(0),
) as _i9.Future<int>);
@override
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i9.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i6.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -319,16 +330,16 @@ class MockManager extends _i1.Mock implements _i11.Manager {
),
) as _i6.Balance);
@override
_i8.Future<List<_i13.Transaction>> get transactions => (super.noSuchMethod(
_i9.Future<List<_i14.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i8.Future<List<_i13.Transaction>>.value(<_i13.Transaction>[]),
) as _i8.Future<List<_i13.Transaction>>);
_i9.Future<List<_i14.Transaction>>.value(<_i14.Transaction>[]),
) as _i9.Future<List<_i14.Transaction>>);
@override
_i8.Future<List<_i13.UTXO>> get utxos => (super.noSuchMethod(
_i9.Future<List<_i14.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i8.Future<List<_i13.UTXO>>.value(<_i13.UTXO>[]),
) as _i8.Future<List<_i13.UTXO>>);
returnValue: _i9.Future<List<_i14.UTXO>>.value(<_i14.UTXO>[]),
) as _i9.Future<List<_i14.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -348,15 +359,15 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: '',
) as String);
@override
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i9.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
returnValue: _i9.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>);
@override
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i9.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -393,19 +404,29 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i9.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i9.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -415,9 +436,9 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<Map<String, dynamic>> prepareSend({
_i9.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i7.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -426,32 +447,32 @@ class MockManager extends _i1.Mock implements _i11.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>);
@override
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i9.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i8.Future<void> refresh() => (super.noSuchMethod(
_i9.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -461,33 +482,33 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: false,
) as bool);
@override
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i9.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> initializeNew() => (super.noSuchMethod(
_i9.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
_i9.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> recoverFromMnemonic({
_i9.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -506,20 +527,20 @@ class MockManager extends _i1.Mock implements _i11.Manager {
#height: height,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i9.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> fullRescan(
_i9.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -531,43 +552,52 @@ class MockManager extends _i1.Mock implements _i11.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<int> estimateFeeFor(
int? satoshiAmount,
_i9.Future<_i7.Amount> estimateFeeFor(
_i7.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<_i7.Amount>.value(_FakeAmount_5(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i9.Future<_i7.Amount>);
@override
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i9.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i9.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -575,7 +605,7 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,20 +3,21 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i8;
import 'dart:async' as _i8;
import 'dart:ui' as _i9;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/contact.dart' as _i2;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i12;
import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/services/address_book_service.dart' as _i6;
import 'package:stackwallet/services/address_book_service.dart' as _i7;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i9;
import 'package:stackwallet/services/locale_service.dart' as _i13;
import 'package:stackwallet/services/notes_service.dart' as _i12;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10;
import 'package:stackwallet/services/coins/manager.dart' as _i10;
import 'package:stackwallet/services/locale_service.dart' as _i14;
import 'package:stackwallet/services/notes_service.dart' as _i13;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i11;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -70,21 +71,31 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance {
);
}
class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount {
_FakeAmount_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [AddressBookService].
///
/// See the documentation for Mockito's code generation for more information.
class MockAddressBookService extends _i1.Mock
implements _i6.AddressBookService {
implements _i7.AddressBookService {
@override
List<_i2.Contact> get contacts => (super.noSuchMethod(
Invocation.getter(#contacts),
returnValue: <_i2.Contact>[],
) as List<_i2.Contact>);
@override
_i7.Future<List<_i2.Contact>> get addressBookEntries => (super.noSuchMethod(
_i8.Future<List<_i2.Contact>> get addressBookEntries => (super.noSuchMethod(
Invocation.getter(#addressBookEntries),
returnValue: _i7.Future<List<_i2.Contact>>.value(<_i2.Contact>[]),
) as _i7.Future<List<_i2.Contact>>);
returnValue: _i8.Future<List<_i2.Contact>>.value(<_i2.Contact>[]),
) as _i8.Future<List<_i2.Contact>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
@ -105,13 +116,13 @@ class MockAddressBookService extends _i1.Mock
),
) as _i2.Contact);
@override
_i7.Future<List<_i2.Contact>> search(String? text) => (super.noSuchMethod(
_i8.Future<List<_i2.Contact>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i7.Future<List<_i2.Contact>>.value(<_i2.Contact>[]),
) as _i7.Future<List<_i2.Contact>>);
returnValue: _i8.Future<List<_i2.Contact>>.value(<_i2.Contact>[]),
) as _i8.Future<List<_i2.Contact>>);
@override
bool matches(
String? term,
@ -128,33 +139,33 @@ class MockAddressBookService extends _i1.Mock
returnValue: false,
) as bool);
@override
_i7.Future<bool> addContact(_i2.Contact? contact) => (super.noSuchMethod(
_i8.Future<bool> addContact(_i2.Contact? contact) => (super.noSuchMethod(
Invocation.method(
#addContact,
[contact],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<bool> editContact(_i2.Contact? editedContact) =>
_i8.Future<bool> editContact(_i2.Contact? editedContact) =>
(super.noSuchMethod(
Invocation.method(
#editContact,
[editedContact],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> removeContact(String? id) => (super.noSuchMethod(
_i8.Future<void> removeContact(String? id) => (super.noSuchMethod(
Invocation.method(
#removeContact,
[id],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -162,7 +173,7 @@ class MockAddressBookService extends _i1.Mock
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -190,7 +201,7 @@ class MockAddressBookService extends _i1.Mock
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i9.Manager {
class MockManager extends _i1.Mock implements _i10.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -218,10 +229,10 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i10.Coin get coin => (super.noSuchMethod(
_i11.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i10.Coin.bitcoin,
) as _i10.Coin);
returnValue: _i11.Coin.bitcoin,
) as _i11.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -254,23 +265,23 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i4.FeeObject>);
) as _i8.Future<_i4.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -280,16 +291,16 @@ class MockManager extends _i1.Mock implements _i9.Manager {
),
) as _i5.Balance);
@override
_i7.Future<List<_i11.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i12.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i11.Transaction>>.value(<_i11.Transaction>[]),
) as _i7.Future<List<_i11.Transaction>>);
_i8.Future<List<_i12.Transaction>>.value(<_i12.Transaction>[]),
) as _i8.Future<List<_i12.Transaction>>);
@override
_i7.Future<List<_i11.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i12.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i11.UTXO>>.value(<_i11.UTXO>[]),
) as _i7.Future<List<_i11.UTXO>>);
returnValue: _i8.Future<List<_i12.UTXO>>.value(<_i12.UTXO>[]),
) as _i8.Future<List<_i12.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -309,15 +320,15 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -354,19 +365,29 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -376,9 +397,9 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i6.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -387,32 +408,32 @@ class MockManager extends _i1.Mock implements _i9.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -422,33 +443,33 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -467,20 +488,20 @@ class MockManager extends _i1.Mock implements _i9.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -492,43 +513,52 @@ class MockManager extends _i1.Mock implements _i9.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i6.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -536,7 +566,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -556,7 +586,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
/// A class which mocks [NotesService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNotesService extends _i1.Mock implements _i12.NotesService {
class MockNotesService extends _i1.Mock implements _i13.NotesService {
@override
String get walletId => (super.noSuchMethod(
Invocation.getter(#walletId),
@ -568,34 +598,34 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService {
returnValue: <String, String>{},
) as Map<String, String>);
@override
_i7.Future<Map<String, String>> get notes => (super.noSuchMethod(
_i8.Future<Map<String, String>> get notes => (super.noSuchMethod(
Invocation.getter(#notes),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
_i8.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
_i7.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
_i8.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#getNoteFor,
[],
{#txid: txid},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> editOrAddNote({
_i8.Future<void> editOrAddNote({
required String? txid,
required String? note,
}) =>
@ -608,21 +638,21 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService {
#note: note,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
_i8.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#deleteNote,
[],
{#txid: txid},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -630,7 +660,7 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -658,7 +688,7 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService {
/// A class which mocks [LocaleService].
///
/// See the documentation for Mockito's code generation for more information.
class MockLocaleService extends _i1.Mock implements _i13.LocaleService {
class MockLocaleService extends _i1.Mock implements _i14.LocaleService {
@override
String get locale => (super.noSuchMethod(
Invocation.getter(#locale),
@ -670,17 +700,17 @@ class MockLocaleService extends _i1.Mock implements _i13.LocaleService {
returnValue: false,
) as bool);
@override
_i7.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
_i8.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
Invocation.method(
#loadLocale,
[],
{#notify: notify},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -688,7 +718,7 @@ class MockLocaleService extends _i1.Mock implements _i13.LocaleService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,18 +3,19 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i8;
import 'dart:async' as _i8;
import 'dart:ui' as _i9;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/contact.dart' as _i2;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i12;
import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/services/address_book_service.dart' as _i6;
import 'package:stackwallet/services/address_book_service.dart' as _i7;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i9;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10;
import 'package:stackwallet/services/coins/manager.dart' as _i10;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i11;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -68,21 +69,31 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance {
);
}
class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount {
_FakeAmount_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [AddressBookService].
///
/// See the documentation for Mockito's code generation for more information.
class MockAddressBookService extends _i1.Mock
implements _i6.AddressBookService {
implements _i7.AddressBookService {
@override
List<_i2.Contact> get contacts => (super.noSuchMethod(
Invocation.getter(#contacts),
returnValue: <_i2.Contact>[],
) as List<_i2.Contact>);
@override
_i7.Future<List<_i2.Contact>> get addressBookEntries => (super.noSuchMethod(
_i8.Future<List<_i2.Contact>> get addressBookEntries => (super.noSuchMethod(
Invocation.getter(#addressBookEntries),
returnValue: _i7.Future<List<_i2.Contact>>.value(<_i2.Contact>[]),
) as _i7.Future<List<_i2.Contact>>);
returnValue: _i8.Future<List<_i2.Contact>>.value(<_i2.Contact>[]),
) as _i8.Future<List<_i2.Contact>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
@ -103,13 +114,13 @@ class MockAddressBookService extends _i1.Mock
),
) as _i2.Contact);
@override
_i7.Future<List<_i2.Contact>> search(String? text) => (super.noSuchMethod(
_i8.Future<List<_i2.Contact>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i7.Future<List<_i2.Contact>>.value(<_i2.Contact>[]),
) as _i7.Future<List<_i2.Contact>>);
returnValue: _i8.Future<List<_i2.Contact>>.value(<_i2.Contact>[]),
) as _i8.Future<List<_i2.Contact>>);
@override
bool matches(
String? term,
@ -126,33 +137,33 @@ class MockAddressBookService extends _i1.Mock
returnValue: false,
) as bool);
@override
_i7.Future<bool> addContact(_i2.Contact? contact) => (super.noSuchMethod(
_i8.Future<bool> addContact(_i2.Contact? contact) => (super.noSuchMethod(
Invocation.method(
#addContact,
[contact],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<bool> editContact(_i2.Contact? editedContact) =>
_i8.Future<bool> editContact(_i2.Contact? editedContact) =>
(super.noSuchMethod(
Invocation.method(
#editContact,
[editedContact],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> removeContact(String? id) => (super.noSuchMethod(
_i8.Future<void> removeContact(String? id) => (super.noSuchMethod(
Invocation.method(
#removeContact,
[id],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -160,7 +171,7 @@ class MockAddressBookService extends _i1.Mock
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -188,7 +199,7 @@ class MockAddressBookService extends _i1.Mock
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i9.Manager {
class MockManager extends _i1.Mock implements _i10.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -216,10 +227,10 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i10.Coin get coin => (super.noSuchMethod(
_i11.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i10.Coin.bitcoin,
) as _i10.Coin);
returnValue: _i11.Coin.bitcoin,
) as _i11.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -252,23 +263,23 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i4.FeeObject>);
) as _i8.Future<_i4.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -278,16 +289,16 @@ class MockManager extends _i1.Mock implements _i9.Manager {
),
) as _i5.Balance);
@override
_i7.Future<List<_i11.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i12.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i11.Transaction>>.value(<_i11.Transaction>[]),
) as _i7.Future<List<_i11.Transaction>>);
_i8.Future<List<_i12.Transaction>>.value(<_i12.Transaction>[]),
) as _i8.Future<List<_i12.Transaction>>);
@override
_i7.Future<List<_i11.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i12.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i11.UTXO>>.value(<_i11.UTXO>[]),
) as _i7.Future<List<_i11.UTXO>>);
returnValue: _i8.Future<List<_i12.UTXO>>.value(<_i12.UTXO>[]),
) as _i8.Future<List<_i12.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -307,15 +318,15 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -352,19 +363,29 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -374,9 +395,9 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i6.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -385,32 +406,32 @@ class MockManager extends _i1.Mock implements _i9.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -420,33 +441,33 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -465,20 +486,20 @@ class MockManager extends _i1.Mock implements _i9.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -490,43 +511,52 @@ class MockManager extends _i1.Mock implements _i9.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i6.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -534,7 +564,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,19 +3,20 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i14;
import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/models/node_model.dart' as _i11;
import 'package:stackwallet/models/node_model.dart' as _i12;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i12;
import 'package:stackwallet/services/node_service.dart' as _i10;
import 'package:stackwallet/services/wallets_service.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
import 'package:stackwallet/services/coins/manager.dart' as _i13;
import 'package:stackwallet/services/node_service.dart' as _i11;
import 'package:stackwallet/services/wallets_service.dart' as _i7;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
as _i2;
@ -72,24 +73,34 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance {
);
}
class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount {
_FakeAmount_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
class MockWalletsService extends _i1.Mock implements _i7.WalletsService {
@override
_i7.Future<Map<String, _i6.WalletInfo>> get walletNames =>
_i8.Future<Map<String, _i7.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i7.Future<Map<String, _i6.WalletInfo>>.value(
<String, _i6.WalletInfo>{}),
) as _i7.Future<Map<String, _i6.WalletInfo>>);
returnValue: _i8.Future<Map<String, _i7.WalletInfo>>.value(
<String, _i7.WalletInfo>{}),
) as _i8.Future<Map<String, _i7.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<bool> renameWallet({
_i8.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -104,21 +115,21 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
Map<String, _i6.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i7.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i6.WalletInfo>{},
) as Map<String, _i6.WalletInfo>);
returnValue: <String, _i7.WalletInfo>{},
) as Map<String, _i7.WalletInfo>);
@override
_i7.Future<void> addExistingStackWallet({
_i8.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i8.Coin? coin,
required _i9.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -132,13 +143,13 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<String?> addNewWallet({
_i8.Future<String?> addNewWallet({
required String? name,
required _i8.Coin? coin,
required _i9.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -151,46 +162,46 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
_i7.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i8.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i8.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i8.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i8.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> moveFavorite({
_i8.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -203,48 +214,48 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i8.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i8.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
_i7.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i8.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> setMnemonicVerified({required String? walletId}) =>
_i8.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> deleteWallet(
_i8.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -256,20 +267,20 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i8.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -277,7 +288,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -305,7 +316,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
/// A class which mocks [NodeService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNodeService extends _i1.Mock implements _i10.NodeService {
class MockNodeService extends _i1.Mock implements _i11.NodeService {
@override
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
Invocation.getter(#secureStorageInterface),
@ -315,33 +326,33 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
),
) as _i2.SecureStorageInterface);
@override
List<_i11.NodeModel> get primaryNodes => (super.noSuchMethod(
List<_i12.NodeModel> get primaryNodes => (super.noSuchMethod(
Invocation.getter(#primaryNodes),
returnValue: <_i11.NodeModel>[],
) as List<_i11.NodeModel>);
returnValue: <_i12.NodeModel>[],
) as List<_i12.NodeModel>);
@override
List<_i11.NodeModel> get nodes => (super.noSuchMethod(
List<_i12.NodeModel> get nodes => (super.noSuchMethod(
Invocation.getter(#nodes),
returnValue: <_i11.NodeModel>[],
) as List<_i11.NodeModel>);
returnValue: <_i12.NodeModel>[],
) as List<_i12.NodeModel>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateDefaults() => (super.noSuchMethod(
_i8.Future<void> updateDefaults() => (super.noSuchMethod(
Invocation.method(
#updateDefaults,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> setPrimaryNodeFor({
required _i8.Coin? coin,
required _i11.NodeModel? node,
_i8.Future<void> setPrimaryNodeFor({
required _i9.Coin? coin,
required _i12.NodeModel? node,
bool? shouldNotifyListeners = false,
}) =>
(super.noSuchMethod(
@ -354,44 +365,44 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i11.NodeModel? getPrimaryNodeFor({required _i8.Coin? coin}) =>
_i12.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) =>
(super.noSuchMethod(Invocation.method(
#getPrimaryNodeFor,
[],
{#coin: coin},
)) as _i11.NodeModel?);
)) as _i12.NodeModel?);
@override
List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod(
List<_i12.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod(
Invocation.method(
#getNodesFor,
[coin],
),
returnValue: <_i11.NodeModel>[],
) as List<_i11.NodeModel>);
returnValue: <_i12.NodeModel>[],
) as List<_i12.NodeModel>);
@override
_i11.NodeModel? getNodeById({required String? id}) =>
_i12.NodeModel? getNodeById({required String? id}) =>
(super.noSuchMethod(Invocation.method(
#getNodeById,
[],
{#id: id},
)) as _i11.NodeModel?);
)) as _i12.NodeModel?);
@override
List<_i11.NodeModel> failoverNodesFor({required _i8.Coin? coin}) =>
List<_i12.NodeModel> failoverNodesFor({required _i9.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#failoverNodesFor,
[],
{#coin: coin},
),
returnValue: <_i11.NodeModel>[],
) as List<_i11.NodeModel>);
returnValue: <_i12.NodeModel>[],
) as List<_i12.NodeModel>);
@override
_i7.Future<void> add(
_i11.NodeModel? node,
_i8.Future<void> add(
_i12.NodeModel? node,
String? password,
bool? shouldNotifyListeners,
) =>
@ -404,11 +415,11 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> delete(
_i8.Future<void> delete(
String? id,
bool? shouldNotifyListeners,
) =>
@ -420,11 +431,11 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> setEnabledState(
_i8.Future<void> setEnabledState(
String? id,
bool? enabled,
bool? shouldNotifyListeners,
@ -438,12 +449,12 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> edit(
_i11.NodeModel? editedNode,
_i8.Future<void> edit(
_i12.NodeModel? editedNode,
String? password,
bool? shouldNotifyListeners,
) =>
@ -456,20 +467,20 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> updateCommunityNodes() => (super.noSuchMethod(
_i8.Future<void> updateCommunityNodes() => (super.noSuchMethod(
Invocation.method(
#updateCommunityNodes,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -477,7 +488,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -505,7 +516,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i12.Manager {
class MockManager extends _i1.Mock implements _i13.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -533,10 +544,10 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: false,
) as bool);
@override
_i8.Coin get coin => (super.noSuchMethod(
_i9.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i8.Coin.bitcoin,
) as _i8.Coin);
returnValue: _i9.Coin.bitcoin,
) as _i9.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -569,23 +580,23 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i4.FeeObject>);
) as _i8.Future<_i4.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -595,16 +606,16 @@ class MockManager extends _i1.Mock implements _i12.Manager {
),
) as _i5.Balance);
@override
_i7.Future<List<_i13.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i14.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i13.Transaction>>.value(<_i13.Transaction>[]),
) as _i7.Future<List<_i13.Transaction>>);
_i8.Future<List<_i14.Transaction>>.value(<_i14.Transaction>[]),
) as _i8.Future<List<_i14.Transaction>>);
@override
_i7.Future<List<_i13.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i14.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i13.UTXO>>.value(<_i13.UTXO>[]),
) as _i7.Future<List<_i13.UTXO>>);
returnValue: _i8.Future<List<_i14.UTXO>>.value(<_i14.UTXO>[]),
) as _i8.Future<List<_i14.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -624,15 +635,15 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -669,19 +680,29 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -691,9 +712,9 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i6.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -702,32 +723,32 @@ class MockManager extends _i1.Mock implements _i12.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -737,33 +758,33 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -782,20 +803,20 @@ class MockManager extends _i1.Mock implements _i12.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -807,43 +828,52 @@ class MockManager extends _i1.Mock implements _i12.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i6.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -851,7 +881,7 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,19 +3,20 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i6;
import 'dart:ui' as _i8;
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i9;
import 'package:stackwallet/services/locale_service.dart' as _i12;
import 'package:stackwallet/services/notes_service.dart' as _i11;
import 'package:stackwallet/services/wallets_service.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
import 'package:stackwallet/services/coins/manager.dart' as _i10;
import 'package:stackwallet/services/locale_service.dart' as _i13;
import 'package:stackwallet/services/notes_service.dart' as _i12;
import 'package:stackwallet/services/wallets_service.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -59,24 +60,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
@override
_i6.Future<Map<String, _i5.WalletInfo>> get walletNames =>
_i7.Future<Map<String, _i6.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i6.Future<Map<String, _i5.WalletInfo>>.value(
<String, _i5.WalletInfo>{}),
) as _i6.Future<Map<String, _i5.WalletInfo>>);
returnValue: _i7.Future<Map<String, _i6.WalletInfo>>.value(
<String, _i6.WalletInfo>{}),
) as _i7.Future<Map<String, _i6.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<bool> renameWallet({
_i7.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -91,21 +102,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
Map<String, _i5.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i6.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i5.WalletInfo>{},
) as Map<String, _i5.WalletInfo>);
returnValue: <String, _i6.WalletInfo>{},
) as Map<String, _i6.WalletInfo>);
@override
_i6.Future<void> addExistingStackWallet({
_i7.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -119,13 +130,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<String?> addNewWallet({
_i7.Future<String?> addNewWallet({
required String? name,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -138,46 +149,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i7.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i7.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> moveFavorite({
_i7.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -190,48 +201,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i7.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i7.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i7.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> setMnemonicVerified({required String? walletId}) =>
_i7.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> deleteWallet(
_i7.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -243,20 +254,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i7.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -264,7 +275,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -292,7 +303,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i9.Manager {
class MockManager extends _i1.Mock implements _i10.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -320,10 +331,10 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i7.Coin get coin => (super.noSuchMethod(
_i8.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
returnValue: _i8.Coin.bitcoin,
) as _i8.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -356,23 +367,23 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i6.Future<_i3.FeeObject>);
) as _i7.Future<_i3.FeeObject>);
@override
_i6.Future<int> get maxFee => (super.noSuchMethod(
_i7.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -382,16 +393,16 @@ class MockManager extends _i1.Mock implements _i9.Manager {
),
) as _i4.Balance);
@override
_i6.Future<List<_i10.Transaction>> get transactions => (super.noSuchMethod(
_i7.Future<List<_i11.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i6.Future<List<_i10.Transaction>>.value(<_i10.Transaction>[]),
) as _i6.Future<List<_i10.Transaction>>);
_i7.Future<List<_i11.Transaction>>.value(<_i11.Transaction>[]),
) as _i7.Future<List<_i11.Transaction>>);
@override
_i6.Future<List<_i10.UTXO>> get utxos => (super.noSuchMethod(
_i7.Future<List<_i11.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i6.Future<List<_i10.UTXO>>.value(<_i10.UTXO>[]),
) as _i6.Future<List<_i10.UTXO>>);
returnValue: _i7.Future<List<_i11.UTXO>>.value(<_i11.UTXO>[]),
) as _i7.Future<List<_i11.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -411,15 +422,15 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: '',
) as String);
@override
_i6.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -456,19 +467,29 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i7.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -478,9 +499,9 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<Map<String, dynamic>> prepareSend({
_i7.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -489,32 +510,32 @@ class MockManager extends _i1.Mock implements _i9.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
@override
_i6.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i6.Future<void> refresh() => (super.noSuchMethod(
_i7.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -524,33 +545,33 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i6.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> initializeNew() => (super.noSuchMethod(
_i7.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> initializeExisting() => (super.noSuchMethod(
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> recoverFromMnemonic({
_i7.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -569,20 +590,20 @@ class MockManager extends _i1.Mock implements _i9.Manager {
#height: height,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> fullRescan(
_i7.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -594,43 +615,52 @@ class MockManager extends _i1.Mock implements _i9.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> estimateFeeFor(
int? satoshiAmount,
_i7.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i7.Future<_i5.Amount>);
@override
_i6.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -638,7 +668,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -658,7 +688,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
/// A class which mocks [NotesService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNotesService extends _i1.Mock implements _i11.NotesService {
class MockNotesService extends _i1.Mock implements _i12.NotesService {
@override
String get walletId => (super.noSuchMethod(
Invocation.getter(#walletId),
@ -670,34 +700,34 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
returnValue: <String, String>{},
) as Map<String, String>);
@override
_i6.Future<Map<String, String>> get notes => (super.noSuchMethod(
_i7.Future<Map<String, String>> get notes => (super.noSuchMethod(
Invocation.getter(#notes),
returnValue: _i6.Future<Map<String, String>>.value(<String, String>{}),
) as _i6.Future<Map<String, String>>);
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
_i7.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i6.Future<Map<String, String>>.value(<String, String>{}),
) as _i6.Future<Map<String, String>>);
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
@override
_i6.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
_i7.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#getNoteFor,
[],
{#txid: txid},
),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i6.Future<void> editOrAddNote({
_i7.Future<void> editOrAddNote({
required String? txid,
required String? note,
}) =>
@ -710,21 +740,21 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
#note: note,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
_i7.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#deleteNote,
[],
{#txid: txid},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -732,7 +762,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -760,7 +790,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
/// A class which mocks [LocaleService].
///
/// See the documentation for Mockito's code generation for more information.
class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
class MockLocaleService extends _i1.Mock implements _i13.LocaleService {
@override
String get locale => (super.noSuchMethod(
Invocation.getter(#locale),
@ -772,17 +802,17 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
returnValue: false,
) as bool);
@override
_i6.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
_i7.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
Invocation.method(
#loadLocale,
[],
{#notify: notify},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -790,7 +820,7 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,19 +3,20 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i6;
import 'dart:ui' as _i8;
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i9;
import 'package:stackwallet/services/locale_service.dart' as _i12;
import 'package:stackwallet/services/notes_service.dart' as _i11;
import 'package:stackwallet/services/wallets_service.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
import 'package:stackwallet/services/coins/manager.dart' as _i10;
import 'package:stackwallet/services/locale_service.dart' as _i13;
import 'package:stackwallet/services/notes_service.dart' as _i12;
import 'package:stackwallet/services/wallets_service.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -59,24 +60,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
@override
_i6.Future<Map<String, _i5.WalletInfo>> get walletNames =>
_i7.Future<Map<String, _i6.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i6.Future<Map<String, _i5.WalletInfo>>.value(
<String, _i5.WalletInfo>{}),
) as _i6.Future<Map<String, _i5.WalletInfo>>);
returnValue: _i7.Future<Map<String, _i6.WalletInfo>>.value(
<String, _i6.WalletInfo>{}),
) as _i7.Future<Map<String, _i6.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<bool> renameWallet({
_i7.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -91,21 +102,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
Map<String, _i5.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i6.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i5.WalletInfo>{},
) as Map<String, _i5.WalletInfo>);
returnValue: <String, _i6.WalletInfo>{},
) as Map<String, _i6.WalletInfo>);
@override
_i6.Future<void> addExistingStackWallet({
_i7.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -119,13 +130,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<String?> addNewWallet({
_i7.Future<String?> addNewWallet({
required String? name,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -138,46 +149,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i7.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i7.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> moveFavorite({
_i7.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -190,48 +201,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i7.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i7.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i7.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> setMnemonicVerified({required String? walletId}) =>
_i7.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> deleteWallet(
_i7.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -243,20 +254,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i7.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -264,7 +275,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -292,7 +303,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i9.Manager {
class MockManager extends _i1.Mock implements _i10.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -320,10 +331,10 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i7.Coin get coin => (super.noSuchMethod(
_i8.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
returnValue: _i8.Coin.bitcoin,
) as _i8.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -356,23 +367,23 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i6.Future<_i3.FeeObject>);
) as _i7.Future<_i3.FeeObject>);
@override
_i6.Future<int> get maxFee => (super.noSuchMethod(
_i7.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -382,16 +393,16 @@ class MockManager extends _i1.Mock implements _i9.Manager {
),
) as _i4.Balance);
@override
_i6.Future<List<_i10.Transaction>> get transactions => (super.noSuchMethod(
_i7.Future<List<_i11.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i6.Future<List<_i10.Transaction>>.value(<_i10.Transaction>[]),
) as _i6.Future<List<_i10.Transaction>>);
_i7.Future<List<_i11.Transaction>>.value(<_i11.Transaction>[]),
) as _i7.Future<List<_i11.Transaction>>);
@override
_i6.Future<List<_i10.UTXO>> get utxos => (super.noSuchMethod(
_i7.Future<List<_i11.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i6.Future<List<_i10.UTXO>>.value(<_i10.UTXO>[]),
) as _i6.Future<List<_i10.UTXO>>);
returnValue: _i7.Future<List<_i11.UTXO>>.value(<_i11.UTXO>[]),
) as _i7.Future<List<_i11.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -411,15 +422,15 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: '',
) as String);
@override
_i6.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -456,19 +467,29 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i7.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -478,9 +499,9 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<Map<String, dynamic>> prepareSend({
_i7.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -489,32 +510,32 @@ class MockManager extends _i1.Mock implements _i9.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
@override
_i6.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i6.Future<void> refresh() => (super.noSuchMethod(
_i7.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -524,33 +545,33 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i6.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> initializeNew() => (super.noSuchMethod(
_i7.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> initializeExisting() => (super.noSuchMethod(
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> recoverFromMnemonic({
_i7.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -569,20 +590,20 @@ class MockManager extends _i1.Mock implements _i9.Manager {
#height: height,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> fullRescan(
_i7.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -594,43 +615,52 @@ class MockManager extends _i1.Mock implements _i9.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> estimateFeeFor(
int? satoshiAmount,
_i7.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i7.Future<_i5.Amount>);
@override
_i6.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -638,7 +668,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -658,7 +688,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
/// A class which mocks [NotesService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNotesService extends _i1.Mock implements _i11.NotesService {
class MockNotesService extends _i1.Mock implements _i12.NotesService {
@override
String get walletId => (super.noSuchMethod(
Invocation.getter(#walletId),
@ -670,34 +700,34 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
returnValue: <String, String>{},
) as Map<String, String>);
@override
_i6.Future<Map<String, String>> get notes => (super.noSuchMethod(
_i7.Future<Map<String, String>> get notes => (super.noSuchMethod(
Invocation.getter(#notes),
returnValue: _i6.Future<Map<String, String>>.value(<String, String>{}),
) as _i6.Future<Map<String, String>>);
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
_i7.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i6.Future<Map<String, String>>.value(<String, String>{}),
) as _i6.Future<Map<String, String>>);
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
@override
_i6.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
_i7.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#getNoteFor,
[],
{#txid: txid},
),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i6.Future<void> editOrAddNote({
_i7.Future<void> editOrAddNote({
required String? txid,
required String? note,
}) =>
@ -710,21 +740,21 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
#note: note,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
_i7.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#deleteNote,
[],
{#txid: txid},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -732,7 +762,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -760,7 +790,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
/// A class which mocks [LocaleService].
///
/// See the documentation for Mockito's code generation for more information.
class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
class MockLocaleService extends _i1.Mock implements _i13.LocaleService {
@override
String get locale => (super.noSuchMethod(
Invocation.getter(#locale),
@ -772,17 +802,17 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
returnValue: false,
) as bool);
@override
_i6.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
_i7.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
Invocation.method(
#loadLocale,
[],
{#notify: notify},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -790,7 +820,7 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,19 +3,20 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i6;
import 'dart:ui' as _i8;
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i9;
import 'package:stackwallet/services/locale_service.dart' as _i12;
import 'package:stackwallet/services/notes_service.dart' as _i11;
import 'package:stackwallet/services/wallets_service.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
import 'package:stackwallet/services/coins/manager.dart' as _i10;
import 'package:stackwallet/services/locale_service.dart' as _i13;
import 'package:stackwallet/services/notes_service.dart' as _i12;
import 'package:stackwallet/services/wallets_service.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -59,24 +60,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
@override
_i6.Future<Map<String, _i5.WalletInfo>> get walletNames =>
_i7.Future<Map<String, _i6.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i6.Future<Map<String, _i5.WalletInfo>>.value(
<String, _i5.WalletInfo>{}),
) as _i6.Future<Map<String, _i5.WalletInfo>>);
returnValue: _i7.Future<Map<String, _i6.WalletInfo>>.value(
<String, _i6.WalletInfo>{}),
) as _i7.Future<Map<String, _i6.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<bool> renameWallet({
_i7.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -91,21 +102,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
Map<String, _i5.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i6.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i5.WalletInfo>{},
) as Map<String, _i5.WalletInfo>);
returnValue: <String, _i6.WalletInfo>{},
) as Map<String, _i6.WalletInfo>);
@override
_i6.Future<void> addExistingStackWallet({
_i7.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -119,13 +130,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<String?> addNewWallet({
_i7.Future<String?> addNewWallet({
required String? name,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -138,46 +149,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i7.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i7.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> moveFavorite({
_i7.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -190,48 +201,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i7.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i7.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i7.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> setMnemonicVerified({required String? walletId}) =>
_i7.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> deleteWallet(
_i7.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -243,20 +254,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i7.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -264,7 +275,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -292,7 +303,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i9.Manager {
class MockManager extends _i1.Mock implements _i10.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -320,10 +331,10 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i7.Coin get coin => (super.noSuchMethod(
_i8.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
returnValue: _i8.Coin.bitcoin,
) as _i8.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -356,23 +367,23 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i6.Future<_i3.FeeObject>);
) as _i7.Future<_i3.FeeObject>);
@override
_i6.Future<int> get maxFee => (super.noSuchMethod(
_i7.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -382,16 +393,16 @@ class MockManager extends _i1.Mock implements _i9.Manager {
),
) as _i4.Balance);
@override
_i6.Future<List<_i10.Transaction>> get transactions => (super.noSuchMethod(
_i7.Future<List<_i11.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i6.Future<List<_i10.Transaction>>.value(<_i10.Transaction>[]),
) as _i6.Future<List<_i10.Transaction>>);
_i7.Future<List<_i11.Transaction>>.value(<_i11.Transaction>[]),
) as _i7.Future<List<_i11.Transaction>>);
@override
_i6.Future<List<_i10.UTXO>> get utxos => (super.noSuchMethod(
_i7.Future<List<_i11.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i6.Future<List<_i10.UTXO>>.value(<_i10.UTXO>[]),
) as _i6.Future<List<_i10.UTXO>>);
returnValue: _i7.Future<List<_i11.UTXO>>.value(<_i11.UTXO>[]),
) as _i7.Future<List<_i11.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -411,15 +422,15 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: '',
) as String);
@override
_i6.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -456,19 +467,29 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i7.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -478,9 +499,9 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<Map<String, dynamic>> prepareSend({
_i7.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -489,32 +510,32 @@ class MockManager extends _i1.Mock implements _i9.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
@override
_i6.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i6.Future<void> refresh() => (super.noSuchMethod(
_i7.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -524,33 +545,33 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i6.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> initializeNew() => (super.noSuchMethod(
_i7.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> initializeExisting() => (super.noSuchMethod(
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> recoverFromMnemonic({
_i7.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -569,20 +590,20 @@ class MockManager extends _i1.Mock implements _i9.Manager {
#height: height,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> fullRescan(
_i7.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -594,43 +615,52 @@ class MockManager extends _i1.Mock implements _i9.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> estimateFeeFor(
int? satoshiAmount,
_i7.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i7.Future<_i5.Amount>);
@override
_i6.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -638,7 +668,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -658,7 +688,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
/// A class which mocks [NotesService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNotesService extends _i1.Mock implements _i11.NotesService {
class MockNotesService extends _i1.Mock implements _i12.NotesService {
@override
String get walletId => (super.noSuchMethod(
Invocation.getter(#walletId),
@ -670,34 +700,34 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
returnValue: <String, String>{},
) as Map<String, String>);
@override
_i6.Future<Map<String, String>> get notes => (super.noSuchMethod(
_i7.Future<Map<String, String>> get notes => (super.noSuchMethod(
Invocation.getter(#notes),
returnValue: _i6.Future<Map<String, String>>.value(<String, String>{}),
) as _i6.Future<Map<String, String>>);
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
_i7.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i6.Future<Map<String, String>>.value(<String, String>{}),
) as _i6.Future<Map<String, String>>);
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
@override
_i6.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
_i7.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#getNoteFor,
[],
{#txid: txid},
),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i6.Future<void> editOrAddNote({
_i7.Future<void> editOrAddNote({
required String? txid,
required String? note,
}) =>
@ -710,21 +740,21 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
#note: note,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
_i7.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#deleteNote,
[],
{#txid: txid},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -732,7 +762,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -760,7 +790,7 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService {
/// A class which mocks [LocaleService].
///
/// See the documentation for Mockito's code generation for more information.
class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
class MockLocaleService extends _i1.Mock implements _i13.LocaleService {
@override
String get locale => (super.noSuchMethod(
Invocation.getter(#locale),
@ -772,17 +802,17 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
returnValue: false,
) as bool);
@override
_i6.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
_i7.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
Invocation.method(
#loadLocale,
[],
{#notify: notify},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -790,7 +820,7 @@ class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,16 +3,17 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/services/coins/manager.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i5.Manager {
class MockManager extends _i1.Mock implements _i6.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i6.Coin get coin => (super.noSuchMethod(
_i7.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i6.Coin.bitcoin,
) as _i6.Coin);
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i3.FeeObject>);
) as _i8.Future<_i3.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager {
),
) as _i4.Balance);
@override
_i7.Future<List<_i8.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i9.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i8.Transaction>>.value(<_i8.Transaction>[]),
) as _i7.Future<List<_i8.Transaction>>);
_i8.Future<List<_i9.Transaction>>.value(<_i9.Transaction>[]),
) as _i8.Future<List<_i9.Transaction>>);
@override
_i7.Future<List<_i8.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i9.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i8.UTXO>>.value(<_i8.UTXO>[]),
) as _i7.Future<List<_i8.UTXO>>);
returnValue: _i8.Future<List<_i9.UTXO>>.value(<_i9.UTXO>[]),
) as _i8.Future<List<_i9.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i5.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,17 +3,18 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i6;
import 'dart:ui' as _i8;
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i9;
import 'package:stackwallet/services/wallets_service.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
import 'package:stackwallet/services/coins/manager.dart' as _i10;
import 'package:stackwallet/services/wallets_service.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -57,24 +58,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
@override
_i6.Future<Map<String, _i5.WalletInfo>> get walletNames =>
_i7.Future<Map<String, _i6.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i6.Future<Map<String, _i5.WalletInfo>>.value(
<String, _i5.WalletInfo>{}),
) as _i6.Future<Map<String, _i5.WalletInfo>>);
returnValue: _i7.Future<Map<String, _i6.WalletInfo>>.value(
<String, _i6.WalletInfo>{}),
) as _i7.Future<Map<String, _i6.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<bool> renameWallet({
_i7.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -89,21 +100,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
Map<String, _i5.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i6.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i5.WalletInfo>{},
) as Map<String, _i5.WalletInfo>);
returnValue: <String, _i6.WalletInfo>{},
) as Map<String, _i6.WalletInfo>);
@override
_i6.Future<void> addExistingStackWallet({
_i7.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -117,13 +128,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<String?> addNewWallet({
_i7.Future<String?> addNewWallet({
required String? name,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -136,46 +147,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i7.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i7.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> moveFavorite({
_i7.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -188,48 +199,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i7.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i7.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i7.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> setMnemonicVerified({required String? walletId}) =>
_i7.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> deleteWallet(
_i7.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -241,20 +252,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i7.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -262,7 +273,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -290,7 +301,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i9.Manager {
class MockManager extends _i1.Mock implements _i10.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -318,10 +329,10 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i7.Coin get coin => (super.noSuchMethod(
_i8.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
returnValue: _i8.Coin.bitcoin,
) as _i8.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -354,23 +365,23 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i6.Future<_i3.FeeObject>);
) as _i7.Future<_i3.FeeObject>);
@override
_i6.Future<int> get maxFee => (super.noSuchMethod(
_i7.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -380,16 +391,16 @@ class MockManager extends _i1.Mock implements _i9.Manager {
),
) as _i4.Balance);
@override
_i6.Future<List<_i10.Transaction>> get transactions => (super.noSuchMethod(
_i7.Future<List<_i11.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i6.Future<List<_i10.Transaction>>.value(<_i10.Transaction>[]),
) as _i6.Future<List<_i10.Transaction>>);
_i7.Future<List<_i11.Transaction>>.value(<_i11.Transaction>[]),
) as _i7.Future<List<_i11.Transaction>>);
@override
_i6.Future<List<_i10.UTXO>> get utxos => (super.noSuchMethod(
_i7.Future<List<_i11.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i6.Future<List<_i10.UTXO>>.value(<_i10.UTXO>[]),
) as _i6.Future<List<_i10.UTXO>>);
returnValue: _i7.Future<List<_i11.UTXO>>.value(<_i11.UTXO>[]),
) as _i7.Future<List<_i11.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -409,15 +420,15 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: '',
) as String);
@override
_i6.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -454,19 +465,29 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i7.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -476,9 +497,9 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<Map<String, dynamic>> prepareSend({
_i7.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -487,32 +508,32 @@ class MockManager extends _i1.Mock implements _i9.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
@override
_i6.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i6.Future<void> refresh() => (super.noSuchMethod(
_i7.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -522,33 +543,33 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i6.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> initializeNew() => (super.noSuchMethod(
_i7.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> initializeExisting() => (super.noSuchMethod(
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> recoverFromMnemonic({
_i7.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -567,20 +588,20 @@ class MockManager extends _i1.Mock implements _i9.Manager {
#height: height,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> fullRescan(
_i7.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -592,43 +613,52 @@ class MockManager extends _i1.Mock implements _i9.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> estimateFeeFor(
int? satoshiAmount,
_i7.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i7.Future<_i5.Amount>);
@override
_i6.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -636,7 +666,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,19 +3,20 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i14;
import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/models/node_model.dart' as _i11;
import 'package:stackwallet/models/node_model.dart' as _i12;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i12;
import 'package:stackwallet/services/node_service.dart' as _i10;
import 'package:stackwallet/services/wallets_service.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
import 'package:stackwallet/services/coins/manager.dart' as _i13;
import 'package:stackwallet/services/node_service.dart' as _i11;
import 'package:stackwallet/services/wallets_service.dart' as _i7;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
as _i2;
@ -72,24 +73,34 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance {
);
}
class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount {
_FakeAmount_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
class MockWalletsService extends _i1.Mock implements _i7.WalletsService {
@override
_i7.Future<Map<String, _i6.WalletInfo>> get walletNames =>
_i8.Future<Map<String, _i7.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i7.Future<Map<String, _i6.WalletInfo>>.value(
<String, _i6.WalletInfo>{}),
) as _i7.Future<Map<String, _i6.WalletInfo>>);
returnValue: _i8.Future<Map<String, _i7.WalletInfo>>.value(
<String, _i7.WalletInfo>{}),
) as _i8.Future<Map<String, _i7.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<bool> renameWallet({
_i8.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -104,21 +115,21 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
Map<String, _i6.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i7.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i6.WalletInfo>{},
) as Map<String, _i6.WalletInfo>);
returnValue: <String, _i7.WalletInfo>{},
) as Map<String, _i7.WalletInfo>);
@override
_i7.Future<void> addExistingStackWallet({
_i8.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i8.Coin? coin,
required _i9.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -132,13 +143,13 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<String?> addNewWallet({
_i8.Future<String?> addNewWallet({
required String? name,
required _i8.Coin? coin,
required _i9.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -151,46 +162,46 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
_i7.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i8.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i8.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i8.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i8.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> moveFavorite({
_i8.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -203,48 +214,48 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i8.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i8.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
_i7.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i8.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> setMnemonicVerified({required String? walletId}) =>
_i8.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> deleteWallet(
_i8.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -256,20 +267,20 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i8.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -277,7 +288,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -305,7 +316,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
/// A class which mocks [NodeService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNodeService extends _i1.Mock implements _i10.NodeService {
class MockNodeService extends _i1.Mock implements _i11.NodeService {
@override
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
Invocation.getter(#secureStorageInterface),
@ -315,33 +326,33 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
),
) as _i2.SecureStorageInterface);
@override
List<_i11.NodeModel> get primaryNodes => (super.noSuchMethod(
List<_i12.NodeModel> get primaryNodes => (super.noSuchMethod(
Invocation.getter(#primaryNodes),
returnValue: <_i11.NodeModel>[],
) as List<_i11.NodeModel>);
returnValue: <_i12.NodeModel>[],
) as List<_i12.NodeModel>);
@override
List<_i11.NodeModel> get nodes => (super.noSuchMethod(
List<_i12.NodeModel> get nodes => (super.noSuchMethod(
Invocation.getter(#nodes),
returnValue: <_i11.NodeModel>[],
) as List<_i11.NodeModel>);
returnValue: <_i12.NodeModel>[],
) as List<_i12.NodeModel>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateDefaults() => (super.noSuchMethod(
_i8.Future<void> updateDefaults() => (super.noSuchMethod(
Invocation.method(
#updateDefaults,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> setPrimaryNodeFor({
required _i8.Coin? coin,
required _i11.NodeModel? node,
_i8.Future<void> setPrimaryNodeFor({
required _i9.Coin? coin,
required _i12.NodeModel? node,
bool? shouldNotifyListeners = false,
}) =>
(super.noSuchMethod(
@ -354,44 +365,44 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i11.NodeModel? getPrimaryNodeFor({required _i8.Coin? coin}) =>
_i12.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) =>
(super.noSuchMethod(Invocation.method(
#getPrimaryNodeFor,
[],
{#coin: coin},
)) as _i11.NodeModel?);
)) as _i12.NodeModel?);
@override
List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod(
List<_i12.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod(
Invocation.method(
#getNodesFor,
[coin],
),
returnValue: <_i11.NodeModel>[],
) as List<_i11.NodeModel>);
returnValue: <_i12.NodeModel>[],
) as List<_i12.NodeModel>);
@override
_i11.NodeModel? getNodeById({required String? id}) =>
_i12.NodeModel? getNodeById({required String? id}) =>
(super.noSuchMethod(Invocation.method(
#getNodeById,
[],
{#id: id},
)) as _i11.NodeModel?);
)) as _i12.NodeModel?);
@override
List<_i11.NodeModel> failoverNodesFor({required _i8.Coin? coin}) =>
List<_i12.NodeModel> failoverNodesFor({required _i9.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#failoverNodesFor,
[],
{#coin: coin},
),
returnValue: <_i11.NodeModel>[],
) as List<_i11.NodeModel>);
returnValue: <_i12.NodeModel>[],
) as List<_i12.NodeModel>);
@override
_i7.Future<void> add(
_i11.NodeModel? node,
_i8.Future<void> add(
_i12.NodeModel? node,
String? password,
bool? shouldNotifyListeners,
) =>
@ -404,11 +415,11 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> delete(
_i8.Future<void> delete(
String? id,
bool? shouldNotifyListeners,
) =>
@ -420,11 +431,11 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> setEnabledState(
_i8.Future<void> setEnabledState(
String? id,
bool? enabled,
bool? shouldNotifyListeners,
@ -438,12 +449,12 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> edit(
_i11.NodeModel? editedNode,
_i8.Future<void> edit(
_i12.NodeModel? editedNode,
String? password,
bool? shouldNotifyListeners,
) =>
@ -456,20 +467,20 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> updateCommunityNodes() => (super.noSuchMethod(
_i8.Future<void> updateCommunityNodes() => (super.noSuchMethod(
Invocation.method(
#updateCommunityNodes,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -477,7 +488,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -505,7 +516,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i12.Manager {
class MockManager extends _i1.Mock implements _i13.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -533,10 +544,10 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: false,
) as bool);
@override
_i8.Coin get coin => (super.noSuchMethod(
_i9.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i8.Coin.bitcoin,
) as _i8.Coin);
returnValue: _i9.Coin.bitcoin,
) as _i9.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -569,23 +580,23 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i4.FeeObject>);
) as _i8.Future<_i4.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -595,16 +606,16 @@ class MockManager extends _i1.Mock implements _i12.Manager {
),
) as _i5.Balance);
@override
_i7.Future<List<_i13.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i14.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i13.Transaction>>.value(<_i13.Transaction>[]),
) as _i7.Future<List<_i13.Transaction>>);
_i8.Future<List<_i14.Transaction>>.value(<_i14.Transaction>[]),
) as _i8.Future<List<_i14.Transaction>>);
@override
_i7.Future<List<_i13.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i14.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i13.UTXO>>.value(<_i13.UTXO>[]),
) as _i7.Future<List<_i13.UTXO>>);
returnValue: _i8.Future<List<_i14.UTXO>>.value(<_i14.UTXO>[]),
) as _i8.Future<List<_i14.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -624,15 +635,15 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -669,19 +680,29 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -691,9 +712,9 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i6.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -702,32 +723,32 @@ class MockManager extends _i1.Mock implements _i12.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -737,33 +758,33 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -782,20 +803,20 @@ class MockManager extends _i1.Mock implements _i12.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -807,43 +828,52 @@ class MockManager extends _i1.Mock implements _i12.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i6.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -851,7 +881,7 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,23 +3,24 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i8;
import 'dart:ui' as _i11;
import 'dart:async' as _i9;
import 'dart:ui' as _i12;
import 'package:barcode_scan2/barcode_scan2.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i14;
import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/models/node_model.dart' as _i15;
import 'package:stackwallet/models/node_model.dart' as _i16;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i12;
import 'package:stackwallet/services/node_service.dart' as _i14;
import 'package:stackwallet/services/wallets_service.dart' as _i9;
import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10;
import 'package:stackwallet/services/coins/manager.dart' as _i13;
import 'package:stackwallet/services/node_service.dart' as _i15;
import 'package:stackwallet/services/wallets_service.dart' as _i10;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i8;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i11;
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
as _i6;
as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -73,9 +74,19 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance {
);
}
class _FakeSecureStorageInterface_4 extends _i1.SmartFake
implements _i6.SecureStorageInterface {
_FakeSecureStorageInterface_4(
class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount {
_FakeAmount_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeSecureStorageInterface_5 extends _i1.SmartFake
implements _i7.SecureStorageInterface {
_FakeSecureStorageInterface_5(
Object parent,
Invocation parentInvocation,
) : super(
@ -88,13 +99,13 @@ class _FakeSecureStorageInterface_4 extends _i1.SmartFake
///
/// See the documentation for Mockito's code generation for more information.
class MockBarcodeScannerWrapper extends _i1.Mock
implements _i7.BarcodeScannerWrapper {
implements _i8.BarcodeScannerWrapper {
MockBarcodeScannerWrapper() {
_i1.throwOnMissingStub(this);
}
@override
_i8.Future<_i2.ScanResult> scan(
_i9.Future<_i2.ScanResult> scan(
{_i2.ScanOptions? options = const _i2.ScanOptions()}) =>
(super.noSuchMethod(
Invocation.method(
@ -102,7 +113,7 @@ class MockBarcodeScannerWrapper extends _i1.Mock
[],
{#options: options},
),
returnValue: _i8.Future<_i2.ScanResult>.value(_FakeScanResult_0(
returnValue: _i9.Future<_i2.ScanResult>.value(_FakeScanResult_0(
this,
Invocation.method(
#scan,
@ -110,27 +121,27 @@ class MockBarcodeScannerWrapper extends _i1.Mock
{#options: options},
),
)),
) as _i8.Future<_i2.ScanResult>);
) as _i9.Future<_i2.ScanResult>);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
class MockWalletsService extends _i1.Mock implements _i10.WalletsService {
@override
_i8.Future<Map<String, _i9.WalletInfo>> get walletNames =>
_i9.Future<Map<String, _i10.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i8.Future<Map<String, _i9.WalletInfo>>.value(
<String, _i9.WalletInfo>{}),
) as _i8.Future<Map<String, _i9.WalletInfo>>);
returnValue: _i9.Future<Map<String, _i10.WalletInfo>>.value(
<String, _i10.WalletInfo>{}),
) as _i9.Future<Map<String, _i10.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<bool> renameWallet({
_i9.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -145,21 +156,21 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
Map<String, _i9.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i10.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i9.WalletInfo>{},
) as Map<String, _i9.WalletInfo>);
returnValue: <String, _i10.WalletInfo>{},
) as Map<String, _i10.WalletInfo>);
@override
_i8.Future<void> addExistingStackWallet({
_i9.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i10.Coin? coin,
required _i11.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -173,13 +184,13 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<String?> addNewWallet({
_i9.Future<String?> addNewWallet({
required String? name,
required _i10.Coin? coin,
required _i11.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -192,46 +203,46 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
_i8.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i9.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
returnValue: _i9.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>);
@override
_i8.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i9.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i9.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i9.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> moveFavorite({
_i9.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -244,48 +255,48 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i9.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i9.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
_i8.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i9.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> setMnemonicVerified({required String? walletId}) =>
_i9.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<int> deleteWallet(
_i9.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -297,20 +308,20 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<int>.value(0),
) as _i9.Future<int>);
@override
_i8.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i9.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -318,7 +329,7 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -346,7 +357,7 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i12.Manager {
class MockManager extends _i1.Mock implements _i13.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -374,10 +385,10 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: false,
) as bool);
@override
_i10.Coin get coin => (super.noSuchMethod(
_i11.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i10.Coin.bitcoin,
) as _i10.Coin);
returnValue: _i11.Coin.bitcoin,
) as _i11.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -410,23 +421,23 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
_i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this,
Invocation.getter(#fees),
)),
) as _i8.Future<_i4.FeeObject>);
) as _i9.Future<_i4.FeeObject>);
@override
_i8.Future<int> get maxFee => (super.noSuchMethod(
_i9.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<int>.value(0),
) as _i9.Future<int>);
@override
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i9.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -436,16 +447,16 @@ class MockManager extends _i1.Mock implements _i12.Manager {
),
) as _i5.Balance);
@override
_i8.Future<List<_i13.Transaction>> get transactions => (super.noSuchMethod(
_i9.Future<List<_i14.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i8.Future<List<_i13.Transaction>>.value(<_i13.Transaction>[]),
) as _i8.Future<List<_i13.Transaction>>);
_i9.Future<List<_i14.Transaction>>.value(<_i14.Transaction>[]),
) as _i9.Future<List<_i14.Transaction>>);
@override
_i8.Future<List<_i13.UTXO>> get utxos => (super.noSuchMethod(
_i9.Future<List<_i14.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i8.Future<List<_i13.UTXO>>.value(<_i13.UTXO>[]),
) as _i8.Future<List<_i13.UTXO>>);
returnValue: _i9.Future<List<_i14.UTXO>>.value(<_i14.UTXO>[]),
) as _i9.Future<List<_i14.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -465,15 +476,15 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: '',
) as String);
@override
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i9.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
returnValue: _i9.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>);
@override
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i9.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -510,19 +521,29 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i9.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i9.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -532,9 +553,9 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<Map<String, dynamic>> prepareSend({
_i9.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i6.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -543,32 +564,32 @@ class MockManager extends _i1.Mock implements _i12.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>);
@override
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i9.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i8.Future<void> refresh() => (super.noSuchMethod(
_i9.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -578,33 +599,33 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValue: false,
) as bool);
@override
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i9.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> initializeNew() => (super.noSuchMethod(
_i9.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
_i9.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> recoverFromMnemonic({
_i9.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -623,20 +644,20 @@ class MockManager extends _i1.Mock implements _i12.Manager {
#height: height,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i9.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> fullRescan(
_i9.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -648,43 +669,52 @@ class MockManager extends _i1.Mock implements _i12.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<int> estimateFeeFor(
int? satoshiAmount,
_i9.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i9.Future<_i6.Amount>);
@override
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i9.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i9.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -692,7 +722,7 @@ class MockManager extends _i1.Mock implements _i12.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -712,43 +742,43 @@ class MockManager extends _i1.Mock implements _i12.Manager {
/// A class which mocks [NodeService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNodeService extends _i1.Mock implements _i14.NodeService {
class MockNodeService extends _i1.Mock implements _i15.NodeService {
@override
_i6.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
_i7.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
Invocation.getter(#secureStorageInterface),
returnValue: _FakeSecureStorageInterface_4(
returnValue: _FakeSecureStorageInterface_5(
this,
Invocation.getter(#secureStorageInterface),
),
) as _i6.SecureStorageInterface);
) as _i7.SecureStorageInterface);
@override
List<_i15.NodeModel> get primaryNodes => (super.noSuchMethod(
List<_i16.NodeModel> get primaryNodes => (super.noSuchMethod(
Invocation.getter(#primaryNodes),
returnValue: <_i15.NodeModel>[],
) as List<_i15.NodeModel>);
returnValue: <_i16.NodeModel>[],
) as List<_i16.NodeModel>);
@override
List<_i15.NodeModel> get nodes => (super.noSuchMethod(
List<_i16.NodeModel> get nodes => (super.noSuchMethod(
Invocation.getter(#nodes),
returnValue: <_i15.NodeModel>[],
) as List<_i15.NodeModel>);
returnValue: <_i16.NodeModel>[],
) as List<_i16.NodeModel>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<void> updateDefaults() => (super.noSuchMethod(
_i9.Future<void> updateDefaults() => (super.noSuchMethod(
Invocation.method(
#updateDefaults,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> setPrimaryNodeFor({
required _i10.Coin? coin,
required _i15.NodeModel? node,
_i9.Future<void> setPrimaryNodeFor({
required _i11.Coin? coin,
required _i16.NodeModel? node,
bool? shouldNotifyListeners = false,
}) =>
(super.noSuchMethod(
@ -761,44 +791,44 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i15.NodeModel? getPrimaryNodeFor({required _i10.Coin? coin}) =>
_i16.NodeModel? getPrimaryNodeFor({required _i11.Coin? coin}) =>
(super.noSuchMethod(Invocation.method(
#getPrimaryNodeFor,
[],
{#coin: coin},
)) as _i15.NodeModel?);
)) as _i16.NodeModel?);
@override
List<_i15.NodeModel> getNodesFor(_i10.Coin? coin) => (super.noSuchMethod(
List<_i16.NodeModel> getNodesFor(_i11.Coin? coin) => (super.noSuchMethod(
Invocation.method(
#getNodesFor,
[coin],
),
returnValue: <_i15.NodeModel>[],
) as List<_i15.NodeModel>);
returnValue: <_i16.NodeModel>[],
) as List<_i16.NodeModel>);
@override
_i15.NodeModel? getNodeById({required String? id}) =>
_i16.NodeModel? getNodeById({required String? id}) =>
(super.noSuchMethod(Invocation.method(
#getNodeById,
[],
{#id: id},
)) as _i15.NodeModel?);
)) as _i16.NodeModel?);
@override
List<_i15.NodeModel> failoverNodesFor({required _i10.Coin? coin}) =>
List<_i16.NodeModel> failoverNodesFor({required _i11.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#failoverNodesFor,
[],
{#coin: coin},
),
returnValue: <_i15.NodeModel>[],
) as List<_i15.NodeModel>);
returnValue: <_i16.NodeModel>[],
) as List<_i16.NodeModel>);
@override
_i8.Future<void> add(
_i15.NodeModel? node,
_i9.Future<void> add(
_i16.NodeModel? node,
String? password,
bool? shouldNotifyListeners,
) =>
@ -811,11 +841,11 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> delete(
_i9.Future<void> delete(
String? id,
bool? shouldNotifyListeners,
) =>
@ -827,11 +857,11 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> setEnabledState(
_i9.Future<void> setEnabledState(
String? id,
bool? enabled,
bool? shouldNotifyListeners,
@ -845,12 +875,12 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> edit(
_i15.NodeModel? editedNode,
_i9.Future<void> edit(
_i16.NodeModel? editedNode,
String? password,
bool? shouldNotifyListeners,
) =>
@ -863,20 +893,20 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> updateCommunityNodes() => (super.noSuchMethod(
_i9.Future<void> updateCommunityNodes() => (super.noSuchMethod(
Invocation.method(
#updateCommunityNodes,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -884,7 +914,7 @@ class MockNodeService extends _i1.Mock implements _i14.NodeService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,16 +3,17 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/services/coins/manager.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i5.Manager {
class MockManager extends _i1.Mock implements _i6.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i6.Coin get coin => (super.noSuchMethod(
_i7.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i6.Coin.bitcoin,
) as _i6.Coin);
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i3.FeeObject>);
) as _i8.Future<_i3.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager {
),
) as _i4.Balance);
@override
_i7.Future<List<_i8.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i9.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i8.Transaction>>.value(<_i8.Transaction>[]),
) as _i7.Future<List<_i8.Transaction>>);
_i8.Future<List<_i9.Transaction>>.value(<_i9.Transaction>[]),
) as _i8.Future<List<_i9.Transaction>>);
@override
_i7.Future<List<_i8.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i9.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i8.UTXO>>.value(<_i8.UTXO>[]),
) as _i7.Future<List<_i8.UTXO>>);
returnValue: _i8.Future<List<_i9.UTXO>>.value(<_i9.UTXO>[]),
) as _i8.Future<List<_i9.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i5.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,16 +3,17 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/services/coins/manager.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i5.Manager {
class MockManager extends _i1.Mock implements _i6.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i6.Coin get coin => (super.noSuchMethod(
_i7.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i6.Coin.bitcoin,
) as _i6.Coin);
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i3.FeeObject>);
) as _i8.Future<_i3.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager {
),
) as _i4.Balance);
@override
_i7.Future<List<_i8.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i9.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i8.Transaction>>.value(<_i8.Transaction>[]),
) as _i7.Future<List<_i8.Transaction>>);
_i8.Future<List<_i9.Transaction>>.value(<_i9.Transaction>[]),
) as _i8.Future<List<_i9.Transaction>>);
@override
_i7.Future<List<_i8.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i9.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i8.UTXO>>.value(<_i8.UTXO>[]),
) as _i7.Future<List<_i8.UTXO>>);
returnValue: _i8.Future<List<_i9.UTXO>>.value(<_i9.UTXO>[]),
) as _i8.Future<List<_i9.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i5.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,18 +3,19 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'dart:async' as _i9;
import 'dart:ui' as _i11;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i12;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13;
import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/models/node_model.dart' as _i7;
import 'package:stackwallet/models/node_model.dart' as _i8;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i11;
import 'package:stackwallet/services/node_service.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
import 'package:stackwallet/services/coins/manager.dart' as _i12;
import 'package:stackwallet/services/node_service.dart' as _i7;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10;
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
as _i2;
@ -71,10 +72,20 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance {
);
}
class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount {
_FakeAmount_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [NodeService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNodeService extends _i1.Mock implements _i6.NodeService {
class MockNodeService extends _i1.Mock implements _i7.NodeService {
@override
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
Invocation.getter(#secureStorageInterface),
@ -84,33 +95,33 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
),
) as _i2.SecureStorageInterface);
@override
List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod(
List<_i8.NodeModel> get primaryNodes => (super.noSuchMethod(
Invocation.getter(#primaryNodes),
returnValue: <_i7.NodeModel>[],
) as List<_i7.NodeModel>);
returnValue: <_i8.NodeModel>[],
) as List<_i8.NodeModel>);
@override
List<_i7.NodeModel> get nodes => (super.noSuchMethod(
List<_i8.NodeModel> get nodes => (super.noSuchMethod(
Invocation.getter(#nodes),
returnValue: <_i7.NodeModel>[],
) as List<_i7.NodeModel>);
returnValue: <_i8.NodeModel>[],
) as List<_i8.NodeModel>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<void> updateDefaults() => (super.noSuchMethod(
_i9.Future<void> updateDefaults() => (super.noSuchMethod(
Invocation.method(
#updateDefaults,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> setPrimaryNodeFor({
required _i9.Coin? coin,
required _i7.NodeModel? node,
_i9.Future<void> setPrimaryNodeFor({
required _i10.Coin? coin,
required _i8.NodeModel? node,
bool? shouldNotifyListeners = false,
}) =>
(super.noSuchMethod(
@ -123,44 +134,44 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i7.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) =>
_i8.NodeModel? getPrimaryNodeFor({required _i10.Coin? coin}) =>
(super.noSuchMethod(Invocation.method(
#getPrimaryNodeFor,
[],
{#coin: coin},
)) as _i7.NodeModel?);
)) as _i8.NodeModel?);
@override
List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod(
List<_i8.NodeModel> getNodesFor(_i10.Coin? coin) => (super.noSuchMethod(
Invocation.method(
#getNodesFor,
[coin],
),
returnValue: <_i7.NodeModel>[],
) as List<_i7.NodeModel>);
returnValue: <_i8.NodeModel>[],
) as List<_i8.NodeModel>);
@override
_i7.NodeModel? getNodeById({required String? id}) =>
_i8.NodeModel? getNodeById({required String? id}) =>
(super.noSuchMethod(Invocation.method(
#getNodeById,
[],
{#id: id},
)) as _i7.NodeModel?);
)) as _i8.NodeModel?);
@override
List<_i7.NodeModel> failoverNodesFor({required _i9.Coin? coin}) =>
List<_i8.NodeModel> failoverNodesFor({required _i10.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#failoverNodesFor,
[],
{#coin: coin},
),
returnValue: <_i7.NodeModel>[],
) as List<_i7.NodeModel>);
returnValue: <_i8.NodeModel>[],
) as List<_i8.NodeModel>);
@override
_i8.Future<void> add(
_i7.NodeModel? node,
_i9.Future<void> add(
_i8.NodeModel? node,
String? password,
bool? shouldNotifyListeners,
) =>
@ -173,11 +184,11 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> delete(
_i9.Future<void> delete(
String? id,
bool? shouldNotifyListeners,
) =>
@ -189,11 +200,11 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> setEnabledState(
_i9.Future<void> setEnabledState(
String? id,
bool? enabled,
bool? shouldNotifyListeners,
@ -207,12 +218,12 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> edit(
_i7.NodeModel? editedNode,
_i9.Future<void> edit(
_i8.NodeModel? editedNode,
String? password,
bool? shouldNotifyListeners,
) =>
@ -225,20 +236,20 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> updateCommunityNodes() => (super.noSuchMethod(
_i9.Future<void> updateCommunityNodes() => (super.noSuchMethod(
Invocation.method(
#updateCommunityNodes,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -246,7 +257,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -274,7 +285,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i11.Manager {
class MockManager extends _i1.Mock implements _i12.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -302,10 +313,10 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: false,
) as bool);
@override
_i9.Coin get coin => (super.noSuchMethod(
_i10.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i9.Coin.bitcoin,
) as _i9.Coin);
returnValue: _i10.Coin.bitcoin,
) as _i10.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -338,23 +349,23 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
_i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this,
Invocation.getter(#fees),
)),
) as _i8.Future<_i4.FeeObject>);
) as _i9.Future<_i4.FeeObject>);
@override
_i8.Future<int> get maxFee => (super.noSuchMethod(
_i9.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<int>.value(0),
) as _i9.Future<int>);
@override
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i9.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -364,16 +375,16 @@ class MockManager extends _i1.Mock implements _i11.Manager {
),
) as _i5.Balance);
@override
_i8.Future<List<_i12.Transaction>> get transactions => (super.noSuchMethod(
_i9.Future<List<_i13.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i8.Future<List<_i12.Transaction>>.value(<_i12.Transaction>[]),
) as _i8.Future<List<_i12.Transaction>>);
_i9.Future<List<_i13.Transaction>>.value(<_i13.Transaction>[]),
) as _i9.Future<List<_i13.Transaction>>);
@override
_i8.Future<List<_i12.UTXO>> get utxos => (super.noSuchMethod(
_i9.Future<List<_i13.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i8.Future<List<_i12.UTXO>>.value(<_i12.UTXO>[]),
) as _i8.Future<List<_i12.UTXO>>);
returnValue: _i9.Future<List<_i13.UTXO>>.value(<_i13.UTXO>[]),
) as _i9.Future<List<_i13.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -393,15 +404,15 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: '',
) as String);
@override
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i9.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
returnValue: _i9.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>);
@override
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i9.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -438,19 +449,29 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i9.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i9.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -460,9 +481,9 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<Map<String, dynamic>> prepareSend({
_i9.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i6.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -471,32 +492,32 @@ class MockManager extends _i1.Mock implements _i11.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>);
@override
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i9.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i8.Future<void> refresh() => (super.noSuchMethod(
_i9.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -506,33 +527,33 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: false,
) as bool);
@override
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i9.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> initializeNew() => (super.noSuchMethod(
_i9.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
_i9.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> recoverFromMnemonic({
_i9.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -551,20 +572,20 @@ class MockManager extends _i1.Mock implements _i11.Manager {
#height: height,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i9.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> fullRescan(
_i9.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -576,43 +597,52 @@ class MockManager extends _i1.Mock implements _i11.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<int> estimateFeeFor(
int? satoshiAmount,
_i9.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i9.Future<_i6.Amount>);
@override
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i9.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i9.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -620,7 +650,7 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,18 +3,19 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'dart:async' as _i9;
import 'dart:ui' as _i11;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i12;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13;
import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/models/node_model.dart' as _i7;
import 'package:stackwallet/models/node_model.dart' as _i8;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i11;
import 'package:stackwallet/services/node_service.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
import 'package:stackwallet/services/coins/manager.dart' as _i12;
import 'package:stackwallet/services/node_service.dart' as _i7;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10;
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
as _i2;
@ -71,10 +72,20 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance {
);
}
class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount {
_FakeAmount_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [NodeService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNodeService extends _i1.Mock implements _i6.NodeService {
class MockNodeService extends _i1.Mock implements _i7.NodeService {
@override
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
Invocation.getter(#secureStorageInterface),
@ -84,33 +95,33 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
),
) as _i2.SecureStorageInterface);
@override
List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod(
List<_i8.NodeModel> get primaryNodes => (super.noSuchMethod(
Invocation.getter(#primaryNodes),
returnValue: <_i7.NodeModel>[],
) as List<_i7.NodeModel>);
returnValue: <_i8.NodeModel>[],
) as List<_i8.NodeModel>);
@override
List<_i7.NodeModel> get nodes => (super.noSuchMethod(
List<_i8.NodeModel> get nodes => (super.noSuchMethod(
Invocation.getter(#nodes),
returnValue: <_i7.NodeModel>[],
) as List<_i7.NodeModel>);
returnValue: <_i8.NodeModel>[],
) as List<_i8.NodeModel>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<void> updateDefaults() => (super.noSuchMethod(
_i9.Future<void> updateDefaults() => (super.noSuchMethod(
Invocation.method(
#updateDefaults,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> setPrimaryNodeFor({
required _i9.Coin? coin,
required _i7.NodeModel? node,
_i9.Future<void> setPrimaryNodeFor({
required _i10.Coin? coin,
required _i8.NodeModel? node,
bool? shouldNotifyListeners = false,
}) =>
(super.noSuchMethod(
@ -123,44 +134,44 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i7.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) =>
_i8.NodeModel? getPrimaryNodeFor({required _i10.Coin? coin}) =>
(super.noSuchMethod(Invocation.method(
#getPrimaryNodeFor,
[],
{#coin: coin},
)) as _i7.NodeModel?);
)) as _i8.NodeModel?);
@override
List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod(
List<_i8.NodeModel> getNodesFor(_i10.Coin? coin) => (super.noSuchMethod(
Invocation.method(
#getNodesFor,
[coin],
),
returnValue: <_i7.NodeModel>[],
) as List<_i7.NodeModel>);
returnValue: <_i8.NodeModel>[],
) as List<_i8.NodeModel>);
@override
_i7.NodeModel? getNodeById({required String? id}) =>
_i8.NodeModel? getNodeById({required String? id}) =>
(super.noSuchMethod(Invocation.method(
#getNodeById,
[],
{#id: id},
)) as _i7.NodeModel?);
)) as _i8.NodeModel?);
@override
List<_i7.NodeModel> failoverNodesFor({required _i9.Coin? coin}) =>
List<_i8.NodeModel> failoverNodesFor({required _i10.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#failoverNodesFor,
[],
{#coin: coin},
),
returnValue: <_i7.NodeModel>[],
) as List<_i7.NodeModel>);
returnValue: <_i8.NodeModel>[],
) as List<_i8.NodeModel>);
@override
_i8.Future<void> add(
_i7.NodeModel? node,
_i9.Future<void> add(
_i8.NodeModel? node,
String? password,
bool? shouldNotifyListeners,
) =>
@ -173,11 +184,11 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> delete(
_i9.Future<void> delete(
String? id,
bool? shouldNotifyListeners,
) =>
@ -189,11 +200,11 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> setEnabledState(
_i9.Future<void> setEnabledState(
String? id,
bool? enabled,
bool? shouldNotifyListeners,
@ -207,12 +218,12 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> edit(
_i7.NodeModel? editedNode,
_i9.Future<void> edit(
_i8.NodeModel? editedNode,
String? password,
bool? shouldNotifyListeners,
) =>
@ -225,20 +236,20 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> updateCommunityNodes() => (super.noSuchMethod(
_i9.Future<void> updateCommunityNodes() => (super.noSuchMethod(
Invocation.method(
#updateCommunityNodes,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -246,7 +257,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -274,7 +285,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i11.Manager {
class MockManager extends _i1.Mock implements _i12.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -302,10 +313,10 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: false,
) as bool);
@override
_i9.Coin get coin => (super.noSuchMethod(
_i10.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i9.Coin.bitcoin,
) as _i9.Coin);
returnValue: _i10.Coin.bitcoin,
) as _i10.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -338,23 +349,23 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
_i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this,
Invocation.getter(#fees),
)),
) as _i8.Future<_i4.FeeObject>);
) as _i9.Future<_i4.FeeObject>);
@override
_i8.Future<int> get maxFee => (super.noSuchMethod(
_i9.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<int>.value(0),
) as _i9.Future<int>);
@override
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i9.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -364,16 +375,16 @@ class MockManager extends _i1.Mock implements _i11.Manager {
),
) as _i5.Balance);
@override
_i8.Future<List<_i12.Transaction>> get transactions => (super.noSuchMethod(
_i9.Future<List<_i13.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i8.Future<List<_i12.Transaction>>.value(<_i12.Transaction>[]),
) as _i8.Future<List<_i12.Transaction>>);
_i9.Future<List<_i13.Transaction>>.value(<_i13.Transaction>[]),
) as _i9.Future<List<_i13.Transaction>>);
@override
_i8.Future<List<_i12.UTXO>> get utxos => (super.noSuchMethod(
_i9.Future<List<_i13.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i8.Future<List<_i12.UTXO>>.value(<_i12.UTXO>[]),
) as _i8.Future<List<_i12.UTXO>>);
returnValue: _i9.Future<List<_i13.UTXO>>.value(<_i13.UTXO>[]),
) as _i9.Future<List<_i13.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -393,15 +404,15 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: '',
) as String);
@override
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i9.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
returnValue: _i9.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>);
@override
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i9.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -438,19 +449,29 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i9.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i9.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -460,9 +481,9 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<Map<String, dynamic>> prepareSend({
_i9.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i6.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -471,32 +492,32 @@ class MockManager extends _i1.Mock implements _i11.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>);
@override
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i9.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i8.Future<void> refresh() => (super.noSuchMethod(
_i9.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -506,33 +527,33 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValue: false,
) as bool);
@override
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i9.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> initializeNew() => (super.noSuchMethod(
_i9.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
_i9.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> recoverFromMnemonic({
_i9.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -551,20 +572,20 @@ class MockManager extends _i1.Mock implements _i11.Manager {
#height: height,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i9.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> fullRescan(
_i9.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -576,43 +597,52 @@ class MockManager extends _i1.Mock implements _i11.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<int> estimateFeeFor(
int? satoshiAmount,
_i9.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i9.Future<_i6.Amount>);
@override
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i9.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i9.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -620,7 +650,7 @@ class MockManager extends _i1.Mock implements _i11.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,16 +3,17 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/services/coins/manager.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i5.Manager {
class MockManager extends _i1.Mock implements _i6.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i6.Coin get coin => (super.noSuchMethod(
_i7.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i6.Coin.bitcoin,
) as _i6.Coin);
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i3.FeeObject>);
) as _i8.Future<_i3.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager {
),
) as _i4.Balance);
@override
_i7.Future<List<_i8.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i9.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i8.Transaction>>.value(<_i8.Transaction>[]),
) as _i7.Future<List<_i8.Transaction>>);
_i8.Future<List<_i9.Transaction>>.value(<_i9.Transaction>[]),
) as _i8.Future<List<_i9.Transaction>>);
@override
_i7.Future<List<_i8.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i9.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i8.UTXO>>.value(<_i8.UTXO>[]),
) as _i7.Future<List<_i8.UTXO>>);
returnValue: _i8.Future<List<_i9.UTXO>>.value(<_i9.UTXO>[]),
) as _i8.Future<List<_i9.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i5.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,16 +3,17 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/services/coins/manager.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i5.Manager {
class MockManager extends _i1.Mock implements _i6.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i6.Coin get coin => (super.noSuchMethod(
_i7.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i6.Coin.bitcoin,
) as _i6.Coin);
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i3.FeeObject>);
) as _i8.Future<_i3.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager {
),
) as _i4.Balance);
@override
_i7.Future<List<_i8.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i9.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i8.Transaction>>.value(<_i8.Transaction>[]),
) as _i7.Future<List<_i8.Transaction>>);
_i8.Future<List<_i9.Transaction>>.value(<_i9.Transaction>[]),
) as _i8.Future<List<_i9.Transaction>>);
@override
_i7.Future<List<_i8.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i9.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i8.UTXO>>.value(<_i8.UTXO>[]),
) as _i7.Future<List<_i8.UTXO>>);
returnValue: _i8.Future<List<_i9.UTXO>>.value(<_i9.UTXO>[]),
) as _i8.Future<List<_i9.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i5.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,17 +3,18 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i6;
import 'dart:ui' as _i8;
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i9;
import 'package:stackwallet/services/wallets_service.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
import 'package:stackwallet/services/coins/manager.dart' as _i10;
import 'package:stackwallet/services/wallets_service.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -57,24 +58,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
@override
_i6.Future<Map<String, _i5.WalletInfo>> get walletNames =>
_i7.Future<Map<String, _i6.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i6.Future<Map<String, _i5.WalletInfo>>.value(
<String, _i5.WalletInfo>{}),
) as _i6.Future<Map<String, _i5.WalletInfo>>);
returnValue: _i7.Future<Map<String, _i6.WalletInfo>>.value(
<String, _i6.WalletInfo>{}),
) as _i7.Future<Map<String, _i6.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<bool> renameWallet({
_i7.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -89,21 +100,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
Map<String, _i5.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i6.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i5.WalletInfo>{},
) as Map<String, _i5.WalletInfo>);
returnValue: <String, _i6.WalletInfo>{},
) as Map<String, _i6.WalletInfo>);
@override
_i6.Future<void> addExistingStackWallet({
_i7.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -117,13 +128,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<String?> addNewWallet({
_i7.Future<String?> addNewWallet({
required String? name,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -136,46 +147,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i7.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i7.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> moveFavorite({
_i7.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -188,48 +199,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i7.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i7.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i7.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> setMnemonicVerified({required String? walletId}) =>
_i7.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> deleteWallet(
_i7.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -241,20 +252,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i7.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -262,7 +273,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -290,7 +301,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i9.Manager {
class MockManager extends _i1.Mock implements _i10.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -318,10 +329,10 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i7.Coin get coin => (super.noSuchMethod(
_i8.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
returnValue: _i8.Coin.bitcoin,
) as _i8.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -354,23 +365,23 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i6.Future<_i3.FeeObject>);
) as _i7.Future<_i3.FeeObject>);
@override
_i6.Future<int> get maxFee => (super.noSuchMethod(
_i7.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -380,16 +391,16 @@ class MockManager extends _i1.Mock implements _i9.Manager {
),
) as _i4.Balance);
@override
_i6.Future<List<_i10.Transaction>> get transactions => (super.noSuchMethod(
_i7.Future<List<_i11.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i6.Future<List<_i10.Transaction>>.value(<_i10.Transaction>[]),
) as _i6.Future<List<_i10.Transaction>>);
_i7.Future<List<_i11.Transaction>>.value(<_i11.Transaction>[]),
) as _i7.Future<List<_i11.Transaction>>);
@override
_i6.Future<List<_i10.UTXO>> get utxos => (super.noSuchMethod(
_i7.Future<List<_i11.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i6.Future<List<_i10.UTXO>>.value(<_i10.UTXO>[]),
) as _i6.Future<List<_i10.UTXO>>);
returnValue: _i7.Future<List<_i11.UTXO>>.value(<_i11.UTXO>[]),
) as _i7.Future<List<_i11.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -409,15 +420,15 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: '',
) as String);
@override
_i6.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -454,19 +465,29 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i7.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -476,9 +497,9 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<Map<String, dynamic>> prepareSend({
_i7.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -487,32 +508,32 @@ class MockManager extends _i1.Mock implements _i9.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
@override
_i6.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i6.Future<void> refresh() => (super.noSuchMethod(
_i7.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -522,33 +543,33 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i6.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> initializeNew() => (super.noSuchMethod(
_i7.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> initializeExisting() => (super.noSuchMethod(
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> recoverFromMnemonic({
_i7.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -567,20 +588,20 @@ class MockManager extends _i1.Mock implements _i9.Manager {
#height: height,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> fullRescan(
_i7.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -592,43 +613,52 @@ class MockManager extends _i1.Mock implements _i9.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> estimateFeeFor(
int? satoshiAmount,
_i7.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i7.Future<_i5.Amount>);
@override
_i6.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -636,7 +666,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,22 +3,23 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i8;
import 'dart:ui' as _i14;
import 'dart:async' as _i9;
import 'dart:ui' as _i15;
import 'package:local_auth/auth_strings.dart' as _i11;
import 'package:local_auth/local_auth.dart' as _i10;
import 'package:local_auth/auth_strings.dart' as _i12;
import 'package:local_auth/local_auth.dart' as _i11;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i7;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i7;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i8;
import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i17;
import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i15;
import 'package:stackwallet/services/wallets_service.dart' as _i13;
import 'package:stackwallet/utilities/biometrics.dart' as _i12;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
import 'package:stackwallet/services/coins/manager.dart' as _i16;
import 'package:stackwallet/services/wallets_service.dart' as _i14;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/biometrics.dart' as _i13;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10;
import 'package:stackwallet/utilities/prefs.dart' as _i2;
// ignore_for_file: type=lint
@ -73,10 +74,20 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance {
);
}
class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount {
_FakeAmount_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [CachedElectrumX].
///
/// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
MockCachedElectrumX() {
_i1.throwOnMissingStub(this);
}
@ -105,15 +116,15 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
),
) as _i2.Prefs);
@override
List<_i7.ElectrumXNode> get failovers => (super.noSuchMethod(
List<_i8.ElectrumXNode> get failovers => (super.noSuchMethod(
Invocation.getter(#failovers),
returnValue: <_i7.ElectrumXNode>[],
) as List<_i7.ElectrumXNode>);
returnValue: <_i8.ElectrumXNode>[],
) as List<_i8.ElectrumXNode>);
@override
_i8.Future<Map<String, dynamic>> getAnonymitySet({
_i9.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i9.Coin? coin,
required _i10.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -126,8 +137,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
},
),
returnValue:
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>);
@override
String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method(
@ -145,9 +156,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
returnValue: '',
) as String);
@override
_i8.Future<Map<String, dynamic>> getTransaction({
_i9.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
required _i9.Coin? coin,
required _i10.Coin? coin,
bool? verbose = true,
}) =>
(super.noSuchMethod(
@ -161,11 +172,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
},
),
returnValue:
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>);
@override
_i8.Future<List<dynamic>> getUsedCoinSerials({
required _i9.Coin? coin,
_i9.Future<List<dynamic>> getUsedCoinSerials({
required _i10.Coin? coin,
int? startNumber = 0,
}) =>
(super.noSuchMethod(
@ -177,43 +188,43 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber,
},
),
returnValue: _i8.Future<List<dynamic>>.value(<dynamic>[]),
) as _i8.Future<List<dynamic>>);
returnValue: _i9.Future<List<dynamic>>.value(<dynamic>[]),
) as _i9.Future<List<dynamic>>);
@override
_i8.Future<void> clearSharedTransactionCache({required _i9.Coin? coin}) =>
_i9.Future<void> clearSharedTransactionCache({required _i10.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#clearSharedTransactionCache,
[],
{#coin: coin},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
}
/// A class which mocks [LocalAuthentication].
///
/// See the documentation for Mockito's code generation for more information.
class MockLocalAuthentication extends _i1.Mock
implements _i10.LocalAuthentication {
implements _i11.LocalAuthentication {
MockLocalAuthentication() {
_i1.throwOnMissingStub(this);
}
@override
_i8.Future<bool> get canCheckBiometrics => (super.noSuchMethod(
_i9.Future<bool> get canCheckBiometrics => (super.noSuchMethod(
Invocation.getter(#canCheckBiometrics),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<bool> authenticateWithBiometrics({
_i9.Future<bool> authenticateWithBiometrics({
required String? localizedReason,
bool? useErrorDialogs = true,
bool? stickyAuth = false,
_i11.AndroidAuthMessages? androidAuthStrings =
const _i11.AndroidAuthMessages(),
_i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(),
_i12.AndroidAuthMessages? androidAuthStrings =
const _i12.AndroidAuthMessages(),
_i12.IOSAuthMessages? iOSAuthStrings = const _i12.IOSAuthMessages(),
bool? sensitiveTransaction = true,
}) =>
(super.noSuchMethod(
@ -229,16 +240,16 @@ class MockLocalAuthentication extends _i1.Mock
#sensitiveTransaction: sensitiveTransaction,
},
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<bool> authenticate({
_i9.Future<bool> authenticate({
required String? localizedReason,
bool? useErrorDialogs = true,
bool? stickyAuth = false,
_i11.AndroidAuthMessages? androidAuthStrings =
const _i11.AndroidAuthMessages(),
_i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(),
_i12.AndroidAuthMessages? androidAuthStrings =
const _i12.AndroidAuthMessages(),
_i12.IOSAuthMessages? iOSAuthStrings = const _i12.IOSAuthMessages(),
bool? sensitiveTransaction = true,
bool? biometricOnly = false,
}) =>
@ -256,46 +267,46 @@ class MockLocalAuthentication extends _i1.Mock
#biometricOnly: biometricOnly,
},
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<bool> stopAuthentication() => (super.noSuchMethod(
_i9.Future<bool> stopAuthentication() => (super.noSuchMethod(
Invocation.method(
#stopAuthentication,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<bool> isDeviceSupported() => (super.noSuchMethod(
_i9.Future<bool> isDeviceSupported() => (super.noSuchMethod(
Invocation.method(
#isDeviceSupported,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<List<_i10.BiometricType>> getAvailableBiometrics() =>
_i9.Future<List<_i11.BiometricType>> getAvailableBiometrics() =>
(super.noSuchMethod(
Invocation.method(
#getAvailableBiometrics,
[],
),
returnValue:
_i8.Future<List<_i10.BiometricType>>.value(<_i10.BiometricType>[]),
) as _i8.Future<List<_i10.BiometricType>>);
_i9.Future<List<_i11.BiometricType>>.value(<_i11.BiometricType>[]),
) as _i9.Future<List<_i11.BiometricType>>);
}
/// A class which mocks [Biometrics].
///
/// See the documentation for Mockito's code generation for more information.
class MockBiometrics extends _i1.Mock implements _i12.Biometrics {
class MockBiometrics extends _i1.Mock implements _i13.Biometrics {
MockBiometrics() {
_i1.throwOnMissingStub(this);
}
@override
_i8.Future<bool> authenticate({
_i9.Future<bool> authenticate({
required String? cancelButtonText,
required String? localizedReason,
required String? title,
@ -310,28 +321,28 @@ class MockBiometrics extends _i1.Mock implements _i12.Biometrics {
#title: title,
},
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i13.WalletsService {
class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
@override
_i8.Future<Map<String, _i13.WalletInfo>> get walletNames =>
_i9.Future<Map<String, _i14.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i8.Future<Map<String, _i13.WalletInfo>>.value(
<String, _i13.WalletInfo>{}),
) as _i8.Future<Map<String, _i13.WalletInfo>>);
returnValue: _i9.Future<Map<String, _i14.WalletInfo>>.value(
<String, _i14.WalletInfo>{}),
) as _i9.Future<Map<String, _i14.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<bool> renameWallet({
_i9.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -346,21 +357,21 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
Map<String, _i13.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i14.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i13.WalletInfo>{},
) as Map<String, _i13.WalletInfo>);
returnValue: <String, _i14.WalletInfo>{},
) as Map<String, _i14.WalletInfo>);
@override
_i8.Future<void> addExistingStackWallet({
_i9.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i9.Coin? coin,
required _i10.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -374,13 +385,13 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<String?> addNewWallet({
_i9.Future<String?> addNewWallet({
required String? name,
required _i9.Coin? coin,
required _i10.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -393,46 +404,46 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
_i8.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i9.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
returnValue: _i9.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>);
@override
_i8.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i9.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i9.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i9.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> moveFavorite({
_i9.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -445,48 +456,48 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i9.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i9.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
_i8.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i9.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> setMnemonicVerified({required String? walletId}) =>
_i9.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<int> deleteWallet(
_i9.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -498,20 +509,20 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<int>.value(0),
) as _i9.Future<int>);
@override
_i8.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i9.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i14.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -519,7 +530,7 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -547,7 +558,7 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i15.Manager {
class MockManager extends _i1.Mock implements _i16.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -575,10 +586,10 @@ class MockManager extends _i1.Mock implements _i15.Manager {
returnValue: false,
) as bool);
@override
_i9.Coin get coin => (super.noSuchMethod(
_i10.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i9.Coin.bitcoin,
) as _i9.Coin);
returnValue: _i10.Coin.bitcoin,
) as _i10.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -611,23 +622,23 @@ class MockManager extends _i1.Mock implements _i15.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
_i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this,
Invocation.getter(#fees),
)),
) as _i8.Future<_i4.FeeObject>);
) as _i9.Future<_i4.FeeObject>);
@override
_i8.Future<int> get maxFee => (super.noSuchMethod(
_i9.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<int>.value(0),
) as _i9.Future<int>);
@override
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i9.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -637,16 +648,16 @@ class MockManager extends _i1.Mock implements _i15.Manager {
),
) as _i5.Balance);
@override
_i8.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i9.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i8.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i8.Future<List<_i16.Transaction>>);
_i9.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i9.Future<List<_i17.Transaction>>);
@override
_i8.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i9.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i8.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i8.Future<List<_i16.UTXO>>);
returnValue: _i9.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i9.Future<List<_i17.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -666,15 +677,15 @@ class MockManager extends _i1.Mock implements _i15.Manager {
returnValue: '',
) as String);
@override
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i9.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
returnValue: _i9.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>);
@override
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i9.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -711,19 +722,29 @@ class MockManager extends _i1.Mock implements _i15.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i9.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i9.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -733,9 +754,9 @@ class MockManager extends _i1.Mock implements _i15.Manager {
returnValueForMissingStub: null,
);
@override
_i8.Future<Map<String, dynamic>> prepareSend({
_i9.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i6.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -744,32 +765,32 @@ class MockManager extends _i1.Mock implements _i15.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>);
@override
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i9.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
returnValue: _i9.Future<String>.value(''),
) as _i9.Future<String>);
@override
_i8.Future<void> refresh() => (super.noSuchMethod(
_i9.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -779,33 +800,33 @@ class MockManager extends _i1.Mock implements _i15.Manager {
returnValue: false,
) as bool);
@override
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i9.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> initializeNew() => (super.noSuchMethod(
_i9.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
_i9.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> recoverFromMnemonic({
_i9.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -824,20 +845,20 @@ class MockManager extends _i1.Mock implements _i15.Manager {
#height: height,
},
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i9.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<void> fullRescan(
_i9.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -849,43 +870,52 @@ class MockManager extends _i1.Mock implements _i15.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i8.Future<int> estimateFeeFor(
int? satoshiAmount,
_i9.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i9.Future<_i6.Amount>);
@override
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i9.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i9.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
void addListener(_i14.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -893,7 +923,7 @@ class MockManager extends _i1.Mock implements _i15.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,17 +3,18 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i6;
import 'dart:ui' as _i8;
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i9;
import 'package:stackwallet/services/wallets_service.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
import 'package:stackwallet/services/coins/manager.dart' as _i10;
import 'package:stackwallet/services/wallets_service.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -57,24 +58,34 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [WalletsService].
///
/// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
@override
_i6.Future<Map<String, _i5.WalletInfo>> get walletNames =>
_i7.Future<Map<String, _i6.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i6.Future<Map<String, _i5.WalletInfo>>.value(
<String, _i5.WalletInfo>{}),
) as _i6.Future<Map<String, _i5.WalletInfo>>);
returnValue: _i7.Future<Map<String, _i6.WalletInfo>>.value(
<String, _i6.WalletInfo>{}),
) as _i7.Future<Map<String, _i6.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<bool> renameWallet({
_i7.Future<bool> renameWallet({
required String? from,
required String? to,
required bool? shouldNotifyListeners,
@ -89,21 +100,21 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
Map<String, _i5.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Map<String, _i6.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method(
#fetchWalletsData,
[],
),
returnValue: <String, _i5.WalletInfo>{},
) as Map<String, _i5.WalletInfo>);
returnValue: <String, _i6.WalletInfo>{},
) as Map<String, _i6.WalletInfo>);
@override
_i6.Future<void> addExistingStackWallet({
_i7.Future<void> addExistingStackWallet({
required String? name,
required String? walletId,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -117,13 +128,13 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<String?> addNewWallet({
_i7.Future<String?> addNewWallet({
required String? name,
required _i7.Coin? coin,
required _i8.Coin? coin,
required bool? shouldNotifyListeners,
}) =>
(super.noSuchMethod(
@ -136,46 +147,46 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners,
},
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
_i7.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method(
#getFavoriteWalletIds,
[],
),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
_i7.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod(
Invocation.method(
#saveFavoriteWalletIds,
[walletIds],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#addFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
_i7.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method(
#removeFavorite,
[walletId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> moveFavorite({
_i7.Future<void> moveFavorite({
required int? fromIndex,
required int? toIndex,
}) =>
@ -188,48 +199,48 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
#toIndex: toIndex,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
_i7.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method(
#checkForDuplicate,
[name],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
_i7.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method(
#getWalletId,
[walletName],
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i6.Future<bool> isMnemonicVerified({required String? walletId}) =>
_i7.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#isMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> setMnemonicVerified({required String? walletId}) =>
_i7.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod(
Invocation.method(
#setMnemonicVerified,
[],
{#walletId: walletId},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> deleteWallet(
_i7.Future<int> deleteWallet(
String? name,
bool? shouldNotifyListeners,
) =>
@ -241,20 +252,20 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
shouldNotifyListeners,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
_i7.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod(
Invocation.method(
#refreshWallets,
[shouldNotifyListeners],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -262,7 +273,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -290,7 +301,7 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService {
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i9.Manager {
class MockManager extends _i1.Mock implements _i10.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -318,10 +329,10 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i7.Coin get coin => (super.noSuchMethod(
_i8.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
returnValue: _i8.Coin.bitcoin,
) as _i8.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -354,23 +365,23 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i6.Future<_i3.FeeObject>);
) as _i7.Future<_i3.FeeObject>);
@override
_i6.Future<int> get maxFee => (super.noSuchMethod(
_i7.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
@override
_i6.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -380,16 +391,16 @@ class MockManager extends _i1.Mock implements _i9.Manager {
),
) as _i4.Balance);
@override
_i6.Future<List<_i10.Transaction>> get transactions => (super.noSuchMethod(
_i7.Future<List<_i11.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i6.Future<List<_i10.Transaction>>.value(<_i10.Transaction>[]),
) as _i6.Future<List<_i10.Transaction>>);
_i7.Future<List<_i11.Transaction>>.value(<_i11.Transaction>[]),
) as _i7.Future<List<_i11.Transaction>>);
@override
_i6.Future<List<_i10.UTXO>> get utxos => (super.noSuchMethod(
_i7.Future<List<_i11.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i6.Future<List<_i10.UTXO>>.value(<_i10.UTXO>[]),
) as _i6.Future<List<_i10.UTXO>>);
returnValue: _i7.Future<List<_i11.UTXO>>.value(<_i11.UTXO>[]),
) as _i7.Future<List<_i11.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -409,15 +420,15 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: '',
) as String);
@override
_i6.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i6.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -454,19 +465,29 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i7.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -476,9 +497,9 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
_i6.Future<Map<String, dynamic>> prepareSend({
_i7.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -487,32 +508,32 @@ class MockManager extends _i1.Mock implements _i9.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>);
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
@override
_i6.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i6.Future<String>.value(''),
) as _i6.Future<String>);
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
@override
_i6.Future<void> refresh() => (super.noSuchMethod(
_i7.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -522,33 +543,33 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValue: false,
) as bool);
@override
_i6.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> initializeNew() => (super.noSuchMethod(
_i7.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> initializeExisting() => (super.noSuchMethod(
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> recoverFromMnemonic({
_i7.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -567,20 +588,20 @@ class MockManager extends _i1.Mock implements _i9.Manager {
#height: height,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<void> fullRescan(
_i7.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -592,43 +613,52 @@ class MockManager extends _i1.Mock implements _i9.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.Future<int> estimateFeeFor(
int? satoshiAmount,
_i7.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i6.Future<int>.value(0),
) as _i6.Future<int>);
returnValue: _i7.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i7.Future<_i5.Amount>);
@override
_i6.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i6.Future<bool>.value(false),
) as _i6.Future<bool>);
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
@override
_i6.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -636,7 +666,7 @@ class MockManager extends _i1.Mock implements _i9.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,18 +3,19 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i5;
import 'package:stackwallet/services/locale_service.dart' as _i11;
import 'package:stackwallet/services/notes_service.dart' as _i10;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/services/coins/manager.dart' as _i6;
import 'package:stackwallet/services/locale_service.dart' as _i12;
import 'package:stackwallet/services/notes_service.dart' as _i11;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -58,10 +59,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i5.Manager {
class MockManager extends _i1.Mock implements _i6.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -89,10 +100,10 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i6.Coin get coin => (super.noSuchMethod(
_i7.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i6.Coin.bitcoin,
) as _i6.Coin);
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -125,23 +136,23 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i3.FeeObject>);
) as _i8.Future<_i3.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -151,16 +162,16 @@ class MockManager extends _i1.Mock implements _i5.Manager {
),
) as _i4.Balance);
@override
_i7.Future<List<_i8.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i9.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i8.Transaction>>.value(<_i8.Transaction>[]),
) as _i7.Future<List<_i8.Transaction>>);
_i8.Future<List<_i9.Transaction>>.value(<_i9.Transaction>[]),
) as _i8.Future<List<_i9.Transaction>>);
@override
_i7.Future<List<_i8.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i9.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i8.UTXO>>.value(<_i8.UTXO>[]),
) as _i7.Future<List<_i8.UTXO>>);
returnValue: _i8.Future<List<_i9.UTXO>>.value(<_i9.UTXO>[]),
) as _i8.Future<List<_i9.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -180,15 +191,15 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -225,19 +236,29 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -247,9 +268,9 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -258,32 +279,32 @@ class MockManager extends _i1.Mock implements _i5.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -293,33 +314,33 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -338,20 +359,20 @@ class MockManager extends _i1.Mock implements _i5.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -363,43 +384,52 @@ class MockManager extends _i1.Mock implements _i5.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i5.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -407,7 +437,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -427,7 +457,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
/// A class which mocks [NotesService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNotesService extends _i1.Mock implements _i10.NotesService {
class MockNotesService extends _i1.Mock implements _i11.NotesService {
@override
String get walletId => (super.noSuchMethod(
Invocation.getter(#walletId),
@ -439,34 +469,34 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
returnValue: <String, String>{},
) as Map<String, String>);
@override
_i7.Future<Map<String, String>> get notes => (super.noSuchMethod(
_i8.Future<Map<String, String>> get notes => (super.noSuchMethod(
Invocation.getter(#notes),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
_i8.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
_i7.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
_i8.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#getNoteFor,
[],
{#txid: txid},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> editOrAddNote({
_i8.Future<void> editOrAddNote({
required String? txid,
required String? note,
}) =>
@ -479,21 +509,21 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
#note: note,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
_i8.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#deleteNote,
[],
{#txid: txid},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -501,7 +531,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -529,7 +559,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
/// A class which mocks [LocaleService].
///
/// See the documentation for Mockito's code generation for more information.
class MockLocaleService extends _i1.Mock implements _i11.LocaleService {
class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
@override
String get locale => (super.noSuchMethod(
Invocation.getter(#locale),
@ -541,17 +571,17 @@ class MockLocaleService extends _i1.Mock implements _i11.LocaleService {
returnValue: false,
) as bool);
@override
_i7.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
_i8.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
Invocation.method(
#loadLocale,
[],
{#notify: notify},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -559,7 +589,7 @@ class MockLocaleService extends _i1.Mock implements _i11.LocaleService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,17 +3,18 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i5;
import 'package:stackwallet/services/notes_service.dart' as _i10;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/services/coins/manager.dart' as _i6;
import 'package:stackwallet/services/notes_service.dart' as _i11;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -57,10 +58,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i5.Manager {
class MockManager extends _i1.Mock implements _i6.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -88,10 +99,10 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i6.Coin get coin => (super.noSuchMethod(
_i7.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i6.Coin.bitcoin,
) as _i6.Coin);
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -124,23 +135,23 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i3.FeeObject>);
) as _i8.Future<_i3.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -150,16 +161,16 @@ class MockManager extends _i1.Mock implements _i5.Manager {
),
) as _i4.Balance);
@override
_i7.Future<List<_i8.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i9.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i8.Transaction>>.value(<_i8.Transaction>[]),
) as _i7.Future<List<_i8.Transaction>>);
_i8.Future<List<_i9.Transaction>>.value(<_i9.Transaction>[]),
) as _i8.Future<List<_i9.Transaction>>);
@override
_i7.Future<List<_i8.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i9.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i8.UTXO>>.value(<_i8.UTXO>[]),
) as _i7.Future<List<_i8.UTXO>>);
returnValue: _i8.Future<List<_i9.UTXO>>.value(<_i9.UTXO>[]),
) as _i8.Future<List<_i9.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -179,15 +190,15 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -224,19 +235,29 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -246,9 +267,9 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -257,32 +278,32 @@ class MockManager extends _i1.Mock implements _i5.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -292,33 +313,33 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -337,20 +358,20 @@ class MockManager extends _i1.Mock implements _i5.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -362,43 +383,52 @@ class MockManager extends _i1.Mock implements _i5.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i5.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -406,7 +436,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -426,7 +456,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
/// A class which mocks [NotesService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNotesService extends _i1.Mock implements _i10.NotesService {
class MockNotesService extends _i1.Mock implements _i11.NotesService {
@override
String get walletId => (super.noSuchMethod(
Invocation.getter(#walletId),
@ -438,34 +468,34 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
returnValue: <String, String>{},
) as Map<String, String>);
@override
_i7.Future<Map<String, String>> get notes => (super.noSuchMethod(
_i8.Future<Map<String, String>> get notes => (super.noSuchMethod(
Invocation.getter(#notes),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
_i8.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
_i7.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
_i8.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#getNoteFor,
[],
{#txid: txid},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> editOrAddNote({
_i8.Future<void> editOrAddNote({
required String? txid,
required String? note,
}) =>
@ -478,21 +508,21 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
#note: note,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
_i8.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#deleteNote,
[],
{#txid: txid},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -500,7 +530,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,16 +3,17 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/services/coins/manager.dart' as _i6;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -56,10 +57,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i5.Manager {
class MockManager extends _i1.Mock implements _i6.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -87,10 +98,10 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i6.Coin get coin => (super.noSuchMethod(
_i7.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i6.Coin.bitcoin,
) as _i6.Coin);
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -123,23 +134,23 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i3.FeeObject>);
) as _i8.Future<_i3.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -149,16 +160,16 @@ class MockManager extends _i1.Mock implements _i5.Manager {
),
) as _i4.Balance);
@override
_i7.Future<List<_i8.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i9.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i8.Transaction>>.value(<_i8.Transaction>[]),
) as _i7.Future<List<_i8.Transaction>>);
_i8.Future<List<_i9.Transaction>>.value(<_i9.Transaction>[]),
) as _i8.Future<List<_i9.Transaction>>);
@override
_i7.Future<List<_i8.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i9.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i8.UTXO>>.value(<_i8.UTXO>[]),
) as _i7.Future<List<_i8.UTXO>>);
returnValue: _i8.Future<List<_i9.UTXO>>.value(<_i9.UTXO>[]),
) as _i8.Future<List<_i9.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -178,15 +189,15 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -223,19 +234,29 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -245,9 +266,9 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -256,32 +277,32 @@ class MockManager extends _i1.Mock implements _i5.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -291,33 +312,33 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -336,20 +357,20 @@ class MockManager extends _i1.Mock implements _i5.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -361,43 +382,52 @@ class MockManager extends _i1.Mock implements _i5.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i5.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -405,7 +435,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,19 +3,20 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i11;
import 'dart:async' as _i8;
import 'dart:ui' as _i12;
import 'package:barcode_scan2/barcode_scan2.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i10;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i11;
import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i8;
import 'package:stackwallet/services/notes_service.dart' as _i12;
import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i6;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
import 'package:stackwallet/services/coins/manager.dart' as _i9;
import 'package:stackwallet/services/notes_service.dart' as _i13;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -69,17 +70,27 @@ class _FakeBalance_3 extends _i1.SmartFake implements _i5.Balance {
);
}
class _FakeAmount_4 extends _i1.SmartFake implements _i6.Amount {
_FakeAmount_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [BarcodeScannerWrapper].
///
/// See the documentation for Mockito's code generation for more information.
class MockBarcodeScannerWrapper extends _i1.Mock
implements _i6.BarcodeScannerWrapper {
implements _i7.BarcodeScannerWrapper {
MockBarcodeScannerWrapper() {
_i1.throwOnMissingStub(this);
}
@override
_i7.Future<_i2.ScanResult> scan(
_i8.Future<_i2.ScanResult> scan(
{_i2.ScanOptions? options = const _i2.ScanOptions()}) =>
(super.noSuchMethod(
Invocation.method(
@ -87,7 +98,7 @@ class MockBarcodeScannerWrapper extends _i1.Mock
[],
{#options: options},
),
returnValue: _i7.Future<_i2.ScanResult>.value(_FakeScanResult_0(
returnValue: _i8.Future<_i2.ScanResult>.value(_FakeScanResult_0(
this,
Invocation.method(
#scan,
@ -95,13 +106,13 @@ class MockBarcodeScannerWrapper extends _i1.Mock
{#options: options},
),
)),
) as _i7.Future<_i2.ScanResult>);
) as _i8.Future<_i2.ScanResult>);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i8.Manager {
class MockManager extends _i1.Mock implements _i9.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -129,10 +140,10 @@ class MockManager extends _i1.Mock implements _i8.Manager {
returnValue: false,
) as bool);
@override
_i9.Coin get coin => (super.noSuchMethod(
_i10.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i9.Coin.bitcoin,
) as _i9.Coin);
returnValue: _i10.Coin.bitcoin,
) as _i10.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -165,23 +176,23 @@ class MockManager extends _i1.Mock implements _i8.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i4.FeeObject>);
) as _i8.Future<_i4.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -191,16 +202,16 @@ class MockManager extends _i1.Mock implements _i8.Manager {
),
) as _i5.Balance);
@override
_i7.Future<List<_i10.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i11.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i10.Transaction>>.value(<_i10.Transaction>[]),
) as _i7.Future<List<_i10.Transaction>>);
_i8.Future<List<_i11.Transaction>>.value(<_i11.Transaction>[]),
) as _i8.Future<List<_i11.Transaction>>);
@override
_i7.Future<List<_i10.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i11.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i10.UTXO>>.value(<_i10.UTXO>[]),
) as _i7.Future<List<_i10.UTXO>>);
returnValue: _i8.Future<List<_i11.UTXO>>.value(<_i11.UTXO>[]),
) as _i8.Future<List<_i11.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -220,15 +231,15 @@ class MockManager extends _i1.Mock implements _i8.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -265,19 +276,29 @@ class MockManager extends _i1.Mock implements _i8.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -287,9 +308,9 @@ class MockManager extends _i1.Mock implements _i8.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i6.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -298,32 +319,32 @@ class MockManager extends _i1.Mock implements _i8.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -333,33 +354,33 @@ class MockManager extends _i1.Mock implements _i8.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -378,20 +399,20 @@ class MockManager extends _i1.Mock implements _i8.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -403,43 +424,52 @@ class MockManager extends _i1.Mock implements _i8.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i6.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -447,7 +477,7 @@ class MockManager extends _i1.Mock implements _i8.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -467,7 +497,7 @@ class MockManager extends _i1.Mock implements _i8.Manager {
/// A class which mocks [NotesService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNotesService extends _i1.Mock implements _i12.NotesService {
class MockNotesService extends _i1.Mock implements _i13.NotesService {
@override
String get walletId => (super.noSuchMethod(
Invocation.getter(#walletId),
@ -479,34 +509,34 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService {
returnValue: <String, String>{},
) as Map<String, String>);
@override
_i7.Future<Map<String, String>> get notes => (super.noSuchMethod(
_i8.Future<Map<String, String>> get notes => (super.noSuchMethod(
Invocation.getter(#notes),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
_i8.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
_i7.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
_i8.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#getNoteFor,
[],
{#txid: txid},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> editOrAddNote({
_i8.Future<void> editOrAddNote({
required String? txid,
required String? note,
}) =>
@ -519,21 +549,21 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService {
#note: note,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
_i8.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#deleteNote,
[],
{#txid: txid},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -541,7 +571,7 @@ class MockNotesService extends _i1.Mock implements _i12.NotesService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,18 +3,19 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:ui' as _i9;
import 'dart:async' as _i8;
import 'dart:ui' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/models/balance.dart' as _i4;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i8;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i9;
import 'package:stackwallet/models/models.dart' as _i3;
import 'package:stackwallet/services/coins/coin_service.dart' as _i2;
import 'package:stackwallet/services/coins/manager.dart' as _i5;
import 'package:stackwallet/services/locale_service.dart' as _i11;
import 'package:stackwallet/services/notes_service.dart' as _i10;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/services/coins/manager.dart' as _i6;
import 'package:stackwallet/services/locale_service.dart' as _i12;
import 'package:stackwallet/services/notes_service.dart' as _i11;
import 'package:stackwallet/utilities/amount/amount.dart' as _i5;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -58,10 +59,20 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i4.Balance {
);
}
class _FakeAmount_3 extends _i1.SmartFake implements _i5.Amount {
_FakeAmount_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [Manager].
///
/// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i5.Manager {
class MockManager extends _i1.Mock implements _i6.Manager {
@override
bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet),
@ -89,10 +100,10 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i6.Coin get coin => (super.noSuchMethod(
_i7.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin),
returnValue: _i6.Coin.bitcoin,
) as _i6.Coin);
returnValue: _i7.Coin.bitcoin,
) as _i7.Coin);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -125,23 +136,23 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
_i8.Future<_i3.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees),
returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
returnValue: _i8.Future<_i3.FeeObject>.value(_FakeFeeObject_1(
this,
Invocation.getter(#fees),
)),
) as _i7.Future<_i3.FeeObject>);
) as _i8.Future<_i3.FeeObject>);
@override
_i7.Future<int> get maxFee => (super.noSuchMethod(
_i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<int>.value(0),
) as _i8.Future<int>);
@override
_i7.Future<String> get currentReceivingAddress => (super.noSuchMethod(
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i4.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance),
@ -151,16 +162,16 @@ class MockManager extends _i1.Mock implements _i5.Manager {
),
) as _i4.Balance);
@override
_i7.Future<List<_i8.Transaction>> get transactions => (super.noSuchMethod(
_i8.Future<List<_i9.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i7.Future<List<_i8.Transaction>>.value(<_i8.Transaction>[]),
) as _i7.Future<List<_i8.Transaction>>);
_i8.Future<List<_i9.Transaction>>.value(<_i9.Transaction>[]),
) as _i8.Future<List<_i9.Transaction>>);
@override
_i7.Future<List<_i8.UTXO>> get utxos => (super.noSuchMethod(
_i8.Future<List<_i9.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i7.Future<List<_i8.UTXO>>.value(<_i8.UTXO>[]),
) as _i7.Future<List<_i8.UTXO>>);
returnValue: _i8.Future<List<_i9.UTXO>>.value(<_i9.UTXO>[]),
) as _i8.Future<List<_i9.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -180,15 +191,15 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: '',
) as String);
@override
_i7.Future<List<String>> get mnemonic => (super.noSuchMethod(
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i8.Future<List<String>>);
@override
_i7.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
returnValue: _i8.Future<String?>.value(),
) as _i8.Future<String?>);
@override
bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected),
@ -225,19 +236,29 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method(
#updateNode,
[shouldRefresh],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
@ -247,9 +268,9 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
_i7.Future<Map<String, dynamic>> prepareSend({
_i8.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i5.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -258,32 +279,32 @@ class MockManager extends _i1.Mock implements _i5.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
returnValue:
_i7.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i7.Future<Map<String, dynamic>>);
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i8.Future<Map<String, dynamic>>);
@override
_i7.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod(
Invocation.method(
#confirmSend,
[],
{#txData: txData},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> refresh() => (super.noSuchMethod(
_i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method(
#refresh,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -293,33 +314,33 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValue: false,
) as bool);
@override
_i7.Future<bool> testNetworkConnection() => (super.noSuchMethod(
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method(
#testNetworkConnection,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> initializeNew() => (super.noSuchMethod(
_i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method(
#initializeNew,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> initializeExisting() => (super.noSuchMethod(
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method(
#initializeExisting,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> recoverFromMnemonic({
_i8.Future<void> recoverFromMnemonic({
required String? mnemonic,
String? mnemonicPassphrase,
required int? maxUnusedAddressGap,
@ -338,20 +359,20 @@ class MockManager extends _i1.Mock implements _i5.Manager {
#height: height,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> exitCurrentWallet() => (super.noSuchMethod(
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method(
#exitCurrentWallet,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> fullRescan(
_i8.Future<void> fullRescan(
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
@ -363,43 +384,52 @@ class MockManager extends _i1.Mock implements _i5.Manager {
maxNumberOfIndexesToCheck,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<int> estimateFeeFor(
int? satoshiAmount,
_i8.Future<_i5.Amount> estimateFeeFor(
_i5.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i7.Future<int>.value(0),
) as _i7.Future<int>);
returnValue: _i8.Future<_i5.Amount>.value(_FakeAmount_3(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i8.Future<_i5.Amount>);
@override
_i7.Future<bool> generateNewAddress() => (super.noSuchMethod(
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
#generateNewAddress,
[],
),
returnValue: _i7.Future<bool>.value(false),
) as _i7.Future<bool>);
returnValue: _i8.Future<bool>.value(false),
) as _i8.Future<bool>);
@override
_i7.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method(
#resetRescanOnOpen,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -407,7 +437,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -427,7 +457,7 @@ class MockManager extends _i1.Mock implements _i5.Manager {
/// A class which mocks [NotesService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNotesService extends _i1.Mock implements _i10.NotesService {
class MockNotesService extends _i1.Mock implements _i11.NotesService {
@override
String get walletId => (super.noSuchMethod(
Invocation.getter(#walletId),
@ -439,34 +469,34 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
returnValue: <String, String>{},
) as Map<String, String>);
@override
_i7.Future<Map<String, String>> get notes => (super.noSuchMethod(
_i8.Future<Map<String, String>> get notes => (super.noSuchMethod(
Invocation.getter(#notes),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i7.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
_i8.Future<Map<String, String>> search(String? text) => (super.noSuchMethod(
Invocation.method(
#search,
[text],
),
returnValue: _i7.Future<Map<String, String>>.value(<String, String>{}),
) as _i7.Future<Map<String, String>>);
returnValue: _i8.Future<Map<String, String>>.value(<String, String>{}),
) as _i8.Future<Map<String, String>>);
@override
_i7.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
_i8.Future<String> getNoteFor({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#getNoteFor,
[],
{#txid: txid},
),
returnValue: _i7.Future<String>.value(''),
) as _i7.Future<String>);
returnValue: _i8.Future<String>.value(''),
) as _i8.Future<String>);
@override
_i7.Future<void> editOrAddNote({
_i8.Future<void> editOrAddNote({
required String? txid,
required String? note,
}) =>
@ -479,21 +509,21 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
#note: note,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
_i7.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
_i8.Future<void> deleteNote({required String? txid}) => (super.noSuchMethod(
Invocation.method(
#deleteNote,
[],
{#txid: txid},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -501,7 +531,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
@ -529,7 +559,7 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService {
/// A class which mocks [LocaleService].
///
/// See the documentation for Mockito's code generation for more information.
class MockLocaleService extends _i1.Mock implements _i11.LocaleService {
class MockLocaleService extends _i1.Mock implements _i12.LocaleService {
@override
String get locale => (super.noSuchMethod(
Invocation.getter(#locale),
@ -541,17 +571,17 @@ class MockLocaleService extends _i1.Mock implements _i11.LocaleService {
returnValue: false,
) as bool);
@override
_i7.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
_i8.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
Invocation.method(
#loadLocale,
[],
{#notify: notify},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i8.Future<void>.value(),
) as _i8.Future<void>);
@override
void addListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -559,7 +589,7 @@ class MockLocaleService extends _i1.Mock implements _i11.LocaleService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,6 +3,7 @@ import 'package:stackwallet/models/isar/models/blockchain_data/transaction.dart'
import 'package:stackwallet/models/isar/models/blockchain_data/utxo.dart';
import 'package:stackwallet/models/paymint/fee_object_model.dart';
import 'package:stackwallet/services/coins/coin_service.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
class FakeCoinServiceAPI extends CoinServiceAPI {
@ -71,7 +72,7 @@ class FakeCoinServiceAPI extends CoinServiceAPI {
}
@override
Future<int> estimateFeeFor(int satoshiAmount, int feeRate) {
Future<Amount> estimateFeeFor(Amount amount, int feeRate) {
// TODO: implement estimateFeeFor
throw UnimplementedError();
}
@ -103,7 +104,7 @@ class FakeCoinServiceAPI extends CoinServiceAPI {
@override
Future<Map<String, dynamic>> prepareSend(
{required String address,
required int amount,
required Amount amount,
Map<String, dynamic>? args}) {
// TODO: implement prepareSend
throw UnimplementedError();

View file

@ -1,3 +1,4 @@
import 'package:decimal/decimal.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
@ -13,6 +14,13 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'manager_test.mocks.dart';
/// quick amount constructor wrapper. Using an int is bad practice but for
/// testing with small amounts this should be fine
Amount _a(int i) => Amount.fromDecimal(
Decimal.fromInt(i),
fractionDigits: 8,
);
@GenerateMocks([FiroWallet, ElectrumX])
void main() {
test("Manager should have a backgroundRefreshListener on initialization", () {
@ -79,20 +87,20 @@ void main() {
when(wallet.balance).thenAnswer(
(_) => Balance(
coin: Coin.firo,
total: 10,
spendable: 1,
blockedTotal: 0,
pendingSpendable: 9,
total: _a(10),
spendable: _a(1),
blockedTotal: _a(0),
pendingSpendable: _a(9),
),
);
final manager = Manager(wallet);
expect(manager.balance.coin, Coin.firo);
expect(manager.balance.total, 10);
expect(manager.balance.spendable, 1);
expect(manager.balance.blockedTotal, 0);
expect(manager.balance.pendingSpendable, 9);
expect(manager.balance.total.raw.toInt(), 10);
expect(manager.balance.spendable.raw.toInt(), 1);
expect(manager.balance.blockedTotal.raw.toInt(), 0);
expect(manager.balance.pendingSpendable.raw.toInt(), 9);
});
});

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,4 @@
import 'package:decimal/decimal.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
@ -12,6 +13,7 @@ import 'package:stackwallet/services/locale_service.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/listenable_list.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
@ -20,6 +22,13 @@ import 'package:stackwallet/widgets/managed_favorite.dart';
import 'managed_favorite_test.mocks.dart';
/// quick amount constructor wrapper. Using an int is bad practice but for
/// testing with small amounts this should be fine
Amount _a(int i) => Amount.fromDecimal(
Decimal.fromInt(i),
fractionDigits: 8,
);
@GenerateMocks([
Wallets,
WalletsService,
@ -45,10 +54,10 @@ void main() {
when(manager.balance).thenAnswer(
(realInvocation) => Balance(
coin: Coin.bitcoin,
total: 10,
spendable: 10,
blockedTotal: 0,
pendingSpendable: 0,
total: _a(10),
spendable: _a(10),
blockedTotal: _a(0),
pendingSpendable: _a(0),
),
);
@ -98,10 +107,10 @@ void main() {
when(manager.balance).thenAnswer(
(realInvocation) => Balance(
coin: Coin.bitcoin,
total: 10,
spendable: 10,
blockedTotal: 0,
pendingSpendable: 0,
total: _a(10),
spendable: _a(10),
blockedTotal: _a(0),
pendingSpendable: _a(0),
),
);
@ -169,10 +178,10 @@ void main() {
when(manager.balance).thenAnswer(
(realInvocation) => Balance(
coin: Coin.bitcoin,
total: 10,
spendable: 10,
blockedTotal: 0,
pendingSpendable: 0,
total: _a(10),
spendable: _a(10),
blockedTotal: _a(0),
pendingSpendable: _a(0),
),
);

File diff suppressed because it is too large Load diff

View file

@ -11,6 +11,7 @@ import 'package:stackwallet/services/coins/coin_service.dart';
import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
@ -40,10 +41,10 @@ void main() {
when(wallet.balance).thenAnswer(
(_) => Balance(
coin: Coin.bitcoin,
total: 0,
spendable: 0,
blockedTotal: 0,
pendingSpendable: 0,
total: Amount.zero,
spendable: Amount.zero,
blockedTotal: Amount.zero,
pendingSpendable: Amount.zero,
),
);

File diff suppressed because it is too large Load diff

View file

@ -6,13 +6,13 @@
import 'dart:async' as _i18;
import 'dart:ui' as _i20;
import 'package:decimal/decimal.dart' as _i14;
import 'package:decimal/decimal.dart' as _i29;
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/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/db/isar/main_db.dart' as _i14;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i13;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i12;
import 'package:stackwallet/models/balance.dart' as _i9;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i21;
import 'package:stackwallet/models/models.dart' as _i8;
@ -22,12 +22,13 @@ 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 _i29;
import 'package:stackwallet/services/notes_service.dart' as _i30;
import 'package:stackwallet/services/price_service.dart' as _i28;
import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i10;
as _i11;
import 'package:stackwallet/services/wallets.dart' as _i16;
import 'package:stackwallet/services/wallets_service.dart' as _i2;
import 'package:stackwallet/utilities/amount/amount.dart' as _i10;
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;
@ -119,9 +120,8 @@ class _FakeBalance_6 extends _i1.SmartFake implements _i9.Balance {
);
}
class _FakeTransactionNotificationTracker_7 extends _i1.SmartFake
implements _i10.TransactionNotificationTracker {
_FakeTransactionNotificationTracker_7(
class _FakeAmount_7 extends _i1.SmartFake implements _i10.Amount {
_FakeAmount_7(
Object parent,
Invocation parentInvocation,
) : super(
@ -130,8 +130,9 @@ class _FakeTransactionNotificationTracker_7 extends _i1.SmartFake
);
}
class _FakeElectrumX_8 extends _i1.SmartFake implements _i11.ElectrumX {
_FakeElectrumX_8(
class _FakeTransactionNotificationTracker_8 extends _i1.SmartFake
implements _i11.TransactionNotificationTracker {
_FakeTransactionNotificationTracker_8(
Object parent,
Invocation parentInvocation,
) : super(
@ -140,9 +141,8 @@ class _FakeElectrumX_8 extends _i1.SmartFake implements _i11.ElectrumX {
);
}
class _FakeCachedElectrumX_9 extends _i1.SmartFake
implements _i12.CachedElectrumX {
_FakeCachedElectrumX_9(
class _FakeElectrumX_9 extends _i1.SmartFake implements _i12.ElectrumX {
_FakeElectrumX_9(
Object parent,
Invocation parentInvocation,
) : super(
@ -151,8 +151,9 @@ class _FakeCachedElectrumX_9 extends _i1.SmartFake
);
}
class _FakeMainDB_10 extends _i1.SmartFake implements _i13.MainDB {
_FakeMainDB_10(
class _FakeCachedElectrumX_10 extends _i1.SmartFake
implements _i13.CachedElectrumX {
_FakeCachedElectrumX_10(
Object parent,
Invocation parentInvocation,
) : super(
@ -161,8 +162,8 @@ class _FakeMainDB_10 extends _i1.SmartFake implements _i13.MainDB {
);
}
class _FakeDecimal_11 extends _i1.SmartFake implements _i14.Decimal {
_FakeDecimal_11(
class _FakeMainDB_11 extends _i1.SmartFake implements _i14.MainDB {
_FakeMainDB_11(
Object parent,
Invocation parentInvocation,
) : super(
@ -571,6 +572,16 @@ class MockManager extends _i1.Mock implements _i6.Manager {
returnValue: 0,
) as int);
@override
bool get hasXPub => (super.noSuchMethod(
Invocation.getter(#hasXPub),
returnValue: false,
) as bool);
@override
_i18.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i18.Future<String>.value(''),
) as _i18.Future<String>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
@ -595,7 +606,7 @@ class MockManager extends _i1.Mock implements _i6.Manager {
@override
_i18.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i10.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -604,7 +615,7 @@ class MockManager extends _i1.Mock implements _i6.Manager {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
@ -713,20 +724,29 @@ class MockManager extends _i1.Mock implements _i6.Manager {
returnValueForMissingStub: _i18.Future<void>.value(),
) as _i18.Future<void>);
@override
_i18.Future<int> estimateFeeFor(
int? satoshiAmount,
_i18.Future<_i10.Amount> estimateFeeFor(
_i10.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i18.Future<int>.value(0),
) as _i18.Future<int>);
returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i18.Future<_i10.Amount>);
@override
_i18.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
@ -911,7 +931,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI {
@override
_i18.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i10.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -920,7 +940,7 @@ class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
@ -1038,20 +1058,29 @@ class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI {
returnValueForMissingStub: _i18.Future<void>.value(),
) as _i18.Future<void>);
@override
_i18.Future<int> estimateFeeFor(
int? satoshiAmount,
_i18.Future<_i10.Amount> estimateFeeFor(
_i10.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i18.Future<int>.value(0),
) as _i18.Future<int>);
returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i18.Future<_i10.Amount>);
@override
_i18.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method(
@ -1089,15 +1118,15 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
returnValueForMissingStub: null,
);
@override
_i10.TransactionNotificationTracker get txTracker => (super.noSuchMethod(
_i11.TransactionNotificationTracker get txTracker => (super.noSuchMethod(
Invocation.getter(#txTracker),
returnValue: _FakeTransactionNotificationTracker_7(
returnValue: _FakeTransactionNotificationTracker_8(
this,
Invocation.getter(#txTracker),
),
) as _i10.TransactionNotificationTracker);
) as _i11.TransactionNotificationTracker);
@override
set txTracker(_i10.TransactionNotificationTracker? _txTracker) =>
set txTracker(_i11.TransactionNotificationTracker? _txTracker) =>
super.noSuchMethod(
Invocation.setter(
#txTracker,
@ -1237,21 +1266,21 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
returnValue: false,
) as bool);
@override
_i11.ElectrumX get electrumXClient => (super.noSuchMethod(
_i12.ElectrumX get electrumXClient => (super.noSuchMethod(
Invocation.getter(#electrumXClient),
returnValue: _FakeElectrumX_8(
returnValue: _FakeElectrumX_9(
this,
Invocation.getter(#electrumXClient),
),
) as _i11.ElectrumX);
) as _i12.ElectrumX);
@override
_i12.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod(
_i13.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod(
Invocation.getter(#cachedElectrumXClient),
returnValue: _FakeCachedElectrumX_9(
returnValue: _FakeCachedElectrumX_10(
this,
Invocation.getter(#cachedElectrumXClient),
),
) as _i12.CachedElectrumX);
) as _i13.CachedElectrumX);
@override
bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing),
@ -1300,6 +1329,11 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
_i18.Future<List<_i21.Transaction>>.value(<_i21.Transaction>[]),
) as _i18.Future<List<_i21.Transaction>>);
@override
_i18.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub),
returnValue: _i18.Future<String>.value(''),
) as _i18.Future<String>);
@override
set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) =>
super.noSuchMethod(
Invocation.setter(
@ -1309,13 +1343,13 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
returnValueForMissingStub: null,
);
@override
_i13.MainDB get db => (super.noSuchMethod(
_i14.MainDB get db => (super.noSuchMethod(
Invocation.getter(#db),
returnValue: _FakeMainDB_10(
returnValue: _FakeMainDB_11(
this,
Invocation.getter(#db),
),
) as _i13.MainDB);
) as _i14.MainDB);
@override
bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method(
@ -1361,7 +1395,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
@override
_i18.Future<Map<String, dynamic>> prepareSendPublic({
required String? address,
required int? amount,
required _i10.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -1370,7 +1404,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
@ -1390,7 +1424,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
@override
_i18.Future<Map<String, dynamic>> prepareSend({
required String? address,
required int? amount,
required _i10.Amount? amount,
Map<String, dynamic>? args,
}) =>
(super.noSuchMethod(
@ -1399,7 +1433,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
[],
{
#address: address,
#satoshiAmount: amount,
#amount: amount,
#args: args,
},
),
@ -1734,37 +1768,55 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
returnValue: _i18.Future<int>.value(0),
) as _i18.Future<int>);
@override
_i18.Future<int> estimateFeeFor(
int? satoshiAmount,
_i18.Future<_i10.Amount> estimateFeeFor(
_i10.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeFor,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i18.Future<int>.value(0),
) as _i18.Future<int>);
returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7(
this,
Invocation.method(
#estimateFeeFor,
[
amount,
feeRate,
],
),
)),
) as _i18.Future<_i10.Amount>);
@override
_i18.Future<int> estimateFeeForPublic(
int? satoshiAmount,
_i18.Future<_i10.Amount> estimateFeeForPublic(
_i10.Amount? amount,
int? feeRate,
) =>
(super.noSuchMethod(
Invocation.method(
#estimateFeeForPublic,
[
satoshiAmount,
amount,
feeRate,
],
),
returnValue: _i18.Future<int>.value(0),
) as _i18.Future<int>);
returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7(
this,
Invocation.method(
#estimateFeeForPublic,
[
amount,
feeRate,
],
),
)),
) as _i18.Future<_i10.Amount>);
@override
int roughFeeEstimate(
_i10.Amount roughFeeEstimate(
int? inputCount,
int? outputCount,
int? feeRatePerKB,
@ -1778,16 +1830,33 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
feeRatePerKB,
],
),
returnValue: 0,
) as int);
returnValue: _FakeAmount_7(
this,
Invocation.method(
#roughFeeEstimate,
[
inputCount,
outputCount,
feeRatePerKB,
],
),
),
) as _i10.Amount);
@override
_i18.Future<int> sweepAllEstimate(int? feeRate) => (super.noSuchMethod(
_i18.Future<_i10.Amount> sweepAllEstimate(int? feeRate) =>
(super.noSuchMethod(
Invocation.method(
#sweepAllEstimate,
[feeRate],
),
returnValue: _i18.Future<int>.value(0),
) as _i18.Future<int>);
returnValue: _i18.Future<_i10.Amount>.value(_FakeAmount_7(
this,
Invocation.method(
#sweepAllEstimate,
[feeRate],
),
)),
) as _i18.Future<_i10.Amount>);
@override
_i18.Future<List<Map<String, dynamic>>> fastFetch(
List<String>? allTxHashes) =>
@ -1801,7 +1870,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
) as _i18.Future<List<Map<String, dynamic>>>);
@override
_i18.Future<Map<_i21.Address, _i21.Transaction>> getJMintTransactions(
_i12.CachedElectrumX? cachedClient,
_i13.CachedElectrumX? cachedClient,
List<String>? transactions,
_i17.Coin? coin,
) =>
@ -1826,33 +1895,33 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
returnValue: _i18.Future<bool>.value(false),
) as _i18.Future<bool>);
@override
_i14.Decimal availablePrivateBalance() => (super.noSuchMethod(
_i10.Amount availablePrivateBalance() => (super.noSuchMethod(
Invocation.method(
#availablePrivateBalance,
[],
),
returnValue: _FakeDecimal_11(
returnValue: _FakeAmount_7(
this,
Invocation.method(
#availablePrivateBalance,
[],
),
),
) as _i14.Decimal);
) as _i10.Amount);
@override
_i14.Decimal availablePublicBalance() => (super.noSuchMethod(
_i10.Amount availablePublicBalance() => (super.noSuchMethod(
Invocation.method(
#availablePublicBalance,
[],
),
returnValue: _FakeDecimal_11(
returnValue: _FakeAmount_7(
this,
Invocation.method(
#availablePublicBalance,
[],
),
),
) as _i14.Decimal);
) as _i10.Amount);
@override
void initCache(
String? walletId,
@ -1980,7 +2049,7 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
returnValueForMissingStub: _i18.Future<void>.value(),
) as _i18.Future<void>);
@override
void initWalletDB({_i13.MainDB? mockableOverride}) => super.noSuchMethod(
void initWalletDB({_i14.MainDB? mockableOverride}) => super.noSuchMethod(
Invocation.method(
#initWalletDB,
[],
@ -2546,35 +2615,35 @@ class MockPriceService extends _i1.Mock implements _i28.PriceService {
returnValue: false,
) as bool);
@override
_i15.Tuple2<_i14.Decimal, double> getPrice(_i17.Coin? coin) =>
_i15.Tuple2<_i29.Decimal, double> getPrice(_i17.Coin? coin) =>
(super.noSuchMethod(
Invocation.method(
#getPrice,
[coin],
),
returnValue: _FakeTuple2_13<_i14.Decimal, double>(
returnValue: _FakeTuple2_13<_i29.Decimal, double>(
this,
Invocation.method(
#getPrice,
[coin],
),
),
) as _i15.Tuple2<_i14.Decimal, double>);
) as _i15.Tuple2<_i29.Decimal, double>);
@override
_i15.Tuple2<_i14.Decimal, double> getTokenPrice(String? contractAddress) =>
_i15.Tuple2<_i29.Decimal, double> getTokenPrice(String? contractAddress) =>
(super.noSuchMethod(
Invocation.method(
#getTokenPrice,
[contractAddress],
),
returnValue: _FakeTuple2_13<_i14.Decimal, double>(
returnValue: _FakeTuple2_13<_i29.Decimal, double>(
this,
Invocation.method(
#getTokenPrice,
[contractAddress],
),
),
) as _i15.Tuple2<_i14.Decimal, double>);
) as _i15.Tuple2<_i29.Decimal, double>);
@override
_i18.Future<void> updatePrice() => (super.noSuchMethod(
Invocation.method(
@ -2637,7 +2706,7 @@ class MockPriceService extends _i1.Mock implements _i28.PriceService {
/// A class which mocks [NotesService].
///
/// See the documentation for Mockito's code generation for more information.
class MockNotesService extends _i1.Mock implements _i29.NotesService {
class MockNotesService extends _i1.Mock implements _i30.NotesService {
MockNotesService() {
_i1.throwOnMissingStub(this);
}

View file

@ -1,3 +1,4 @@
import 'package:decimal/decimal.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
@ -11,6 +12,7 @@ import 'package:stackwallet/services/coins/coin_service.dart';
import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/locale_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
@ -19,7 +21,12 @@ import 'package:tuple/tuple.dart';
import 'wallet_card_test.mocks.dart';
// class MockNavigatorObserver extends Mock implements NavigatorObserver {}
/// quick amount constructor wrapper. Using an int is bad practice but for
/// testing with small amounts this should be fine
Amount _a(int i) => Amount.fromDecimal(
Decimal.fromInt(i),
fractionDigits: 8,
);
@GenerateMocks([Wallets, BitcoinWallet, LocaleService])
void main() {
@ -33,10 +40,10 @@ void main() {
mockito.when(wallet.balance).thenAnswer(
(_) => Balance(
coin: Coin.bitcoin,
total: 0,
spendable: 0,
blockedTotal: 0,
pendingSpendable: 0,
total: _a(0),
spendable: _a(0),
blockedTotal: _a(0),
pendingSpendable: _a(0),
),
);
@ -102,10 +109,10 @@ void main() {
mockito.when(wallet.balance).thenAnswer(
(_) => Balance(
coin: Coin.bitcoin,
total: 0,
spendable: 0,
blockedTotal: 0,
pendingSpendable: 0,
total: _a(0),
spendable: _a(0),
blockedTotal: _a(0),
pendingSpendable: _a(0),
),
);

File diff suppressed because it is too large Load diff

View file

@ -11,6 +11,7 @@ import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
@ -39,10 +40,10 @@ void main() {
when(wallet.balance).thenAnswer(
(_) => Balance(
coin: Coin.bitcoin,
total: 0,
spendable: 0,
blockedTotal: 0,
pendingSpendable: 0,
total: Amount.zero,
spendable: Amount.zero,
blockedTotal: Amount.zero,
pendingSpendable: Amount.zero,
),
);

View file

@ -11,6 +11,7 @@ import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/services/node_service.dart';
import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/services/wallets_service.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
@ -39,10 +40,10 @@ void main() {
when(wallet.balance).thenAnswer(
(_) => Balance(
coin: Coin.bitcoin,
total: 0,
spendable: 0,
blockedTotal: 0,
pendingSpendable: 0,
total: Amount.zero,
spendable: Amount.zero,
blockedTotal: Amount.zero,
pendingSpendable: Amount.zero,
),
);