build runner mocks

This commit is contained in:
julian 2024-04-15 13:27:22 -06:00
parent 400f08c8bb
commit 15b6613183
13 changed files with 1036 additions and 663 deletions

View file

@ -112,6 +112,15 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient {
returnValue: false,
) as bool);
@override
_i5.Future<void> checkElectrumAdapter() => (super.noSuchMethod(
Invocation.method(
#checkElectrumAdapter,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<dynamic> request({
required String? command,
List<dynamic>? args = const [],
@ -134,9 +143,9 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient {
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i5.Future<List<Map<String, dynamic>>> batchRequest({
_i5.Future<List<dynamic>> batchRequest({
required String? command,
required Map<String, List<dynamic>>? args,
required List<dynamic>? args,
Duration? requestTimeout = const Duration(seconds: 60),
int? retries = 2,
}) =>
@ -151,9 +160,8 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient {
#retries: retries,
},
),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>);
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
) as _i5.Future<List<dynamic>>);
@override
_i5.Future<bool> ping({
String? requestID,
@ -243,17 +251,17 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient {
<Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchHistory(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchHistory,
[],
{#args: args},
),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash,
@ -272,17 +280,17 @@ class MockElectrumXClient extends _i1.Mock implements _i4.ElectrumXClient {
<Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchUTXOs(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchUTXOs,
[],
{#args: args},
),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
@ -855,6 +863,19 @@ class MockPrefs extends _i1.Mock implements _i6.Prefs {
returnValueForMissingStub: null,
);
@override
bool get frostEnabled => (super.noSuchMethod(
Invocation.getter(#frostEnabled),
returnValue: false,
) as bool);
@override
set frostEnabled(bool? frostEnabled) => super.noSuchMethod(
Invocation.setter(
#frostEnabled,
frostEnabled,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,

View file

@ -532,6 +532,19 @@ class MockPrefs extends _i1.Mock implements _i6.Prefs {
returnValueForMissingStub: null,
);
@override
bool get frostEnabled => (super.noSuchMethod(
Invocation.getter(#frostEnabled),
returnValue: false,
) as bool);
@override
set frostEnabled(bool? frostEnabled) => super.noSuchMethod(
Invocation.setter(
#frostEnabled,
frostEnabled,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,

View file

@ -978,6 +978,19 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs {
returnValueForMissingStub: null,
);
@override
bool get frostEnabled => (super.noSuchMethod(
Invocation.getter(#frostEnabled),
returnValue: false,
) as bool);
@override
set frostEnabled(bool? frostEnabled) => super.noSuchMethod(
Invocation.setter(
#frostEnabled,
frostEnabled,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,

View file

@ -454,6 +454,19 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs {
returnValueForMissingStub: null,
);
@override
bool get frostEnabled => (super.noSuchMethod(
Invocation.getter(#frostEnabled),
returnValue: false,
) as bool);
@override
set frostEnabled(bool? frostEnabled) => super.noSuchMethod(
Invocation.setter(
#frostEnabled,
frostEnabled,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,

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 _i4;
import 'dart:ui' as _i10;
import 'dart:async' as _i5;
import 'dart:ui' as _i11;
import 'package:local_auth/auth_strings.dart' as _i7;
import 'package:local_auth/local_auth.dart' as _i6;
import 'package:electrum_adapter/electrum_adapter.dart' as _i3;
import 'package:local_auth/auth_strings.dart' as _i8;
import 'package:local_auth/local_auth.dart' as _i7;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i3;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i4;
import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i2;
import 'package:stackwallet/services/wallets_service.dart' as _i9;
import 'package:stackwallet/utilities/biometrics.dart' as _i8;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i5;
import 'package:stackwallet/services/wallets_service.dart' as _i10;
import 'package:stackwallet/utilities/biometrics.dart' as _i9;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -37,11 +38,22 @@ class _FakeElectrumXClient_0 extends _i1.SmartFake
);
}
class _FakeElectrumClient_1 extends _i1.SmartFake
implements _i3.ElectrumClient {
_FakeElectrumClient_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [CachedElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumXClient extends _i1.Mock
implements _i3.CachedElectrumXClient {
implements _i4.CachedElectrumXClient {
MockCachedElectrumXClient() {
_i1.throwOnMissingStub(this);
}
@ -55,10 +67,37 @@ class MockCachedElectrumXClient extends _i1.Mock
),
) as _i2.ElectrumXClient);
@override
_i4.Future<Map<String, dynamic>> getAnonymitySet({
_i3.ElectrumClient get electrumAdapterClient => (super.noSuchMethod(
Invocation.getter(#electrumAdapterClient),
returnValue: _FakeElectrumClient_1(
this,
Invocation.getter(#electrumAdapterClient),
),
) as _i3.ElectrumClient);
@override
set electrumAdapterClient(_i3.ElectrumClient? _electrumAdapterClient) =>
super.noSuchMethod(
Invocation.setter(
#electrumAdapterClient,
_electrumAdapterClient,
),
returnValueForMissingStub: null,
);
@override
_i5.Future<_i3.ElectrumClient> Function() get electrumAdapterUpdateCallback =>
(super.noSuchMethod(
Invocation.getter(#electrumAdapterUpdateCallback),
returnValue: () =>
_i5.Future<_i3.ElectrumClient>.value(_FakeElectrumClient_1(
this,
Invocation.getter(#electrumAdapterUpdateCallback),
)),
) as _i5.Future<_i3.ElectrumClient> Function());
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i5.Coin? coin,
required _i6.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -71,13 +110,13 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i5.Coin? coin,
required _i6.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -90,8 +129,8 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method(
@ -109,9 +148,9 @@ class MockCachedElectrumXClient extends _i1.Mock
returnValue: '',
) as String);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
required _i5.Coin? coin,
required _i6.Coin? coin,
bool? verbose = true,
}) =>
(super.noSuchMethod(
@ -125,11 +164,11 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<String>> getUsedCoinSerials({
required _i5.Coin? coin,
_i5.Future<List<String>> getUsedCoinSerials({
required _i6.Coin? coin,
int? startNumber = 0,
}) =>
(super.noSuchMethod(
@ -141,53 +180,53 @@ class MockCachedElectrumXClient extends _i1.Mock
#startNumber: startNumber,
},
),
returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i4.Future<List<String>>);
returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({required _i5.Coin? coin}) =>
_i5.Future<Set<String>> getSparkUsedCoinsTags({required _i6.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkUsedCoinsTags,
[],
{#coin: coin},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<void> clearSharedTransactionCache({required _i5.Coin? coin}) =>
_i5.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#clearSharedTransactionCache,
[],
{#coin: coin},
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
/// A class which mocks [LocalAuthentication].
///
/// See the documentation for Mockito's code generation for more information.
class MockLocalAuthentication extends _i1.Mock
implements _i6.LocalAuthentication {
implements _i7.LocalAuthentication {
MockLocalAuthentication() {
_i1.throwOnMissingStub(this);
}
@override
_i4.Future<bool> get canCheckBiometrics => (super.noSuchMethod(
_i5.Future<bool> get canCheckBiometrics => (super.noSuchMethod(
Invocation.getter(#canCheckBiometrics),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<bool> authenticateWithBiometrics({
_i5.Future<bool> authenticateWithBiometrics({
required String? localizedReason,
bool? useErrorDialogs = true,
bool? stickyAuth = false,
_i7.AndroidAuthMessages? androidAuthStrings =
const _i7.AndroidAuthMessages(),
_i7.IOSAuthMessages? iOSAuthStrings = const _i7.IOSAuthMessages(),
_i8.AndroidAuthMessages? androidAuthStrings =
const _i8.AndroidAuthMessages(),
_i8.IOSAuthMessages? iOSAuthStrings = const _i8.IOSAuthMessages(),
bool? sensitiveTransaction = true,
}) =>
(super.noSuchMethod(
@ -203,16 +242,16 @@ class MockLocalAuthentication extends _i1.Mock
#sensitiveTransaction: sensitiveTransaction,
},
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<bool> authenticate({
_i5.Future<bool> authenticate({
required String? localizedReason,
bool? useErrorDialogs = true,
bool? stickyAuth = false,
_i7.AndroidAuthMessages? androidAuthStrings =
const _i7.AndroidAuthMessages(),
_i7.IOSAuthMessages? iOSAuthStrings = const _i7.IOSAuthMessages(),
_i8.AndroidAuthMessages? androidAuthStrings =
const _i8.AndroidAuthMessages(),
_i8.IOSAuthMessages? iOSAuthStrings = const _i8.IOSAuthMessages(),
bool? sensitiveTransaction = true,
bool? biometricOnly = false,
}) =>
@ -230,46 +269,46 @@ class MockLocalAuthentication extends _i1.Mock
#biometricOnly: biometricOnly,
},
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<bool> stopAuthentication() => (super.noSuchMethod(
_i5.Future<bool> stopAuthentication() => (super.noSuchMethod(
Invocation.method(
#stopAuthentication,
[],
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<bool> isDeviceSupported() => (super.noSuchMethod(
_i5.Future<bool> isDeviceSupported() => (super.noSuchMethod(
Invocation.method(
#isDeviceSupported,
[],
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<List<_i6.BiometricType>> getAvailableBiometrics() =>
_i5.Future<List<_i7.BiometricType>> getAvailableBiometrics() =>
(super.noSuchMethod(
Invocation.method(
#getAvailableBiometrics,
[],
),
returnValue:
_i4.Future<List<_i6.BiometricType>>.value(<_i6.BiometricType>[]),
) as _i4.Future<List<_i6.BiometricType>>);
_i5.Future<List<_i7.BiometricType>>.value(<_i7.BiometricType>[]),
) as _i5.Future<List<_i7.BiometricType>>);
}
/// A class which mocks [Biometrics].
///
/// See the documentation for Mockito's code generation for more information.
class MockBiometrics extends _i1.Mock implements _i8.Biometrics {
class MockBiometrics extends _i1.Mock implements _i9.Biometrics {
MockBiometrics() {
_i1.throwOnMissingStub(this);
}
@override
_i4.Future<bool> authenticate({
_i5.Future<bool> authenticate({
required String? cancelButtonText,
required String? localizedReason,
required String? title,
@ -284,28 +323,28 @@ class MockBiometrics extends _i1.Mock implements _i8.Biometrics {
#title: title,
},
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
}
/// 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
_i4.Future<Map<String, _i9.WalletInfo>> get walletNames =>
_i5.Future<Map<String, _i10.WalletInfo>> get walletNames =>
(super.noSuchMethod(
Invocation.getter(#walletNames),
returnValue: _i4.Future<Map<String, _i9.WalletInfo>>.value(
<String, _i9.WalletInfo>{}),
) as _i4.Future<Map<String, _i9.WalletInfo>>);
returnValue: _i5.Future<Map<String, _i10.WalletInfo>>.value(
<String, _i10.WalletInfo>{}),
) as _i5.Future<Map<String, _i10.WalletInfo>>);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void addListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
@ -313,7 +352,7 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
returnValueForMissingStub: null,
);
@override
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],

View file

@ -3,15 +3,16 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i4;
import 'dart:async' as _i5;
import 'package:decimal/decimal.dart' as _i2;
import 'package:electrum_adapter/electrum_adapter.dart' as _i4;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i6;
import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
as _i8;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -55,6 +56,17 @@ class _FakeElectrumXClient_2 extends _i1.SmartFake
);
}
class _FakeElectrumClient_3 extends _i1.SmartFake
implements _i4.ElectrumClient {
_FakeElectrumClient_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [ElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
@ -109,7 +121,16 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
returnValue: false,
) as bool);
@override
_i4.Future<dynamic> request({
_i5.Future<void> checkElectrumAdapter() => (super.noSuchMethod(
Invocation.method(
#checkElectrumAdapter,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<dynamic> request({
required String? command,
List<dynamic>? args = const [],
String? requestID,
@ -128,12 +149,12 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestTimeout: requestTimeout,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<List<Map<String, dynamic>>> batchRequest({
_i5.Future<List<dynamic>> batchRequest({
required String? command,
required Map<String, List<dynamic>>? args,
required List<dynamic>? args,
Duration? requestTimeout = const Duration(seconds: 60),
int? retries = 2,
}) =>
@ -148,11 +169,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retries: retries,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
) as _i5.Future<List<dynamic>>);
@override
_i4.Future<bool> ping({
_i5.Future<bool> ping({
String? requestID,
int? retryCount = 1,
}) =>
@ -165,10 +185,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retryCount: retryCount,
},
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getBlockHeadTip,
@ -176,10 +196,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getServerFeatures,
@ -187,10 +207,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<String> broadcastTransaction({
_i5.Future<String> broadcastTransaction({
required String? rawTx,
String? requestID,
}) =>
@ -203,10 +223,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<String>.value(''),
) as _i4.Future<String>);
returnValue: _i5.Future<String>.value(''),
) as _i5.Future<String>);
@override
_i4.Future<Map<String, dynamic>> getBalance({
_i5.Future<Map<String, dynamic>> getBalance({
required String? scripthash,
String? requestID,
}) =>
@ -220,10 +240,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<Map<String, dynamic>>> getHistory({
_i5.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash,
String? requestID,
}) =>
@ -236,23 +256,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchHistory(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchHistory,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash,
String? requestID,
}) =>
@ -265,23 +285,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchUTXOs(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchUTXOs,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
bool? verbose = true,
String? requestID,
@ -297,10 +317,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getLelantusAnonymitySet({
_i5.Future<Map<String, dynamic>> getLelantusAnonymitySet({
String? groupId = r'1',
String? blockhash = r'',
String? requestID,
@ -316,10 +336,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<dynamic> getLelantusMintData({
_i5.Future<dynamic> getLelantusMintData({
dynamic mints,
String? requestID,
}) =>
@ -332,10 +352,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
_i5.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
String? requestID,
required int? startNumber,
}) =>
@ -349,20 +369,20 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<int> getLelantusLatestCoinId({String? requestID}) =>
_i5.Future<int> getLelantusLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getLelantusLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
String? coinGroupId = r'1',
String? startBlockHash = r'',
String? requestID,
@ -378,10 +398,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({
_i5.Future<Set<String>> getSparkUsedCoinsTags({
String? requestID,
required int? startNumber,
}) =>
@ -394,10 +414,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#startNumber: startNumber,
},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
_i5.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
String? requestID,
required List<String>? sparkCoinHashes,
}) =>
@ -410,21 +430,21 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#sparkCoinHashes: sparkCoinHashes,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<int> getSparkLatestCoinId({String? requestID}) =>
_i5.Future<int> getSparkLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getFeeRate,
@ -432,10 +452,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<_i2.Decimal> estimateFee({
_i5.Future<_i2.Decimal> estimateFee({
String? requestID,
required int? blocks,
}) =>
@ -448,7 +468,7 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#blocks: blocks,
},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#estimateFee,
@ -459,15 +479,15 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
@override
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method(
#relayFee,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#relayFee,
@ -475,14 +495,14 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
}
/// A class which mocks [CachedElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumXClient extends _i1.Mock
implements _i5.CachedElectrumXClient {
implements _i6.CachedElectrumXClient {
MockCachedElectrumXClient() {
_i1.throwOnMissingStub(this);
}
@ -496,10 +516,37 @@ class MockCachedElectrumXClient extends _i1.Mock
),
) as _i3.ElectrumXClient);
@override
_i4.Future<Map<String, dynamic>> getAnonymitySet({
_i4.ElectrumClient get electrumAdapterClient => (super.noSuchMethod(
Invocation.getter(#electrumAdapterClient),
returnValue: _FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterClient),
),
) as _i4.ElectrumClient);
@override
set electrumAdapterClient(_i4.ElectrumClient? _electrumAdapterClient) =>
super.noSuchMethod(
Invocation.setter(
#electrumAdapterClient,
_electrumAdapterClient,
),
returnValueForMissingStub: null,
);
@override
_i5.Future<_i4.ElectrumClient> Function() get electrumAdapterUpdateCallback =>
(super.noSuchMethod(
Invocation.getter(#electrumAdapterUpdateCallback),
returnValue: () =>
_i5.Future<_i4.ElectrumClient>.value(_FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterUpdateCallback),
)),
) as _i5.Future<_i4.ElectrumClient> Function());
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -512,13 +559,13 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -531,8 +578,8 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method(
@ -550,9 +597,9 @@ class MockCachedElectrumXClient extends _i1.Mock
returnValue: '',
) as String);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
required _i6.Coin? coin,
required _i7.Coin? coin,
bool? verbose = true,
}) =>
(super.noSuchMethod(
@ -566,11 +613,11 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<String>> getUsedCoinSerials({
required _i6.Coin? coin,
_i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin,
int? startNumber = 0,
}) =>
(super.noSuchMethod(
@ -582,36 +629,36 @@ class MockCachedElectrumXClient extends _i1.Mock
#startNumber: startNumber,
},
),
returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i4.Future<List<String>>);
returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({required _i6.Coin? coin}) =>
_i5.Future<Set<String>> getSparkUsedCoinsTags({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkUsedCoinsTags,
[],
{#coin: coin},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#clearSharedTransactionCache,
[],
{#coin: coin},
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
/// A class which mocks [TransactionNotificationTracker].
///
/// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock
implements _i7.TransactionNotificationTracker {
implements _i8.TransactionNotificationTracker {
MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this);
}
@ -640,14 +687,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedPending,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
@ -657,21 +704,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedConfirmed,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method(
#deleteTransaction,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}

View file

@ -3,15 +3,16 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i4;
import 'dart:async' as _i5;
import 'package:decimal/decimal.dart' as _i2;
import 'package:electrum_adapter/electrum_adapter.dart' as _i4;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i6;
import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
as _i8;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -55,6 +56,17 @@ class _FakeElectrumXClient_2 extends _i1.SmartFake
);
}
class _FakeElectrumClient_3 extends _i1.SmartFake
implements _i4.ElectrumClient {
_FakeElectrumClient_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [ElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
@ -109,7 +121,16 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
returnValue: false,
) as bool);
@override
_i4.Future<dynamic> request({
_i5.Future<void> checkElectrumAdapter() => (super.noSuchMethod(
Invocation.method(
#checkElectrumAdapter,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<dynamic> request({
required String? command,
List<dynamic>? args = const [],
String? requestID,
@ -128,12 +149,12 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestTimeout: requestTimeout,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<List<Map<String, dynamic>>> batchRequest({
_i5.Future<List<dynamic>> batchRequest({
required String? command,
required Map<String, List<dynamic>>? args,
required List<dynamic>? args,
Duration? requestTimeout = const Duration(seconds: 60),
int? retries = 2,
}) =>
@ -148,11 +169,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retries: retries,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
) as _i5.Future<List<dynamic>>);
@override
_i4.Future<bool> ping({
_i5.Future<bool> ping({
String? requestID,
int? retryCount = 1,
}) =>
@ -165,10 +185,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retryCount: retryCount,
},
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getBlockHeadTip,
@ -176,10 +196,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getServerFeatures,
@ -187,10 +207,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<String> broadcastTransaction({
_i5.Future<String> broadcastTransaction({
required String? rawTx,
String? requestID,
}) =>
@ -203,10 +223,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<String>.value(''),
) as _i4.Future<String>);
returnValue: _i5.Future<String>.value(''),
) as _i5.Future<String>);
@override
_i4.Future<Map<String, dynamic>> getBalance({
_i5.Future<Map<String, dynamic>> getBalance({
required String? scripthash,
String? requestID,
}) =>
@ -220,10 +240,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<Map<String, dynamic>>> getHistory({
_i5.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash,
String? requestID,
}) =>
@ -236,23 +256,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchHistory(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchHistory,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash,
String? requestID,
}) =>
@ -265,23 +285,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchUTXOs(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchUTXOs,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
bool? verbose = true,
String? requestID,
@ -297,10 +317,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getLelantusAnonymitySet({
_i5.Future<Map<String, dynamic>> getLelantusAnonymitySet({
String? groupId = r'1',
String? blockhash = r'',
String? requestID,
@ -316,10 +336,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<dynamic> getLelantusMintData({
_i5.Future<dynamic> getLelantusMintData({
dynamic mints,
String? requestID,
}) =>
@ -332,10 +352,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
_i5.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
String? requestID,
required int? startNumber,
}) =>
@ -349,20 +369,20 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<int> getLelantusLatestCoinId({String? requestID}) =>
_i5.Future<int> getLelantusLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getLelantusLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
String? coinGroupId = r'1',
String? startBlockHash = r'',
String? requestID,
@ -378,10 +398,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({
_i5.Future<Set<String>> getSparkUsedCoinsTags({
String? requestID,
required int? startNumber,
}) =>
@ -394,10 +414,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#startNumber: startNumber,
},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
_i5.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
String? requestID,
required List<String>? sparkCoinHashes,
}) =>
@ -410,21 +430,21 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#sparkCoinHashes: sparkCoinHashes,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<int> getSparkLatestCoinId({String? requestID}) =>
_i5.Future<int> getSparkLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getFeeRate,
@ -432,10 +452,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<_i2.Decimal> estimateFee({
_i5.Future<_i2.Decimal> estimateFee({
String? requestID,
required int? blocks,
}) =>
@ -448,7 +468,7 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#blocks: blocks,
},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#estimateFee,
@ -459,15 +479,15 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
@override
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method(
#relayFee,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#relayFee,
@ -475,14 +495,14 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
}
/// A class which mocks [CachedElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumXClient extends _i1.Mock
implements _i5.CachedElectrumXClient {
implements _i6.CachedElectrumXClient {
MockCachedElectrumXClient() {
_i1.throwOnMissingStub(this);
}
@ -496,10 +516,37 @@ class MockCachedElectrumXClient extends _i1.Mock
),
) as _i3.ElectrumXClient);
@override
_i4.Future<Map<String, dynamic>> getAnonymitySet({
_i4.ElectrumClient get electrumAdapterClient => (super.noSuchMethod(
Invocation.getter(#electrumAdapterClient),
returnValue: _FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterClient),
),
) as _i4.ElectrumClient);
@override
set electrumAdapterClient(_i4.ElectrumClient? _electrumAdapterClient) =>
super.noSuchMethod(
Invocation.setter(
#electrumAdapterClient,
_electrumAdapterClient,
),
returnValueForMissingStub: null,
);
@override
_i5.Future<_i4.ElectrumClient> Function() get electrumAdapterUpdateCallback =>
(super.noSuchMethod(
Invocation.getter(#electrumAdapterUpdateCallback),
returnValue: () =>
_i5.Future<_i4.ElectrumClient>.value(_FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterUpdateCallback),
)),
) as _i5.Future<_i4.ElectrumClient> Function());
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -512,13 +559,13 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -531,8 +578,8 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method(
@ -550,9 +597,9 @@ class MockCachedElectrumXClient extends _i1.Mock
returnValue: '',
) as String);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
required _i6.Coin? coin,
required _i7.Coin? coin,
bool? verbose = true,
}) =>
(super.noSuchMethod(
@ -566,11 +613,11 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<String>> getUsedCoinSerials({
required _i6.Coin? coin,
_i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin,
int? startNumber = 0,
}) =>
(super.noSuchMethod(
@ -582,36 +629,36 @@ class MockCachedElectrumXClient extends _i1.Mock
#startNumber: startNumber,
},
),
returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i4.Future<List<String>>);
returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({required _i6.Coin? coin}) =>
_i5.Future<Set<String>> getSparkUsedCoinsTags({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkUsedCoinsTags,
[],
{#coin: coin},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#clearSharedTransactionCache,
[],
{#coin: coin},
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
/// A class which mocks [TransactionNotificationTracker].
///
/// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock
implements _i7.TransactionNotificationTracker {
implements _i8.TransactionNotificationTracker {
MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this);
}
@ -640,14 +687,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedPending,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
@ -657,21 +704,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedConfirmed,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method(
#deleteTransaction,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}

View file

@ -3,15 +3,16 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i4;
import 'dart:async' as _i5;
import 'package:decimal/decimal.dart' as _i2;
import 'package:electrum_adapter/electrum_adapter.dart' as _i4;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i6;
import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
as _i8;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -55,6 +56,17 @@ class _FakeElectrumXClient_2 extends _i1.SmartFake
);
}
class _FakeElectrumClient_3 extends _i1.SmartFake
implements _i4.ElectrumClient {
_FakeElectrumClient_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [ElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
@ -109,7 +121,16 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
returnValue: false,
) as bool);
@override
_i4.Future<dynamic> request({
_i5.Future<void> checkElectrumAdapter() => (super.noSuchMethod(
Invocation.method(
#checkElectrumAdapter,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<dynamic> request({
required String? command,
List<dynamic>? args = const [],
String? requestID,
@ -128,12 +149,12 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestTimeout: requestTimeout,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<List<Map<String, dynamic>>> batchRequest({
_i5.Future<List<dynamic>> batchRequest({
required String? command,
required Map<String, List<dynamic>>? args,
required List<dynamic>? args,
Duration? requestTimeout = const Duration(seconds: 60),
int? retries = 2,
}) =>
@ -148,11 +169,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retries: retries,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
) as _i5.Future<List<dynamic>>);
@override
_i4.Future<bool> ping({
_i5.Future<bool> ping({
String? requestID,
int? retryCount = 1,
}) =>
@ -165,10 +185,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retryCount: retryCount,
},
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getBlockHeadTip,
@ -176,10 +196,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getServerFeatures,
@ -187,10 +207,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<String> broadcastTransaction({
_i5.Future<String> broadcastTransaction({
required String? rawTx,
String? requestID,
}) =>
@ -203,10 +223,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<String>.value(''),
) as _i4.Future<String>);
returnValue: _i5.Future<String>.value(''),
) as _i5.Future<String>);
@override
_i4.Future<Map<String, dynamic>> getBalance({
_i5.Future<Map<String, dynamic>> getBalance({
required String? scripthash,
String? requestID,
}) =>
@ -220,10 +240,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<Map<String, dynamic>>> getHistory({
_i5.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash,
String? requestID,
}) =>
@ -236,23 +256,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchHistory(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchHistory,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash,
String? requestID,
}) =>
@ -265,23 +285,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchUTXOs(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchUTXOs,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
bool? verbose = true,
String? requestID,
@ -297,10 +317,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getLelantusAnonymitySet({
_i5.Future<Map<String, dynamic>> getLelantusAnonymitySet({
String? groupId = r'1',
String? blockhash = r'',
String? requestID,
@ -316,10 +336,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<dynamic> getLelantusMintData({
_i5.Future<dynamic> getLelantusMintData({
dynamic mints,
String? requestID,
}) =>
@ -332,10 +352,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
_i5.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
String? requestID,
required int? startNumber,
}) =>
@ -349,20 +369,20 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<int> getLelantusLatestCoinId({String? requestID}) =>
_i5.Future<int> getLelantusLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getLelantusLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
String? coinGroupId = r'1',
String? startBlockHash = r'',
String? requestID,
@ -378,10 +398,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({
_i5.Future<Set<String>> getSparkUsedCoinsTags({
String? requestID,
required int? startNumber,
}) =>
@ -394,10 +414,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#startNumber: startNumber,
},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
_i5.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
String? requestID,
required List<String>? sparkCoinHashes,
}) =>
@ -410,21 +430,21 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#sparkCoinHashes: sparkCoinHashes,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<int> getSparkLatestCoinId({String? requestID}) =>
_i5.Future<int> getSparkLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getFeeRate,
@ -432,10 +452,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<_i2.Decimal> estimateFee({
_i5.Future<_i2.Decimal> estimateFee({
String? requestID,
required int? blocks,
}) =>
@ -448,7 +468,7 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#blocks: blocks,
},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#estimateFee,
@ -459,15 +479,15 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
@override
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method(
#relayFee,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#relayFee,
@ -475,14 +495,14 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
}
/// A class which mocks [CachedElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumXClient extends _i1.Mock
implements _i5.CachedElectrumXClient {
implements _i6.CachedElectrumXClient {
MockCachedElectrumXClient() {
_i1.throwOnMissingStub(this);
}
@ -496,10 +516,37 @@ class MockCachedElectrumXClient extends _i1.Mock
),
) as _i3.ElectrumXClient);
@override
_i4.Future<Map<String, dynamic>> getAnonymitySet({
_i4.ElectrumClient get electrumAdapterClient => (super.noSuchMethod(
Invocation.getter(#electrumAdapterClient),
returnValue: _FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterClient),
),
) as _i4.ElectrumClient);
@override
set electrumAdapterClient(_i4.ElectrumClient? _electrumAdapterClient) =>
super.noSuchMethod(
Invocation.setter(
#electrumAdapterClient,
_electrumAdapterClient,
),
returnValueForMissingStub: null,
);
@override
_i5.Future<_i4.ElectrumClient> Function() get electrumAdapterUpdateCallback =>
(super.noSuchMethod(
Invocation.getter(#electrumAdapterUpdateCallback),
returnValue: () =>
_i5.Future<_i4.ElectrumClient>.value(_FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterUpdateCallback),
)),
) as _i5.Future<_i4.ElectrumClient> Function());
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -512,13 +559,13 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -531,8 +578,8 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method(
@ -550,9 +597,9 @@ class MockCachedElectrumXClient extends _i1.Mock
returnValue: '',
) as String);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
required _i6.Coin? coin,
required _i7.Coin? coin,
bool? verbose = true,
}) =>
(super.noSuchMethod(
@ -566,11 +613,11 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<String>> getUsedCoinSerials({
required _i6.Coin? coin,
_i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin,
int? startNumber = 0,
}) =>
(super.noSuchMethod(
@ -582,36 +629,36 @@ class MockCachedElectrumXClient extends _i1.Mock
#startNumber: startNumber,
},
),
returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i4.Future<List<String>>);
returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({required _i6.Coin? coin}) =>
_i5.Future<Set<String>> getSparkUsedCoinsTags({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkUsedCoinsTags,
[],
{#coin: coin},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#clearSharedTransactionCache,
[],
{#coin: coin},
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
/// A class which mocks [TransactionNotificationTracker].
///
/// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock
implements _i7.TransactionNotificationTracker {
implements _i8.TransactionNotificationTracker {
MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this);
}
@ -640,14 +687,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedPending,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
@ -657,21 +704,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedConfirmed,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method(
#deleteTransaction,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}

View file

@ -3,15 +3,16 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i4;
import 'dart:async' as _i5;
import 'package:decimal/decimal.dart' as _i2;
import 'package:electrum_adapter/electrum_adapter.dart' as _i4;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i6;
import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
as _i8;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -55,6 +56,17 @@ class _FakeElectrumXClient_2 extends _i1.SmartFake
);
}
class _FakeElectrumClient_3 extends _i1.SmartFake
implements _i4.ElectrumClient {
_FakeElectrumClient_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [ElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
@ -109,7 +121,16 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
returnValue: false,
) as bool);
@override
_i4.Future<dynamic> request({
_i5.Future<void> checkElectrumAdapter() => (super.noSuchMethod(
Invocation.method(
#checkElectrumAdapter,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<dynamic> request({
required String? command,
List<dynamic>? args = const [],
String? requestID,
@ -128,12 +149,12 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestTimeout: requestTimeout,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<List<Map<String, dynamic>>> batchRequest({
_i5.Future<List<dynamic>> batchRequest({
required String? command,
required Map<String, List<dynamic>>? args,
required List<dynamic>? args,
Duration? requestTimeout = const Duration(seconds: 60),
int? retries = 2,
}) =>
@ -148,11 +169,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retries: retries,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
) as _i5.Future<List<dynamic>>);
@override
_i4.Future<bool> ping({
_i5.Future<bool> ping({
String? requestID,
int? retryCount = 1,
}) =>
@ -165,10 +185,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retryCount: retryCount,
},
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getBlockHeadTip,
@ -176,10 +196,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getServerFeatures,
@ -187,10 +207,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<String> broadcastTransaction({
_i5.Future<String> broadcastTransaction({
required String? rawTx,
String? requestID,
}) =>
@ -203,10 +223,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<String>.value(''),
) as _i4.Future<String>);
returnValue: _i5.Future<String>.value(''),
) as _i5.Future<String>);
@override
_i4.Future<Map<String, dynamic>> getBalance({
_i5.Future<Map<String, dynamic>> getBalance({
required String? scripthash,
String? requestID,
}) =>
@ -220,10 +240,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<Map<String, dynamic>>> getHistory({
_i5.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash,
String? requestID,
}) =>
@ -236,23 +256,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchHistory(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchHistory,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash,
String? requestID,
}) =>
@ -265,23 +285,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchUTXOs(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchUTXOs,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
bool? verbose = true,
String? requestID,
@ -297,10 +317,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getLelantusAnonymitySet({
_i5.Future<Map<String, dynamic>> getLelantusAnonymitySet({
String? groupId = r'1',
String? blockhash = r'',
String? requestID,
@ -316,10 +336,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<dynamic> getLelantusMintData({
_i5.Future<dynamic> getLelantusMintData({
dynamic mints,
String? requestID,
}) =>
@ -332,10 +352,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
_i5.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
String? requestID,
required int? startNumber,
}) =>
@ -349,20 +369,20 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<int> getLelantusLatestCoinId({String? requestID}) =>
_i5.Future<int> getLelantusLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getLelantusLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
String? coinGroupId = r'1',
String? startBlockHash = r'',
String? requestID,
@ -378,10 +398,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({
_i5.Future<Set<String>> getSparkUsedCoinsTags({
String? requestID,
required int? startNumber,
}) =>
@ -394,10 +414,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#startNumber: startNumber,
},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
_i5.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
String? requestID,
required List<String>? sparkCoinHashes,
}) =>
@ -410,21 +430,21 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#sparkCoinHashes: sparkCoinHashes,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<int> getSparkLatestCoinId({String? requestID}) =>
_i5.Future<int> getSparkLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getFeeRate,
@ -432,10 +452,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<_i2.Decimal> estimateFee({
_i5.Future<_i2.Decimal> estimateFee({
String? requestID,
required int? blocks,
}) =>
@ -448,7 +468,7 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#blocks: blocks,
},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#estimateFee,
@ -459,15 +479,15 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
@override
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method(
#relayFee,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#relayFee,
@ -475,14 +495,14 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
}
/// A class which mocks [CachedElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumXClient extends _i1.Mock
implements _i5.CachedElectrumXClient {
implements _i6.CachedElectrumXClient {
MockCachedElectrumXClient() {
_i1.throwOnMissingStub(this);
}
@ -496,10 +516,37 @@ class MockCachedElectrumXClient extends _i1.Mock
),
) as _i3.ElectrumXClient);
@override
_i4.Future<Map<String, dynamic>> getAnonymitySet({
_i4.ElectrumClient get electrumAdapterClient => (super.noSuchMethod(
Invocation.getter(#electrumAdapterClient),
returnValue: _FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterClient),
),
) as _i4.ElectrumClient);
@override
set electrumAdapterClient(_i4.ElectrumClient? _electrumAdapterClient) =>
super.noSuchMethod(
Invocation.setter(
#electrumAdapterClient,
_electrumAdapterClient,
),
returnValueForMissingStub: null,
);
@override
_i5.Future<_i4.ElectrumClient> Function() get electrumAdapterUpdateCallback =>
(super.noSuchMethod(
Invocation.getter(#electrumAdapterUpdateCallback),
returnValue: () =>
_i5.Future<_i4.ElectrumClient>.value(_FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterUpdateCallback),
)),
) as _i5.Future<_i4.ElectrumClient> Function());
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -512,13 +559,13 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -531,8 +578,8 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method(
@ -550,9 +597,9 @@ class MockCachedElectrumXClient extends _i1.Mock
returnValue: '',
) as String);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
required _i6.Coin? coin,
required _i7.Coin? coin,
bool? verbose = true,
}) =>
(super.noSuchMethod(
@ -566,11 +613,11 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<String>> getUsedCoinSerials({
required _i6.Coin? coin,
_i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin,
int? startNumber = 0,
}) =>
(super.noSuchMethod(
@ -582,36 +629,36 @@ class MockCachedElectrumXClient extends _i1.Mock
#startNumber: startNumber,
},
),
returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i4.Future<List<String>>);
returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({required _i6.Coin? coin}) =>
_i5.Future<Set<String>> getSparkUsedCoinsTags({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkUsedCoinsTags,
[],
{#coin: coin},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#clearSharedTransactionCache,
[],
{#coin: coin},
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
/// A class which mocks [TransactionNotificationTracker].
///
/// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock
implements _i7.TransactionNotificationTracker {
implements _i8.TransactionNotificationTracker {
MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this);
}
@ -640,14 +687,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedPending,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
@ -657,21 +704,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedConfirmed,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method(
#deleteTransaction,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}

View file

@ -3,15 +3,16 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i4;
import 'dart:async' as _i5;
import 'package:decimal/decimal.dart' as _i2;
import 'package:electrum_adapter/electrum_adapter.dart' as _i4;
import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/cached_electrumx_client.dart' as _i6;
import 'package:stackwallet/electrumx_rpc/electrumx_client.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
as _i8;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@ -55,6 +56,17 @@ class _FakeElectrumXClient_2 extends _i1.SmartFake
);
}
class _FakeElectrumClient_3 extends _i1.SmartFake
implements _i4.ElectrumClient {
_FakeElectrumClient_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [ElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
@ -109,7 +121,16 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
returnValue: false,
) as bool);
@override
_i4.Future<dynamic> request({
_i5.Future<void> checkElectrumAdapter() => (super.noSuchMethod(
Invocation.method(
#checkElectrumAdapter,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<dynamic> request({
required String? command,
List<dynamic>? args = const [],
String? requestID,
@ -128,12 +149,12 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestTimeout: requestTimeout,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<List<Map<String, dynamic>>> batchRequest({
_i5.Future<List<dynamic>> batchRequest({
required String? command,
required Map<String, List<dynamic>>? args,
required List<dynamic>? args,
Duration? requestTimeout = const Duration(seconds: 60),
int? retries = 2,
}) =>
@ -148,11 +169,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retries: retries,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
) as _i5.Future<List<dynamic>>);
@override
_i4.Future<bool> ping({
_i5.Future<bool> ping({
String? requestID,
int? retryCount = 1,
}) =>
@ -165,10 +185,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#retryCount: retryCount,
},
),
returnValue: _i4.Future<bool>.value(false),
) as _i4.Future<bool>);
returnValue: _i5.Future<bool>.value(false),
) as _i5.Future<bool>);
@override
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getBlockHeadTip,
@ -176,10 +196,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getServerFeatures,
@ -187,10 +207,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<String> broadcastTransaction({
_i5.Future<String> broadcastTransaction({
required String? rawTx,
String? requestID,
}) =>
@ -203,10 +223,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<String>.value(''),
) as _i4.Future<String>);
returnValue: _i5.Future<String>.value(''),
) as _i5.Future<String>);
@override
_i4.Future<Map<String, dynamic>> getBalance({
_i5.Future<Map<String, dynamic>> getBalance({
required String? scripthash,
String? requestID,
}) =>
@ -220,10 +240,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<Map<String, dynamic>>> getHistory({
_i5.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash,
String? requestID,
}) =>
@ -236,23 +256,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchHistory(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchHistory,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash,
String? requestID,
}) =>
@ -265,23 +285,23 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) =>
_i5.Future<List<List<Map<String, dynamic>>>> getBatchUTXOs(
{required List<dynamic>? args}) =>
(super.noSuchMethod(
Invocation.method(
#getBatchUTXOs,
[],
{#args: args},
),
returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}),
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
returnValue: _i5.Future<List<List<Map<String, dynamic>>>>.value(
<List<Map<String, dynamic>>>[]),
) as _i5.Future<List<List<Map<String, dynamic>>>>);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
bool? verbose = true,
String? requestID,
@ -297,10 +317,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getLelantusAnonymitySet({
_i5.Future<Map<String, dynamic>> getLelantusAnonymitySet({
String? groupId = r'1',
String? blockhash = r'',
String? requestID,
@ -316,10 +336,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<dynamic> getLelantusMintData({
_i5.Future<dynamic> getLelantusMintData({
dynamic mints,
String? requestID,
}) =>
@ -332,10 +352,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#requestID: requestID,
},
),
returnValue: _i4.Future<dynamic>.value(),
) as _i4.Future<dynamic>);
returnValue: _i5.Future<dynamic>.value(),
) as _i5.Future<dynamic>);
@override
_i4.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
_i5.Future<Map<String, dynamic>> getLelantusUsedCoinSerials({
String? requestID,
required int? startNumber,
}) =>
@ -349,20 +369,20 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<int> getLelantusLatestCoinId({String? requestID}) =>
_i5.Future<int> getLelantusLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getLelantusLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
String? coinGroupId = r'1',
String? startBlockHash = r'',
String? requestID,
@ -378,10 +398,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({
_i5.Future<Set<String>> getSparkUsedCoinsTags({
String? requestID,
required int? startNumber,
}) =>
@ -394,10 +414,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#startNumber: startNumber,
},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
_i5.Future<List<Map<String, dynamic>>> getSparkMintMetaData({
String? requestID,
required List<String>? sparkCoinHashes,
}) =>
@ -410,21 +430,21 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#sparkCoinHashes: sparkCoinHashes,
},
),
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i4.Future<List<Map<String, dynamic>>>);
) as _i5.Future<List<Map<String, dynamic>>>);
@override
_i4.Future<int> getSparkLatestCoinId({String? requestID}) =>
_i5.Future<int> getSparkLatestCoinId({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkLatestCoinId,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<int>.value(0),
) as _i4.Future<int>);
returnValue: _i5.Future<int>.value(0),
) as _i5.Future<int>);
@override
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod(
Invocation.method(
#getFeeRate,
@ -432,10 +452,10 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<_i2.Decimal> estimateFee({
_i5.Future<_i2.Decimal> estimateFee({
String? requestID,
required int? blocks,
}) =>
@ -448,7 +468,7 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
#blocks: blocks,
},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#estimateFee,
@ -459,15 +479,15 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
@override
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method(
#relayFee,
[],
{#requestID: requestID},
),
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_1(
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_1(
this,
Invocation.method(
#relayFee,
@ -475,14 +495,14 @@ class MockElectrumXClient extends _i1.Mock implements _i3.ElectrumXClient {
{#requestID: requestID},
),
)),
) as _i4.Future<_i2.Decimal>);
) as _i5.Future<_i2.Decimal>);
}
/// A class which mocks [CachedElectrumXClient].
///
/// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumXClient extends _i1.Mock
implements _i5.CachedElectrumXClient {
implements _i6.CachedElectrumXClient {
MockCachedElectrumXClient() {
_i1.throwOnMissingStub(this);
}
@ -496,10 +516,37 @@ class MockCachedElectrumXClient extends _i1.Mock
),
) as _i3.ElectrumXClient);
@override
_i4.Future<Map<String, dynamic>> getAnonymitySet({
_i4.ElectrumClient get electrumAdapterClient => (super.noSuchMethod(
Invocation.getter(#electrumAdapterClient),
returnValue: _FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterClient),
),
) as _i4.ElectrumClient);
@override
set electrumAdapterClient(_i4.ElectrumClient? _electrumAdapterClient) =>
super.noSuchMethod(
Invocation.setter(
#electrumAdapterClient,
_electrumAdapterClient,
),
returnValueForMissingStub: null,
);
@override
_i5.Future<_i4.ElectrumClient> Function() get electrumAdapterUpdateCallback =>
(super.noSuchMethod(
Invocation.getter(#electrumAdapterUpdateCallback),
returnValue: () =>
_i5.Future<_i4.ElectrumClient>.value(_FakeElectrumClient_3(
this,
Invocation.getter(#electrumAdapterUpdateCallback),
)),
) as _i5.Future<_i4.ElectrumClient> Function());
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -512,13 +559,13 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<Map<String, dynamic>> getSparkAnonymitySet({
_i5.Future<Map<String, dynamic>> getSparkAnonymitySet({
required String? groupId,
String? blockhash = r'',
required _i6.Coin? coin,
required _i7.Coin? coin,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -531,8 +578,8 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method(
@ -550,9 +597,9 @@ class MockCachedElectrumXClient extends _i1.Mock
returnValue: '',
) as String);
@override
_i4.Future<Map<String, dynamic>> getTransaction({
_i5.Future<Map<String, dynamic>> getTransaction({
required String? txHash,
required _i6.Coin? coin,
required _i7.Coin? coin,
bool? verbose = true,
}) =>
(super.noSuchMethod(
@ -566,11 +613,11 @@ class MockCachedElectrumXClient extends _i1.Mock
},
),
returnValue:
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i4.Future<Map<String, dynamic>>);
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>);
@override
_i4.Future<List<String>> getUsedCoinSerials({
required _i6.Coin? coin,
_i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin,
int? startNumber = 0,
}) =>
(super.noSuchMethod(
@ -582,36 +629,36 @@ class MockCachedElectrumXClient extends _i1.Mock
#startNumber: startNumber,
},
),
returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i4.Future<List<String>>);
returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>);
@override
_i4.Future<Set<String>> getSparkUsedCoinsTags({required _i6.Coin? coin}) =>
_i5.Future<Set<String>> getSparkUsedCoinsTags({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#getSparkUsedCoinsTags,
[],
{#coin: coin},
),
returnValue: _i4.Future<Set<String>>.value(<String>{}),
) as _i4.Future<Set<String>>);
returnValue: _i5.Future<Set<String>>.value(<String>{}),
) as _i5.Future<Set<String>>);
@override
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod(
Invocation.method(
#clearSharedTransactionCache,
[],
{#coin: coin},
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
/// A class which mocks [TransactionNotificationTracker].
///
/// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock
implements _i7.TransactionNotificationTracker {
implements _i8.TransactionNotificationTracker {
MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this);
}
@ -640,14 +687,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedPending,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
@ -657,21 +704,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false,
) as bool);
@override
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method(
#addNotifiedConfirmed,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method(
#deleteTransaction,
[txid],
),
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}

View file

@ -712,6 +712,19 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs {
returnValueForMissingStub: null,
);
@override
bool get frostEnabled => (super.noSuchMethod(
Invocation.getter(#frostEnabled),
returnValue: false,
) as bool);
@override
set frostEnabled(bool? frostEnabled) => super.noSuchMethod(
Invocation.setter(
#frostEnabled,
frostEnabled,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,

View file

@ -598,6 +598,19 @@ class MockPrefs extends _i1.Mock implements _i12.Prefs {
returnValueForMissingStub: null,
);
@override
bool get frostEnabled => (super.noSuchMethod(
Invocation.getter(#frostEnabled),
returnValue: false,
) as bool);
@override
set frostEnabled(bool? frostEnabled) => super.noSuchMethod(
Invocation.setter(
#frostEnabled,
frostEnabled,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,

View file

@ -698,6 +698,19 @@ class MockPrefs extends _i1.Mock implements _i14.Prefs {
returnValueForMissingStub: null,
);
@override
bool get frostEnabled => (super.noSuchMethod(
Invocation.getter(#frostEnabled),
returnValue: false,
) as bool);
@override
set frostEnabled(bool? frostEnabled) => super.noSuchMethod(
Invocation.setter(
#frostEnabled,
frostEnabled,
),
returnValueForMissingStub: null,
);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,