fix: update electrumx tests

This commit is contained in:
julian 2023-05-29 10:30:41 -06:00
parent 86fabcf9ff
commit 021165eb17
21 changed files with 1282 additions and 1219 deletions

View file

@ -57,16 +57,18 @@ void main() {
const jsonArgs = '["",true]'; const jsonArgs = '["",true]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"error": { "error": {
"code": 1, "code": 1,
"message": "None should be a transaction hash", "message": "None should be a transaction hash",
}, },
"id": "some requestId", "id": "some requestId",
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -93,13 +95,15 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": {"height": 520481, "hex": "some block hex string"}, "result": {"height": 520481, "hex": "some block hex string"},
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -126,7 +130,9 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -153,9 +159,15 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => {"jsonrpc": "2.0", "result": null, "id": "some requestId"}, (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0",
"result": null,
"id": "some requestId",
}),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -181,7 +193,9 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -208,9 +222,11 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": { "result": {
"genesis_hash": "genesis_hash":
@ -225,7 +241,7 @@ void main() {
"hash_function": "sha256" "hash_function": "sha256"
}, },
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -263,7 +279,9 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -290,13 +308,15 @@ void main() {
const jsonArgs = '["some raw transaction string"]'; const jsonArgs = '["some raw transaction string"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": "the txid of the rawtx", "result": "the txid of the rawtx",
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -323,7 +343,9 @@ void main() {
const jsonArgs = '["some raw transaction string"]'; const jsonArgs = '["some raw transaction string"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -353,16 +375,18 @@ void main() {
const jsonArgs = '["dummy hash"]'; const jsonArgs = '["dummy hash"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": { "result": {
"confirmed": 103873966, "confirmed": 103873966,
"unconfirmed": 23684400, "unconfirmed": 23684400,
}, },
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -389,7 +413,9 @@ void main() {
const jsonArgs = '["dummy hash"]'; const jsonArgs = '["dummy hash"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -418,9 +444,11 @@ void main() {
const jsonArgs = '["dummy hash"]'; const jsonArgs = '["dummy hash"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": [ "result": [
{ {
@ -435,7 +463,7 @@ void main() {
} }
], ],
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -473,7 +501,9 @@ void main() {
const jsonArgs = '["dummy hash"]'; const jsonArgs = '["dummy hash"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -502,9 +532,11 @@ void main() {
const jsonArgs = '["dummy hash"]'; const jsonArgs = '["dummy hash"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": [ "result": [
{ {
@ -523,7 +555,7 @@ void main() {
} }
], ],
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -565,7 +597,9 @@ void main() {
const jsonArgs = '["dummy hash"]'; const jsonArgs = '["dummy hash"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -594,13 +628,15 @@ void main() {
const jsonArgs = '["${SampleGetTransactionData.txHash0}",true]'; const jsonArgs = '["${SampleGetTransactionData.txHash0}",true]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": SampleGetTransactionData.txData0, "result": SampleGetTransactionData.txData0,
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -629,7 +665,9 @@ void main() {
const jsonArgs = '["${SampleGetTransactionData.txHash0}",true]'; const jsonArgs = '["${SampleGetTransactionData.txHash0}",true]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -659,13 +697,15 @@ void main() {
const jsonArgs = '["1",""]'; const jsonArgs = '["1",""]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": GetAnonymitySetSampleData.data, "result": GetAnonymitySetSampleData.data,
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -692,7 +732,9 @@ void main() {
const jsonArgs = '["1",""]'; const jsonArgs = '["1",""]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -721,13 +763,15 @@ void main() {
const jsonArgs = '["some mints"]'; const jsonArgs = '["some mints"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": "mint meta data", "result": "mint meta data",
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -754,7 +798,9 @@ void main() {
const jsonArgs = '["some mints"]'; const jsonArgs = '["some mints"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -783,13 +829,15 @@ void main() {
const jsonArgs = '["0"]'; const jsonArgs = '["0"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": GetUsedSerialsSampleData.serials, "result": GetUsedSerialsSampleData.serials,
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -816,7 +864,9 @@ void main() {
const jsonArgs = '["0"]'; const jsonArgs = '["0"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -845,9 +895,15 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => {"jsonrpc": "2.0", "result": 1, "id": "some requestId"}, (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0",
"result": 1,
"id": "some requestId",
}),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -873,7 +929,9 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -886,7 +944,10 @@ void main() {
prefs: mockPrefs, prefs: mockPrefs,
failovers: []); failovers: []);
expect(() => client.getLatestCoinId(requestID: "some requestId"), expect(
() => client.getLatestCoinId(
requestID: "some requestId",
),
throwsA(isA<Exception>())); throwsA(isA<Exception>()));
verify(mockPrefs.wifiOnly).called(1); verify(mockPrefs.wifiOnly).called(1);
verifyNoMoreInteractions(mockPrefs); verifyNoMoreInteractions(mockPrefs);
@ -900,13 +961,15 @@ void main() {
const jsonArgs = '["1",""]'; const jsonArgs = '["1",""]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": GetAnonymitySetSampleData.data, "result": GetAnonymitySetSampleData.data,
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -933,7 +996,9 @@ void main() {
const jsonArgs = '["1",""]'; const jsonArgs = '["1",""]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -947,8 +1012,10 @@ void main() {
failovers: []); failovers: []);
expect( expect(
() => () => client.getAnonymitySet(
client.getAnonymitySet(groupId: "1", requestID: "some requestId"), groupId: "1",
requestID: "some requestId",
),
throwsA(isA<Exception>())); throwsA(isA<Exception>()));
verify(mockPrefs.wifiOnly).called(1); verify(mockPrefs.wifiOnly).called(1);
verifyNoMoreInteractions(mockPrefs); verifyNoMoreInteractions(mockPrefs);
@ -962,13 +1029,15 @@ void main() {
const jsonArgs = '["some mints"]'; const jsonArgs = '["some mints"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": "mint meta data", "result": "mint meta data",
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -995,7 +1064,9 @@ void main() {
const jsonArgs = '["some mints"]'; const jsonArgs = '["some mints"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -1010,7 +1081,9 @@ void main() {
expect( expect(
() => client.getMintData( () => client.getMintData(
mints: "some mints", requestID: "some requestId"), mints: "some mints",
requestID: "some requestId",
),
throwsA(isA<Exception>())); throwsA(isA<Exception>()));
verify(mockPrefs.wifiOnly).called(1); verify(mockPrefs.wifiOnly).called(1);
verifyNoMoreInteractions(mockPrefs); verifyNoMoreInteractions(mockPrefs);
@ -1024,13 +1097,15 @@ void main() {
const jsonArgs = '["0"]'; const jsonArgs = '["0"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": GetUsedSerialsSampleData.serials, "result": GetUsedSerialsSampleData.serials,
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -1057,7 +1132,9 @@ void main() {
const jsonArgs = '["0"]'; const jsonArgs = '["0"]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -1086,9 +1163,15 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => {"jsonrpc": "2.0", "result": 1, "id": "some requestId"}, (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0",
"result": 1,
"id": "some requestId",
}),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -1114,7 +1197,9 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -1141,15 +1226,17 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenAnswer( ).thenAnswer(
(_) async => { (_) async => JsonRPCResponse(data: {
"jsonrpc": "2.0", "jsonrpc": "2.0",
"result": { "result": {
"rate": 1000, "rate": 1000,
}, },
"id": "some requestId" "id": "some requestId"
}, }),
); );
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();
@ -1175,7 +1262,9 @@ void main() {
const jsonArgs = '[]'; const jsonArgs = '[]';
when( when(
mockClient.request( mockClient.request(
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'), '{"jsonrpc": "2.0", "id": "some requestId",'
'"method": "$command","params": $jsonArgs}',
),
).thenThrow(Exception()); ).thenThrow(Exception());
final mockPrefs = MockPrefs(); final mockPrefs = MockPrefs();

View file

@ -33,6 +33,17 @@ class _FakeDuration_0 extends _i1.SmartFake implements Duration {
); );
} }
class _FakeJsonRPCResponse_1 extends _i1.SmartFake
implements _i2.JsonRPCResponse {
_FakeJsonRPCResponse_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [JsonRPC]. /// A class which mocks [JsonRPC].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
@ -47,40 +58,16 @@ class MockJsonRPC extends _i1.Mock implements _i2.JsonRPC {
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
set useSSL(bool? _useSSL) => super.noSuchMethod(
Invocation.setter(
#useSSL,
_useSSL,
),
returnValueForMissingStub: null,
);
@override
String get host => (super.noSuchMethod( String get host => (super.noSuchMethod(
Invocation.getter(#host), Invocation.getter(#host),
returnValue: '', returnValue: '',
) as String); ) as String);
@override @override
set host(String? _host) => super.noSuchMethod(
Invocation.setter(
#host,
_host,
),
returnValueForMissingStub: null,
);
@override
int get port => (super.noSuchMethod( int get port => (super.noSuchMethod(
Invocation.getter(#port), Invocation.getter(#port),
returnValue: 0, returnValue: 0,
) as int); ) as int);
@override @override
set port(int? _port) => super.noSuchMethod(
Invocation.setter(
#port,
_port,
),
returnValueForMissingStub: null,
);
@override
Duration get connectionTimeout => (super.noSuchMethod( Duration get connectionTimeout => (super.noSuchMethod(
Invocation.getter(#connectionTimeout), Invocation.getter(#connectionTimeout),
returnValue: _FakeDuration_0( returnValue: _FakeDuration_0(
@ -89,21 +76,40 @@ class MockJsonRPC extends _i1.Mock implements _i2.JsonRPC {
), ),
) as Duration); ) as Duration);
@override @override
set connectionTimeout(Duration? _connectionTimeout) => super.noSuchMethod( _i3.Future<_i2.JsonRPCResponse> request(String? jsonRpcRequest) =>
Invocation.setter( (super.noSuchMethod(
#connectionTimeout,
_connectionTimeout,
),
returnValueForMissingStub: null,
);
@override
_i3.Future<dynamic> request(String? jsonRpcRequest) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#request, #request,
[jsonRpcRequest], [jsonRpcRequest],
), ),
returnValue: _i3.Future<dynamic>.value(), returnValue:
) as _i3.Future<dynamic>); _i3.Future<_i2.JsonRPCResponse>.value(_FakeJsonRPCResponse_1(
this,
Invocation.method(
#request,
[jsonRpcRequest],
),
)),
) as _i3.Future<_i2.JsonRPCResponse>);
@override
_i3.Future<void> disconnect({required String? reason}) => (super.noSuchMethod(
Invocation.method(
#disconnect,
[],
{#reason: reason},
),
returnValue: _i3.Future<void>.value(),
returnValueForMissingStub: _i3.Future<void>.value(),
) as _i3.Future<void>);
@override
_i3.Future<void> connect() => (super.noSuchMethod(
Invocation.method(
#connect,
[],
),
returnValue: _i3.Future<void>.value(),
returnValueForMissingStub: _i3.Future<void>.value(),
) as _i3.Future<void>);
} }
/// A class which mocks [Prefs]. /// A class which mocks [Prefs].

View file

@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>); ) as _i5.Future<void>);
@override @override
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<bool> verifyInstalled({required String? themeId}) => _i5.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -2278,6 +2278,15 @@ class MockThemeService extends _i1.Mock implements _i32.ThemeService {
returnValueForMissingStub: _i23.Future<void>.value(), returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>); ) as _i23.Future<void>);
@override @override
_i23.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<bool> verifyInstalled({required String? themeId}) => _i23.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -3,24 +3,23 @@
// Do not manually edit this file. // Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes // ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i9; import 'dart:async' as _i8;
import 'dart:ui' as _i15; import 'dart:ui' as _i14;
import 'package:local_auth/auth_strings.dart' as _i12; import 'package:local_auth/auth_strings.dart' as _i11;
import 'package:local_auth/local_auth.dart' as _i11; import 'package:local_auth/local_auth.dart' as _i10;
import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i7; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i7;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i8; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i2;
import 'package:stackwallet/models/balance.dart' as _i5; import 'package:stackwallet/models/balance.dart' as _i5;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i17; import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16;
import 'package:stackwallet/models/models.dart' as _i4; import 'package:stackwallet/models/models.dart' as _i4;
import 'package:stackwallet/services/coins/coin_service.dart' as _i3; import 'package:stackwallet/services/coins/coin_service.dart' as _i3;
import 'package:stackwallet/services/coins/manager.dart' as _i16; import 'package:stackwallet/services/coins/manager.dart' as _i15;
import 'package:stackwallet/services/wallets_service.dart' as _i14; import 'package:stackwallet/services/wallets_service.dart' as _i13;
import 'package:stackwallet/utilities/amount/amount.dart' as _i6; import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
import 'package:stackwallet/utilities/biometrics.dart' as _i13; import 'package:stackwallet/utilities/biometrics.dart' as _i12;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
import 'package:stackwallet/utilities/prefs.dart' as _i2;
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_redundant_argument_values
@ -33,8 +32,8 @@ import 'package:stackwallet/utilities/prefs.dart' as _i2;
// ignore_for_file: camel_case_types // ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class // ignore_for_file: subtype_of_sealed_class
class _FakePrefs_0 extends _i1.SmartFake implements _i2.Prefs { class _FakeElectrumX_0 extends _i1.SmartFake implements _i2.ElectrumX {
_FakePrefs_0( _FakeElectrumX_0(
Object parent, Object parent,
Invocation parentInvocation, Invocation parentInvocation,
) : super( ) : super(
@ -93,38 +92,18 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
} }
@override @override
String get server => (super.noSuchMethod( _i2.ElectrumX get electrumXClient => (super.noSuchMethod(
Invocation.getter(#server), Invocation.getter(#electrumXClient),
returnValue: '', returnValue: _FakeElectrumX_0(
) as String);
@override
int get port => (super.noSuchMethod(
Invocation.getter(#port),
returnValue: 0,
) as int);
@override
bool get useSSL => (super.noSuchMethod(
Invocation.getter(#useSSL),
returnValue: false,
) as bool);
@override
_i2.Prefs get prefs => (super.noSuchMethod(
Invocation.getter(#prefs),
returnValue: _FakePrefs_0(
this, this,
Invocation.getter(#prefs), Invocation.getter(#electrumXClient),
), ),
) as _i2.Prefs); ) as _i2.ElectrumX);
@override @override
List<_i8.ElectrumXNode> get failovers => (super.noSuchMethod( _i8.Future<Map<String, dynamic>> getAnonymitySet({
Invocation.getter(#failovers),
returnValue: <_i8.ElectrumXNode>[],
) as List<_i8.ElectrumXNode>);
@override
_i9.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId, required String? groupId,
String? blockhash = r'', String? blockhash = r'',
required _i10.Coin? coin, required _i9.Coin? coin,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -137,8 +116,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>); ) as _i8.Future<Map<String, dynamic>>);
@override @override
String base64ToHex(String? source) => (super.noSuchMethod( String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -156,9 +135,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
returnValue: '', returnValue: '',
) as String); ) as String);
@override @override
_i9.Future<Map<String, dynamic>> getTransaction({ _i8.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
required _i10.Coin? coin, required _i9.Coin? coin,
bool? verbose = true, bool? verbose = true,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -172,11 +151,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>); ) as _i8.Future<Map<String, dynamic>>);
@override @override
_i9.Future<List<String>> getUsedCoinSerials({ _i8.Future<List<String>> getUsedCoinSerials({
required _i10.Coin? coin, required _i9.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -188,43 +167,43 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i9.Future<List<String>>.value(<String>[]), returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>); ) as _i8.Future<List<String>>);
@override @override
_i9.Future<void> clearSharedTransactionCache({required _i10.Coin? coin}) => _i8.Future<void> clearSharedTransactionCache({required _i9.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#clearSharedTransactionCache, #clearSharedTransactionCache,
[], [],
{#coin: coin}, {#coin: coin},
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
} }
/// A class which mocks [LocalAuthentication]. /// A class which mocks [LocalAuthentication].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockLocalAuthentication extends _i1.Mock class MockLocalAuthentication extends _i1.Mock
implements _i11.LocalAuthentication { implements _i10.LocalAuthentication {
MockLocalAuthentication() { MockLocalAuthentication() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
_i9.Future<bool> get canCheckBiometrics => (super.noSuchMethod( _i8.Future<bool> get canCheckBiometrics => (super.noSuchMethod(
Invocation.getter(#canCheckBiometrics), Invocation.getter(#canCheckBiometrics),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
_i9.Future<bool> authenticateWithBiometrics({ _i8.Future<bool> authenticateWithBiometrics({
required String? localizedReason, required String? localizedReason,
bool? useErrorDialogs = true, bool? useErrorDialogs = true,
bool? stickyAuth = false, bool? stickyAuth = false,
_i12.AndroidAuthMessages? androidAuthStrings = _i11.AndroidAuthMessages? androidAuthStrings =
const _i12.AndroidAuthMessages(), const _i11.AndroidAuthMessages(),
_i12.IOSAuthMessages? iOSAuthStrings = const _i12.IOSAuthMessages(), _i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(),
bool? sensitiveTransaction = true, bool? sensitiveTransaction = true,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -240,16 +219,16 @@ class MockLocalAuthentication extends _i1.Mock
#sensitiveTransaction: sensitiveTransaction, #sensitiveTransaction: sensitiveTransaction,
}, },
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
_i9.Future<bool> authenticate({ _i8.Future<bool> authenticate({
required String? localizedReason, required String? localizedReason,
bool? useErrorDialogs = true, bool? useErrorDialogs = true,
bool? stickyAuth = false, bool? stickyAuth = false,
_i12.AndroidAuthMessages? androidAuthStrings = _i11.AndroidAuthMessages? androidAuthStrings =
const _i12.AndroidAuthMessages(), const _i11.AndroidAuthMessages(),
_i12.IOSAuthMessages? iOSAuthStrings = const _i12.IOSAuthMessages(), _i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(),
bool? sensitiveTransaction = true, bool? sensitiveTransaction = true,
bool? biometricOnly = false, bool? biometricOnly = false,
}) => }) =>
@ -267,46 +246,46 @@ class MockLocalAuthentication extends _i1.Mock
#biometricOnly: biometricOnly, #biometricOnly: biometricOnly,
}, },
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
_i9.Future<bool> stopAuthentication() => (super.noSuchMethod( _i8.Future<bool> stopAuthentication() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#stopAuthentication, #stopAuthentication,
[], [],
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
_i9.Future<bool> isDeviceSupported() => (super.noSuchMethod( _i8.Future<bool> isDeviceSupported() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#isDeviceSupported, #isDeviceSupported,
[], [],
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
_i9.Future<List<_i11.BiometricType>> getAvailableBiometrics() => _i8.Future<List<_i10.BiometricType>> getAvailableBiometrics() =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getAvailableBiometrics, #getAvailableBiometrics,
[], [],
), ),
returnValue: returnValue:
_i9.Future<List<_i11.BiometricType>>.value(<_i11.BiometricType>[]), _i8.Future<List<_i10.BiometricType>>.value(<_i10.BiometricType>[]),
) as _i9.Future<List<_i11.BiometricType>>); ) as _i8.Future<List<_i10.BiometricType>>);
} }
/// A class which mocks [Biometrics]. /// A class which mocks [Biometrics].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockBiometrics extends _i1.Mock implements _i13.Biometrics { class MockBiometrics extends _i1.Mock implements _i12.Biometrics {
MockBiometrics() { MockBiometrics() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
_i9.Future<bool> authenticate({ _i8.Future<bool> authenticate({
required String? cancelButtonText, required String? cancelButtonText,
required String? localizedReason, required String? localizedReason,
required String? title, required String? title,
@ -321,28 +300,28 @@ class MockBiometrics extends _i1.Mock implements _i13.Biometrics {
#title: title, #title: title,
}, },
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
} }
/// A class which mocks [WalletsService]. /// A class which mocks [WalletsService].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockWalletsService extends _i1.Mock implements _i14.WalletsService { class MockWalletsService extends _i1.Mock implements _i13.WalletsService {
@override @override
_i9.Future<Map<String, _i14.WalletInfo>> get walletNames => _i8.Future<Map<String, _i13.WalletInfo>> get walletNames =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.getter(#walletNames), Invocation.getter(#walletNames),
returnValue: _i9.Future<Map<String, _i14.WalletInfo>>.value( returnValue: _i8.Future<Map<String, _i13.WalletInfo>>.value(
<String, _i14.WalletInfo>{}), <String, _i13.WalletInfo>{}),
) as _i9.Future<Map<String, _i14.WalletInfo>>); ) as _i8.Future<Map<String, _i13.WalletInfo>>);
@override @override
bool get hasListeners => (super.noSuchMethod( bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners), Invocation.getter(#hasListeners),
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i9.Future<bool> renameWallet({ _i8.Future<bool> renameWallet({
required String? from, required String? from,
required String? to, required String? to,
required bool? shouldNotifyListeners, required bool? shouldNotifyListeners,
@ -357,21 +336,21 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners, #shouldNotifyListeners: shouldNotifyListeners,
}, },
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
Map<String, _i14.WalletInfo> fetchWalletsData() => (super.noSuchMethod( Map<String, _i13.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#fetchWalletsData, #fetchWalletsData,
[], [],
), ),
returnValue: <String, _i14.WalletInfo>{}, returnValue: <String, _i13.WalletInfo>{},
) as Map<String, _i14.WalletInfo>); ) as Map<String, _i13.WalletInfo>);
@override @override
_i9.Future<void> addExistingStackWallet({ _i8.Future<void> addExistingStackWallet({
required String? name, required String? name,
required String? walletId, required String? walletId,
required _i10.Coin? coin, required _i9.Coin? coin,
required bool? shouldNotifyListeners, required bool? shouldNotifyListeners,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -385,13 +364,13 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners, #shouldNotifyListeners: shouldNotifyListeners,
}, },
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<String?> addNewWallet({ _i8.Future<String?> addNewWallet({
required String? name, required String? name,
required _i10.Coin? coin, required _i9.Coin? coin,
required bool? shouldNotifyListeners, required bool? shouldNotifyListeners,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -404,46 +383,46 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
#shouldNotifyListeners: shouldNotifyListeners, #shouldNotifyListeners: shouldNotifyListeners,
}, },
), ),
returnValue: _i9.Future<String?>.value(), returnValue: _i8.Future<String?>.value(),
) as _i9.Future<String?>); ) as _i8.Future<String?>);
@override @override
_i9.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod( _i8.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#getFavoriteWalletIds, #getFavoriteWalletIds,
[], [],
), ),
returnValue: _i9.Future<List<String>>.value(<String>[]), returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>); ) as _i8.Future<List<String>>);
@override @override
_i9.Future<void> saveFavoriteWalletIds(List<String>? walletIds) => _i8.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#saveFavoriteWalletIds, #saveFavoriteWalletIds,
[walletIds], [walletIds],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<void> addFavorite(String? walletId) => (super.noSuchMethod( _i8.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addFavorite, #addFavorite,
[walletId], [walletId],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod( _i8.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#removeFavorite, #removeFavorite,
[walletId], [walletId],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<void> moveFavorite({ _i8.Future<void> moveFavorite({
required int? fromIndex, required int? fromIndex,
required int? toIndex, required int? toIndex,
}) => }) =>
@ -456,48 +435,48 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
#toIndex: toIndex, #toIndex: toIndex,
}, },
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod( _i8.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#checkForDuplicate, #checkForDuplicate,
[name], [name],
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
_i9.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod( _i8.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#getWalletId, #getWalletId,
[walletName], [walletName],
), ),
returnValue: _i9.Future<String?>.value(), returnValue: _i8.Future<String?>.value(),
) as _i9.Future<String?>); ) as _i8.Future<String?>);
@override @override
_i9.Future<bool> isMnemonicVerified({required String? walletId}) => _i8.Future<bool> isMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#isMnemonicVerified, #isMnemonicVerified,
[], [],
{#walletId: walletId}, {#walletId: walletId},
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
_i9.Future<void> setMnemonicVerified({required String? walletId}) => _i8.Future<void> setMnemonicVerified({required String? walletId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#setMnemonicVerified, #setMnemonicVerified,
[], [],
{#walletId: walletId}, {#walletId: walletId},
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<int> deleteWallet( _i8.Future<int> deleteWallet(
String? name, String? name,
bool? shouldNotifyListeners, bool? shouldNotifyListeners,
) => ) =>
@ -509,20 +488,20 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
shouldNotifyListeners, shouldNotifyListeners,
], ],
), ),
returnValue: _i9.Future<int>.value(0), returnValue: _i8.Future<int>.value(0),
) as _i9.Future<int>); ) as _i8.Future<int>);
@override @override
_i9.Future<void> refreshWallets(bool? shouldNotifyListeners) => _i8.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#refreshWallets, #refreshWallets,
[shouldNotifyListeners], [shouldNotifyListeners],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( void addListener(_i14.VoidCallback? listener) => super.noSuchMethod(
Invocation.method( Invocation.method(
#addListener, #addListener,
[listener], [listener],
@ -530,7 +509,7 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
returnValueForMissingStub: null, returnValueForMissingStub: null,
); );
@override @override
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod(
Invocation.method( Invocation.method(
#removeListener, #removeListener,
[listener], [listener],
@ -558,7 +537,7 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
/// A class which mocks [Manager]. /// A class which mocks [Manager].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockManager extends _i1.Mock implements _i16.Manager { class MockManager extends _i1.Mock implements _i15.Manager {
@override @override
bool get isActiveWallet => (super.noSuchMethod( bool get isActiveWallet => (super.noSuchMethod(
Invocation.getter(#isActiveWallet), Invocation.getter(#isActiveWallet),
@ -586,10 +565,10 @@ class MockManager extends _i1.Mock implements _i16.Manager {
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i10.Coin get coin => (super.noSuchMethod( _i9.Coin get coin => (super.noSuchMethod(
Invocation.getter(#coin), Invocation.getter(#coin),
returnValue: _i10.Coin.bitcoin, returnValue: _i9.Coin.bitcoin,
) as _i10.Coin); ) as _i9.Coin);
@override @override
bool get isRefreshing => (super.noSuchMethod( bool get isRefreshing => (super.noSuchMethod(
Invocation.getter(#isRefreshing), Invocation.getter(#isRefreshing),
@ -622,23 +601,23 @@ class MockManager extends _i1.Mock implements _i16.Manager {
returnValueForMissingStub: null, returnValueForMissingStub: null,
); );
@override @override
_i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod( _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
Invocation.getter(#fees), Invocation.getter(#fees),
returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2( returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
this, this,
Invocation.getter(#fees), Invocation.getter(#fees),
)), )),
) as _i9.Future<_i4.FeeObject>); ) as _i8.Future<_i4.FeeObject>);
@override @override
_i9.Future<int> get maxFee => (super.noSuchMethod( _i8.Future<int> get maxFee => (super.noSuchMethod(
Invocation.getter(#maxFee), Invocation.getter(#maxFee),
returnValue: _i9.Future<int>.value(0), returnValue: _i8.Future<int>.value(0),
) as _i9.Future<int>); ) as _i8.Future<int>);
@override @override
_i9.Future<String> get currentReceivingAddress => (super.noSuchMethod( _i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress), Invocation.getter(#currentReceivingAddress),
returnValue: _i9.Future<String>.value(''), returnValue: _i8.Future<String>.value(''),
) as _i9.Future<String>); ) as _i8.Future<String>);
@override @override
_i5.Balance get balance => (super.noSuchMethod( _i5.Balance get balance => (super.noSuchMethod(
Invocation.getter(#balance), Invocation.getter(#balance),
@ -648,16 +627,16 @@ class MockManager extends _i1.Mock implements _i16.Manager {
), ),
) as _i5.Balance); ) as _i5.Balance);
@override @override
_i9.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod( _i8.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions), Invocation.getter(#transactions),
returnValue: returnValue:
_i9.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]), _i8.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i9.Future<List<_i17.Transaction>>); ) as _i8.Future<List<_i16.Transaction>>);
@override @override
_i9.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod( _i8.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos), Invocation.getter(#utxos),
returnValue: _i9.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]), returnValue: _i8.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i9.Future<List<_i17.UTXO>>); ) as _i8.Future<List<_i16.UTXO>>);
@override @override
set walletName(String? newName) => super.noSuchMethod( set walletName(String? newName) => super.noSuchMethod(
Invocation.setter( Invocation.setter(
@ -677,15 +656,15 @@ class MockManager extends _i1.Mock implements _i16.Manager {
returnValue: '', returnValue: '',
) as String); ) as String);
@override @override
_i9.Future<List<String>> get mnemonic => (super.noSuchMethod( _i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
Invocation.getter(#mnemonic), Invocation.getter(#mnemonic),
returnValue: _i9.Future<List<String>>.value(<String>[]), returnValue: _i8.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<String>>); ) as _i8.Future<List<String>>);
@override @override
_i9.Future<String?> get mnemonicPassphrase => (super.noSuchMethod( _i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
Invocation.getter(#mnemonicPassphrase), Invocation.getter(#mnemonicPassphrase),
returnValue: _i9.Future<String?>.value(), returnValue: _i8.Future<String?>.value(),
) as _i9.Future<String?>); ) as _i8.Future<String?>);
@override @override
bool get isConnected => (super.noSuchMethod( bool get isConnected => (super.noSuchMethod(
Invocation.getter(#isConnected), Invocation.getter(#isConnected),
@ -727,24 +706,24 @@ class MockManager extends _i1.Mock implements _i16.Manager {
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i9.Future<String> get xpub => (super.noSuchMethod( _i8.Future<String> get xpub => (super.noSuchMethod(
Invocation.getter(#xpub), Invocation.getter(#xpub),
returnValue: _i9.Future<String>.value(''), returnValue: _i8.Future<String>.value(''),
) as _i9.Future<String>); ) as _i8.Future<String>);
@override @override
bool get hasListeners => (super.noSuchMethod( bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners), Invocation.getter(#hasListeners),
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i9.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod( _i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#updateNode, #updateNode,
[shouldRefresh], [shouldRefresh],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
void dispose() => super.noSuchMethod( void dispose() => super.noSuchMethod(
Invocation.method( Invocation.method(
@ -754,7 +733,7 @@ class MockManager extends _i1.Mock implements _i16.Manager {
returnValueForMissingStub: null, returnValueForMissingStub: null,
); );
@override @override
_i9.Future<Map<String, dynamic>> prepareSend({ _i8.Future<Map<String, dynamic>> prepareSend({
required String? address, required String? address,
required _i6.Amount? amount, required _i6.Amount? amount,
Map<String, dynamic>? args, Map<String, dynamic>? args,
@ -770,27 +749,27 @@ class MockManager extends _i1.Mock implements _i16.Manager {
}, },
), ),
returnValue: returnValue:
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>); ) as _i8.Future<Map<String, dynamic>>);
@override @override
_i9.Future<String> confirmSend({required Map<String, dynamic>? txData}) => _i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#confirmSend, #confirmSend,
[], [],
{#txData: txData}, {#txData: txData},
), ),
returnValue: _i9.Future<String>.value(''), returnValue: _i8.Future<String>.value(''),
) as _i9.Future<String>); ) as _i8.Future<String>);
@override @override
_i9.Future<void> refresh() => (super.noSuchMethod( _i8.Future<void> refresh() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#refresh, #refresh,
[], [],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
bool validateAddress(String? address) => (super.noSuchMethod( bool validateAddress(String? address) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -800,33 +779,33 @@ class MockManager extends _i1.Mock implements _i16.Manager {
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i9.Future<bool> testNetworkConnection() => (super.noSuchMethod( _i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#testNetworkConnection, #testNetworkConnection,
[], [],
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
_i9.Future<void> initializeNew() => (super.noSuchMethod( _i8.Future<void> initializeNew() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#initializeNew, #initializeNew,
[], [],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<void> initializeExisting() => (super.noSuchMethod( _i8.Future<void> initializeExisting() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#initializeExisting, #initializeExisting,
[], [],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<void> recoverFromMnemonic({ _i8.Future<void> recoverFromMnemonic({
required String? mnemonic, required String? mnemonic,
String? mnemonicPassphrase, String? mnemonicPassphrase,
required int? maxUnusedAddressGap, required int? maxUnusedAddressGap,
@ -845,20 +824,20 @@ class MockManager extends _i1.Mock implements _i16.Manager {
#height: height, #height: height,
}, },
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<void> exitCurrentWallet() => (super.noSuchMethod( _i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#exitCurrentWallet, #exitCurrentWallet,
[], [],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<void> fullRescan( _i8.Future<void> fullRescan(
int? maxUnusedAddressGap, int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck, int? maxNumberOfIndexesToCheck,
) => ) =>
@ -870,11 +849,11 @@ class MockManager extends _i1.Mock implements _i16.Manager {
maxNumberOfIndexesToCheck, maxNumberOfIndexesToCheck,
], ],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
_i9.Future<_i6.Amount> estimateFeeFor( _i8.Future<_i6.Amount> estimateFeeFor(
_i6.Amount? amount, _i6.Amount? amount,
int? feeRate, int? feeRate,
) => ) =>
@ -886,7 +865,7 @@ class MockManager extends _i1.Mock implements _i16.Manager {
feeRate, feeRate,
], ],
), ),
returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4( returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4(
this, this,
Invocation.method( Invocation.method(
#estimateFeeFor, #estimateFeeFor,
@ -896,26 +875,26 @@ class MockManager extends _i1.Mock implements _i16.Manager {
], ],
), ),
)), )),
) as _i9.Future<_i6.Amount>); ) as _i8.Future<_i6.Amount>);
@override @override
_i9.Future<bool> generateNewAddress() => (super.noSuchMethod( _i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#generateNewAddress, #generateNewAddress,
[], [],
), ),
returnValue: _i9.Future<bool>.value(false), returnValue: _i8.Future<bool>.value(false),
) as _i9.Future<bool>); ) as _i8.Future<bool>);
@override @override
_i9.Future<void> resetRescanOnOpen() => (super.noSuchMethod( _i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#resetRescanOnOpen, #resetRescanOnOpen,
[], [],
), ),
returnValue: _i9.Future<void>.value(), returnValue: _i8.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(), returnValueForMissingStub: _i8.Future<void>.value(),
) as _i9.Future<void>); ) as _i8.Future<void>);
@override @override
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod( void addListener(_i14.VoidCallback? listener) => super.noSuchMethod(
Invocation.method( Invocation.method(
#addListener, #addListener,
[listener], [listener],
@ -923,7 +902,7 @@ class MockManager extends _i1.Mock implements _i16.Manager {
returnValueForMissingStub: null, returnValueForMissingStub: null,
); );
@override @override
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod( void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod(
Invocation.method( Invocation.method(
#removeListener, #removeListener,
[listener], [listener],

View file

@ -3,16 +3,15 @@
// Do not manually edit this file. // Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes // ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i5; import 'dart:async' as _i4;
import 'package:decimal/decimal.dart' as _i2; import 'package:decimal/decimal.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart' import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i8; as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/utilities/prefs.dart' as _i3;
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_redundant_argument_values
@ -35,8 +34,8 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal {
); );
} }
class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
_FakePrefs_1( _FakeElectrumX_1(
Object parent, Object parent,
Invocation parentInvocation, Invocation parentInvocation,
) : super( ) : super(
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
/// A class which mocks [ElectrumX]. /// A class which mocks [ElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { class MockElectrumX extends _i1.Mock implements _i3.ElectrumX {
MockElectrumX() { MockElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod( set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
Invocation.setter( Invocation.setter(
#failovers, #failovers,
_failovers, _failovers,
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<dynamic> request({ _i4.Future<dynamic> request({
required String? command, required String? command,
List<dynamic>? args = const [], List<dynamic>? args = const [],
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<List<Map<String, dynamic>>> batchRequest({ _i4.Future<List<Map<String, dynamic>>> batchRequest({
required String? command, required String? command,
required Map<String, List<dynamic>>? args, required Map<String, List<dynamic>>? args,
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<bool> ping({ _i4.Future<bool> ping({
String? requestID, String? requestID,
int? retryCount = 1, int? retryCount = 1,
}) => }) =>
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retryCount: retryCount, #retryCount: retryCount,
}, },
), ),
returnValue: _i5.Future<bool>.value(false), returnValue: _i4.Future<bool>.value(false),
) as _i5.Future<bool>); ) as _i4.Future<bool>);
@override @override
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) => _i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getBlockHeadTip, #getBlockHeadTip,
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) => _i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getServerFeatures, #getServerFeatures,
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<String> broadcastTransaction({ _i4.Future<String> broadcastTransaction({
required String? rawTx, required String? rawTx,
String? requestID, String? requestID,
}) => }) =>
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<String>.value(''), returnValue: _i4.Future<String>.value(''),
) as _i5.Future<String>); ) as _i4.Future<String>);
@override @override
_i5.Future<Map<String, dynamic>> getBalance({ _i4.Future<Map<String, dynamic>> getBalance({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getHistory({ _i4.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getUTXOs({ _i4.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
bool? verbose = true, bool? verbose = true,
String? requestID, String? requestID,
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getAnonymitySet({ _i4.Future<Map<String, dynamic>> getAnonymitySet({
String? groupId = r'1', String? groupId = r'1',
String? blockhash = r'', String? blockhash = r'',
String? requestID, String? requestID,
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<dynamic> getMintData({ _i4.Future<dynamic> getMintData({
dynamic mints, dynamic mints,
String? requestID, String? requestID,
}) => }) =>
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({ _i4.Future<Map<String, dynamic>> getUsedCoinSerials({
String? requestID, String? requestID,
required int? startNumber, required int? startNumber,
}) => }) =>
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod( _i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#getLatestCoinId, #getLatestCoinId,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<int>.value(0), returnValue: _i4.Future<int>.value(0),
) as _i5.Future<int>); ) as _i4.Future<int>);
@override @override
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) => _i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getFeeRate, #getFeeRate,
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<_i2.Decimal> estimateFee({ _i4.Future<_i2.Decimal> estimateFee({
String? requestID, String? requestID,
required int? blocks, required int? blocks,
}) => }) =>
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#blocks: blocks, #blocks: blocks,
}, },
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#estimateFee, #estimateFee,
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
@override @override
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( _i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#relayFee, #relayFee,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#relayFee, #relayFee,
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
} }
/// A class which mocks [CachedElectrumX]. /// A class which mocks [CachedElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
MockCachedElectrumX() { MockCachedElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
String get server => (super.noSuchMethod( _i3.ElectrumX get electrumXClient => (super.noSuchMethod(
Invocation.getter(#server), Invocation.getter(#electrumXClient),
returnValue: '', returnValue: _FakeElectrumX_1(
) as String);
@override
int get port => (super.noSuchMethod(
Invocation.getter(#port),
returnValue: 0,
) as int);
@override
bool get useSSL => (super.noSuchMethod(
Invocation.getter(#useSSL),
returnValue: false,
) as bool);
@override
_i3.Prefs get prefs => (super.noSuchMethod(
Invocation.getter(#prefs),
returnValue: _FakePrefs_1(
this, this,
Invocation.getter(#prefs), Invocation.getter(#electrumXClient),
), ),
) as _i3.Prefs); ) as _i3.ElectrumX);
@override @override
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod( _i4.Future<Map<String, dynamic>> getAnonymitySet({
Invocation.getter(#failovers),
returnValue: <_i4.ElectrumXNode>[],
) as List<_i4.ElectrumXNode>);
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId, required String? groupId,
String? blockhash = r'', String? blockhash = r'',
required _i7.Coin? coin, required _i6.Coin? coin,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
String base64ToHex(String? source) => (super.noSuchMethod( String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
returnValue: '', returnValue: '',
) as String); ) as String);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
required _i7.Coin? coin, required _i6.Coin? coin,
bool? verbose = true, bool? verbose = true,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<String>> getUsedCoinSerials({ _i4.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i6.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<String>>.value(<String>[]), returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>); ) as _i4.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#clearSharedTransactionCache, #clearSharedTransactionCache,
[], [],
{#coin: coin}, {#coin: coin},
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }
/// A class which mocks [TransactionNotificationTracker]. /// A class which mocks [TransactionNotificationTracker].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock class MockTransactionNotificationTracker extends _i1.Mock
implements _i8.TransactionNotificationTracker { implements _i7.TransactionNotificationTracker {
MockTransactionNotificationTracker() { MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedPending, #addNotifiedPending,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedConfirmed, #addNotifiedConfirmed,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod( _i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#deleteTransaction, #deleteTransaction,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }

View file

@ -3,16 +3,15 @@
// Do not manually edit this file. // Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes // ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i5; import 'dart:async' as _i4;
import 'package:decimal/decimal.dart' as _i2; import 'package:decimal/decimal.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart' import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i8; as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/utilities/prefs.dart' as _i3;
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_redundant_argument_values
@ -35,8 +34,8 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal {
); );
} }
class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
_FakePrefs_1( _FakeElectrumX_1(
Object parent, Object parent,
Invocation parentInvocation, Invocation parentInvocation,
) : super( ) : super(
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
/// A class which mocks [ElectrumX]. /// A class which mocks [ElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { class MockElectrumX extends _i1.Mock implements _i3.ElectrumX {
MockElectrumX() { MockElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod( set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
Invocation.setter( Invocation.setter(
#failovers, #failovers,
_failovers, _failovers,
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<dynamic> request({ _i4.Future<dynamic> request({
required String? command, required String? command,
List<dynamic>? args = const [], List<dynamic>? args = const [],
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<List<Map<String, dynamic>>> batchRequest({ _i4.Future<List<Map<String, dynamic>>> batchRequest({
required String? command, required String? command,
required Map<String, List<dynamic>>? args, required Map<String, List<dynamic>>? args,
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<bool> ping({ _i4.Future<bool> ping({
String? requestID, String? requestID,
int? retryCount = 1, int? retryCount = 1,
}) => }) =>
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retryCount: retryCount, #retryCount: retryCount,
}, },
), ),
returnValue: _i5.Future<bool>.value(false), returnValue: _i4.Future<bool>.value(false),
) as _i5.Future<bool>); ) as _i4.Future<bool>);
@override @override
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) => _i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getBlockHeadTip, #getBlockHeadTip,
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) => _i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getServerFeatures, #getServerFeatures,
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<String> broadcastTransaction({ _i4.Future<String> broadcastTransaction({
required String? rawTx, required String? rawTx,
String? requestID, String? requestID,
}) => }) =>
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<String>.value(''), returnValue: _i4.Future<String>.value(''),
) as _i5.Future<String>); ) as _i4.Future<String>);
@override @override
_i5.Future<Map<String, dynamic>> getBalance({ _i4.Future<Map<String, dynamic>> getBalance({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getHistory({ _i4.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getUTXOs({ _i4.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
bool? verbose = true, bool? verbose = true,
String? requestID, String? requestID,
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getAnonymitySet({ _i4.Future<Map<String, dynamic>> getAnonymitySet({
String? groupId = r'1', String? groupId = r'1',
String? blockhash = r'', String? blockhash = r'',
String? requestID, String? requestID,
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<dynamic> getMintData({ _i4.Future<dynamic> getMintData({
dynamic mints, dynamic mints,
String? requestID, String? requestID,
}) => }) =>
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({ _i4.Future<Map<String, dynamic>> getUsedCoinSerials({
String? requestID, String? requestID,
required int? startNumber, required int? startNumber,
}) => }) =>
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod( _i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#getLatestCoinId, #getLatestCoinId,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<int>.value(0), returnValue: _i4.Future<int>.value(0),
) as _i5.Future<int>); ) as _i4.Future<int>);
@override @override
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) => _i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getFeeRate, #getFeeRate,
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<_i2.Decimal> estimateFee({ _i4.Future<_i2.Decimal> estimateFee({
String? requestID, String? requestID,
required int? blocks, required int? blocks,
}) => }) =>
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#blocks: blocks, #blocks: blocks,
}, },
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#estimateFee, #estimateFee,
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
@override @override
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( _i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#relayFee, #relayFee,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#relayFee, #relayFee,
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
} }
/// A class which mocks [CachedElectrumX]. /// A class which mocks [CachedElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
MockCachedElectrumX() { MockCachedElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
String get server => (super.noSuchMethod( _i3.ElectrumX get electrumXClient => (super.noSuchMethod(
Invocation.getter(#server), Invocation.getter(#electrumXClient),
returnValue: '', returnValue: _FakeElectrumX_1(
) as String);
@override
int get port => (super.noSuchMethod(
Invocation.getter(#port),
returnValue: 0,
) as int);
@override
bool get useSSL => (super.noSuchMethod(
Invocation.getter(#useSSL),
returnValue: false,
) as bool);
@override
_i3.Prefs get prefs => (super.noSuchMethod(
Invocation.getter(#prefs),
returnValue: _FakePrefs_1(
this, this,
Invocation.getter(#prefs), Invocation.getter(#electrumXClient),
), ),
) as _i3.Prefs); ) as _i3.ElectrumX);
@override @override
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod( _i4.Future<Map<String, dynamic>> getAnonymitySet({
Invocation.getter(#failovers),
returnValue: <_i4.ElectrumXNode>[],
) as List<_i4.ElectrumXNode>);
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId, required String? groupId,
String? blockhash = r'', String? blockhash = r'',
required _i7.Coin? coin, required _i6.Coin? coin,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
String base64ToHex(String? source) => (super.noSuchMethod( String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
returnValue: '', returnValue: '',
) as String); ) as String);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
required _i7.Coin? coin, required _i6.Coin? coin,
bool? verbose = true, bool? verbose = true,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<String>> getUsedCoinSerials({ _i4.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i6.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<String>>.value(<String>[]), returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>); ) as _i4.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#clearSharedTransactionCache, #clearSharedTransactionCache,
[], [],
{#coin: coin}, {#coin: coin},
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }
/// A class which mocks [TransactionNotificationTracker]. /// A class which mocks [TransactionNotificationTracker].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock class MockTransactionNotificationTracker extends _i1.Mock
implements _i8.TransactionNotificationTracker { implements _i7.TransactionNotificationTracker {
MockTransactionNotificationTracker() { MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedPending, #addNotifiedPending,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedConfirmed, #addNotifiedConfirmed,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod( _i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#deleteTransaction, #deleteTransaction,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }

View file

@ -3,16 +3,15 @@
// Do not manually edit this file. // Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes // ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i5; import 'dart:async' as _i4;
import 'package:decimal/decimal.dart' as _i2; import 'package:decimal/decimal.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart' import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i8; as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/utilities/prefs.dart' as _i3;
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_redundant_argument_values
@ -35,8 +34,8 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal {
); );
} }
class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
_FakePrefs_1( _FakeElectrumX_1(
Object parent, Object parent,
Invocation parentInvocation, Invocation parentInvocation,
) : super( ) : super(
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
/// A class which mocks [ElectrumX]. /// A class which mocks [ElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { class MockElectrumX extends _i1.Mock implements _i3.ElectrumX {
MockElectrumX() { MockElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod( set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
Invocation.setter( Invocation.setter(
#failovers, #failovers,
_failovers, _failovers,
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<dynamic> request({ _i4.Future<dynamic> request({
required String? command, required String? command,
List<dynamic>? args = const [], List<dynamic>? args = const [],
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<List<Map<String, dynamic>>> batchRequest({ _i4.Future<List<Map<String, dynamic>>> batchRequest({
required String? command, required String? command,
required Map<String, List<dynamic>>? args, required Map<String, List<dynamic>>? args,
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<bool> ping({ _i4.Future<bool> ping({
String? requestID, String? requestID,
int? retryCount = 1, int? retryCount = 1,
}) => }) =>
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retryCount: retryCount, #retryCount: retryCount,
}, },
), ),
returnValue: _i5.Future<bool>.value(false), returnValue: _i4.Future<bool>.value(false),
) as _i5.Future<bool>); ) as _i4.Future<bool>);
@override @override
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) => _i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getBlockHeadTip, #getBlockHeadTip,
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) => _i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getServerFeatures, #getServerFeatures,
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<String> broadcastTransaction({ _i4.Future<String> broadcastTransaction({
required String? rawTx, required String? rawTx,
String? requestID, String? requestID,
}) => }) =>
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<String>.value(''), returnValue: _i4.Future<String>.value(''),
) as _i5.Future<String>); ) as _i4.Future<String>);
@override @override
_i5.Future<Map<String, dynamic>> getBalance({ _i4.Future<Map<String, dynamic>> getBalance({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getHistory({ _i4.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getUTXOs({ _i4.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
bool? verbose = true, bool? verbose = true,
String? requestID, String? requestID,
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getAnonymitySet({ _i4.Future<Map<String, dynamic>> getAnonymitySet({
String? groupId = r'1', String? groupId = r'1',
String? blockhash = r'', String? blockhash = r'',
String? requestID, String? requestID,
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<dynamic> getMintData({ _i4.Future<dynamic> getMintData({
dynamic mints, dynamic mints,
String? requestID, String? requestID,
}) => }) =>
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({ _i4.Future<Map<String, dynamic>> getUsedCoinSerials({
String? requestID, String? requestID,
required int? startNumber, required int? startNumber,
}) => }) =>
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod( _i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#getLatestCoinId, #getLatestCoinId,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<int>.value(0), returnValue: _i4.Future<int>.value(0),
) as _i5.Future<int>); ) as _i4.Future<int>);
@override @override
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) => _i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getFeeRate, #getFeeRate,
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<_i2.Decimal> estimateFee({ _i4.Future<_i2.Decimal> estimateFee({
String? requestID, String? requestID,
required int? blocks, required int? blocks,
}) => }) =>
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#blocks: blocks, #blocks: blocks,
}, },
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#estimateFee, #estimateFee,
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
@override @override
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( _i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#relayFee, #relayFee,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#relayFee, #relayFee,
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
} }
/// A class which mocks [CachedElectrumX]. /// A class which mocks [CachedElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
MockCachedElectrumX() { MockCachedElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
String get server => (super.noSuchMethod( _i3.ElectrumX get electrumXClient => (super.noSuchMethod(
Invocation.getter(#server), Invocation.getter(#electrumXClient),
returnValue: '', returnValue: _FakeElectrumX_1(
) as String);
@override
int get port => (super.noSuchMethod(
Invocation.getter(#port),
returnValue: 0,
) as int);
@override
bool get useSSL => (super.noSuchMethod(
Invocation.getter(#useSSL),
returnValue: false,
) as bool);
@override
_i3.Prefs get prefs => (super.noSuchMethod(
Invocation.getter(#prefs),
returnValue: _FakePrefs_1(
this, this,
Invocation.getter(#prefs), Invocation.getter(#electrumXClient),
), ),
) as _i3.Prefs); ) as _i3.ElectrumX);
@override @override
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod( _i4.Future<Map<String, dynamic>> getAnonymitySet({
Invocation.getter(#failovers),
returnValue: <_i4.ElectrumXNode>[],
) as List<_i4.ElectrumXNode>);
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId, required String? groupId,
String? blockhash = r'', String? blockhash = r'',
required _i7.Coin? coin, required _i6.Coin? coin,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
String base64ToHex(String? source) => (super.noSuchMethod( String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
returnValue: '', returnValue: '',
) as String); ) as String);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
required _i7.Coin? coin, required _i6.Coin? coin,
bool? verbose = true, bool? verbose = true,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<String>> getUsedCoinSerials({ _i4.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i6.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<String>>.value(<String>[]), returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>); ) as _i4.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#clearSharedTransactionCache, #clearSharedTransactionCache,
[], [],
{#coin: coin}, {#coin: coin},
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }
/// A class which mocks [TransactionNotificationTracker]. /// A class which mocks [TransactionNotificationTracker].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock class MockTransactionNotificationTracker extends _i1.Mock
implements _i8.TransactionNotificationTracker { implements _i7.TransactionNotificationTracker {
MockTransactionNotificationTracker() { MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedPending, #addNotifiedPending,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedConfirmed, #addNotifiedConfirmed,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod( _i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#deleteTransaction, #deleteTransaction,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }

File diff suppressed because it is too large Load diff

View file

@ -1086,6 +1086,14 @@ class MockFiroWallet extends _i1.Mock implements _i10.FiroWallet {
returnValueForMissingStub: _i11.Future<void>.value(), returnValueForMissingStub: _i11.Future<void>.value(),
) as _i11.Future<void>); ) as _i11.Future<void>);
@override @override
int firoGetMintIndex() => (super.noSuchMethod(
Invocation.method(
#firoGetMintIndex,
[],
),
returnValue: 0,
) as int);
@override
_i11.Future<void> firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod( _i11.Future<void> firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#firoUpdateMintIndex, #firoUpdateMintIndex,

View file

@ -3,16 +3,15 @@
// Do not manually edit this file. // Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes // ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i5; import 'dart:async' as _i4;
import 'package:decimal/decimal.dart' as _i2; import 'package:decimal/decimal.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart' import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i8; as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/utilities/prefs.dart' as _i3;
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_redundant_argument_values
@ -35,8 +34,8 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal {
); );
} }
class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
_FakePrefs_1( _FakeElectrumX_1(
Object parent, Object parent,
Invocation parentInvocation, Invocation parentInvocation,
) : super( ) : super(
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
/// A class which mocks [ElectrumX]. /// A class which mocks [ElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { class MockElectrumX extends _i1.Mock implements _i3.ElectrumX {
MockElectrumX() { MockElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod( set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
Invocation.setter( Invocation.setter(
#failovers, #failovers,
_failovers, _failovers,
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<dynamic> request({ _i4.Future<dynamic> request({
required String? command, required String? command,
List<dynamic>? args = const [], List<dynamic>? args = const [],
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<List<Map<String, dynamic>>> batchRequest({ _i4.Future<List<Map<String, dynamic>>> batchRequest({
required String? command, required String? command,
required Map<String, List<dynamic>>? args, required Map<String, List<dynamic>>? args,
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<bool> ping({ _i4.Future<bool> ping({
String? requestID, String? requestID,
int? retryCount = 1, int? retryCount = 1,
}) => }) =>
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retryCount: retryCount, #retryCount: retryCount,
}, },
), ),
returnValue: _i5.Future<bool>.value(false), returnValue: _i4.Future<bool>.value(false),
) as _i5.Future<bool>); ) as _i4.Future<bool>);
@override @override
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) => _i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getBlockHeadTip, #getBlockHeadTip,
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) => _i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getServerFeatures, #getServerFeatures,
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<String> broadcastTransaction({ _i4.Future<String> broadcastTransaction({
required String? rawTx, required String? rawTx,
String? requestID, String? requestID,
}) => }) =>
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<String>.value(''), returnValue: _i4.Future<String>.value(''),
) as _i5.Future<String>); ) as _i4.Future<String>);
@override @override
_i5.Future<Map<String, dynamic>> getBalance({ _i4.Future<Map<String, dynamic>> getBalance({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getHistory({ _i4.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getUTXOs({ _i4.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
bool? verbose = true, bool? verbose = true,
String? requestID, String? requestID,
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getAnonymitySet({ _i4.Future<Map<String, dynamic>> getAnonymitySet({
String? groupId = r'1', String? groupId = r'1',
String? blockhash = r'', String? blockhash = r'',
String? requestID, String? requestID,
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<dynamic> getMintData({ _i4.Future<dynamic> getMintData({
dynamic mints, dynamic mints,
String? requestID, String? requestID,
}) => }) =>
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({ _i4.Future<Map<String, dynamic>> getUsedCoinSerials({
String? requestID, String? requestID,
required int? startNumber, required int? startNumber,
}) => }) =>
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod( _i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#getLatestCoinId, #getLatestCoinId,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<int>.value(0), returnValue: _i4.Future<int>.value(0),
) as _i5.Future<int>); ) as _i4.Future<int>);
@override @override
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) => _i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getFeeRate, #getFeeRate,
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<_i2.Decimal> estimateFee({ _i4.Future<_i2.Decimal> estimateFee({
String? requestID, String? requestID,
required int? blocks, required int? blocks,
}) => }) =>
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#blocks: blocks, #blocks: blocks,
}, },
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#estimateFee, #estimateFee,
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
@override @override
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( _i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#relayFee, #relayFee,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#relayFee, #relayFee,
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
} }
/// A class which mocks [CachedElectrumX]. /// A class which mocks [CachedElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
MockCachedElectrumX() { MockCachedElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
String get server => (super.noSuchMethod( _i3.ElectrumX get electrumXClient => (super.noSuchMethod(
Invocation.getter(#server), Invocation.getter(#electrumXClient),
returnValue: '', returnValue: _FakeElectrumX_1(
) as String);
@override
int get port => (super.noSuchMethod(
Invocation.getter(#port),
returnValue: 0,
) as int);
@override
bool get useSSL => (super.noSuchMethod(
Invocation.getter(#useSSL),
returnValue: false,
) as bool);
@override
_i3.Prefs get prefs => (super.noSuchMethod(
Invocation.getter(#prefs),
returnValue: _FakePrefs_1(
this, this,
Invocation.getter(#prefs), Invocation.getter(#electrumXClient),
), ),
) as _i3.Prefs); ) as _i3.ElectrumX);
@override @override
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod( _i4.Future<Map<String, dynamic>> getAnonymitySet({
Invocation.getter(#failovers),
returnValue: <_i4.ElectrumXNode>[],
) as List<_i4.ElectrumXNode>);
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId, required String? groupId,
String? blockhash = r'', String? blockhash = r'',
required _i7.Coin? coin, required _i6.Coin? coin,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
String base64ToHex(String? source) => (super.noSuchMethod( String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
returnValue: '', returnValue: '',
) as String); ) as String);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
required _i7.Coin? coin, required _i6.Coin? coin,
bool? verbose = true, bool? verbose = true,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<String>> getUsedCoinSerials({ _i4.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i6.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<String>>.value(<String>[]), returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>); ) as _i4.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#clearSharedTransactionCache, #clearSharedTransactionCache,
[], [],
{#coin: coin}, {#coin: coin},
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }
/// A class which mocks [TransactionNotificationTracker]. /// A class which mocks [TransactionNotificationTracker].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock class MockTransactionNotificationTracker extends _i1.Mock
implements _i8.TransactionNotificationTracker { implements _i7.TransactionNotificationTracker {
MockTransactionNotificationTracker() { MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedPending, #addNotifiedPending,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedConfirmed, #addNotifiedConfirmed,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod( _i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#deleteTransaction, #deleteTransaction,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }

View file

@ -3,16 +3,15 @@
// Do not manually edit this file. // Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes // ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i5; import 'dart:async' as _i4;
import 'package:decimal/decimal.dart' as _i2; import 'package:decimal/decimal.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/mockito.dart' as _i1;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6; import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4; import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
import 'package:stackwallet/services/transaction_notification_tracker.dart' import 'package:stackwallet/services/transaction_notification_tracker.dart'
as _i8; as _i7;
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
import 'package:stackwallet/utilities/prefs.dart' as _i3;
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_redundant_argument_values
@ -35,8 +34,8 @@ class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal {
); );
} }
class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
_FakePrefs_1( _FakeElectrumX_1(
Object parent, Object parent,
Invocation parentInvocation, Invocation parentInvocation,
) : super( ) : super(
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
/// A class which mocks [ElectrumX]. /// A class which mocks [ElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockElectrumX extends _i1.Mock implements _i4.ElectrumX { class MockElectrumX extends _i1.Mock implements _i3.ElectrumX {
MockElectrumX() { MockElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod( set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
Invocation.setter( Invocation.setter(
#failovers, #failovers,
_failovers, _failovers,
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<dynamic> request({ _i4.Future<dynamic> request({
required String? command, required String? command,
List<dynamic>? args = const [], List<dynamic>? args = const [],
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<List<Map<String, dynamic>>> batchRequest({ _i4.Future<List<Map<String, dynamic>>> batchRequest({
required String? command, required String? command,
required Map<String, List<dynamic>>? args, required Map<String, List<dynamic>>? args,
Duration? connectionTimeout = const Duration(seconds: 60), Duration? connectionTimeout = const Duration(seconds: 60),
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retries: retries, #retries: retries,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<bool> ping({ _i4.Future<bool> ping({
String? requestID, String? requestID,
int? retryCount = 1, int? retryCount = 1,
}) => }) =>
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#retryCount: retryCount, #retryCount: retryCount,
}, },
), ),
returnValue: _i5.Future<bool>.value(false), returnValue: _i4.Future<bool>.value(false),
) as _i5.Future<bool>); ) as _i4.Future<bool>);
@override @override
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) => _i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getBlockHeadTip, #getBlockHeadTip,
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) => _i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getServerFeatures, #getServerFeatures,
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<String> broadcastTransaction({ _i4.Future<String> broadcastTransaction({
required String? rawTx, required String? rawTx,
String? requestID, String? requestID,
}) => }) =>
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<String>.value(''), returnValue: _i4.Future<String>.value(''),
) as _i5.Future<String>); ) as _i4.Future<String>);
@override @override
_i5.Future<Map<String, dynamic>> getBalance({ _i4.Future<Map<String, dynamic>> getBalance({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getHistory({ _i4.Future<List<Map<String, dynamic>>> getHistory({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<List<Map<String, dynamic>>> getUTXOs({ _i4.Future<List<Map<String, dynamic>>> getUTXOs({
required String? scripthash, required String? scripthash,
String? requestID, String? requestID,
}) => }) =>
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<List<Map<String, dynamic>>>.value( returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]), <Map<String, dynamic>>[]),
) as _i5.Future<List<Map<String, dynamic>>>); ) as _i4.Future<List<Map<String, dynamic>>>);
@override @override
_i5.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs( _i4.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
{required Map<String, List<dynamic>>? args}) => {required Map<String, List<dynamic>>? args}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
[], [],
{#args: args}, {#args: args},
), ),
returnValue: _i5.Future<Map<String, List<Map<String, dynamic>>>>.value( returnValue: _i4.Future<Map<String, List<Map<String, dynamic>>>>.value(
<String, List<Map<String, dynamic>>>{}), <String, List<Map<String, dynamic>>>{}),
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>); ) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
bool? verbose = true, bool? verbose = true,
String? requestID, String? requestID,
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<Map<String, dynamic>> getAnonymitySet({ _i4.Future<Map<String, dynamic>> getAnonymitySet({
String? groupId = r'1', String? groupId = r'1',
String? blockhash = r'', String? blockhash = r'',
String? requestID, String? requestID,
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<dynamic> getMintData({ _i4.Future<dynamic> getMintData({
dynamic mints, dynamic mints,
String? requestID, String? requestID,
}) => }) =>
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#requestID: requestID, #requestID: requestID,
}, },
), ),
returnValue: _i5.Future<dynamic>.value(), returnValue: _i4.Future<dynamic>.value(),
) as _i5.Future<dynamic>); ) as _i4.Future<dynamic>);
@override @override
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({ _i4.Future<Map<String, dynamic>> getUsedCoinSerials({
String? requestID, String? requestID,
required int? startNumber, required int? startNumber,
}) => }) =>
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod( _i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#getLatestCoinId, #getLatestCoinId,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<int>.value(0), returnValue: _i4.Future<int>.value(0),
) as _i5.Future<int>); ) as _i4.Future<int>);
@override @override
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) => _i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#getFeeRate, #getFeeRate,
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<_i2.Decimal> estimateFee({ _i4.Future<_i2.Decimal> estimateFee({
String? requestID, String? requestID,
required int? blocks, required int? blocks,
}) => }) =>
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
#blocks: blocks, #blocks: blocks,
}, },
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#estimateFee, #estimateFee,
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
}, },
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
@override @override
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( _i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#relayFee, #relayFee,
[], [],
{#requestID: requestID}, {#requestID: requestID},
), ),
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0( returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
this, this,
Invocation.method( Invocation.method(
#relayFee, #relayFee,
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
{#requestID: requestID}, {#requestID: requestID},
), ),
)), )),
) as _i5.Future<_i2.Decimal>); ) as _i4.Future<_i2.Decimal>);
} }
/// A class which mocks [CachedElectrumX]. /// A class which mocks [CachedElectrumX].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
MockCachedElectrumX() { MockCachedElectrumX() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@override @override
String get server => (super.noSuchMethod( _i3.ElectrumX get electrumXClient => (super.noSuchMethod(
Invocation.getter(#server), Invocation.getter(#electrumXClient),
returnValue: '', returnValue: _FakeElectrumX_1(
) as String);
@override
int get port => (super.noSuchMethod(
Invocation.getter(#port),
returnValue: 0,
) as int);
@override
bool get useSSL => (super.noSuchMethod(
Invocation.getter(#useSSL),
returnValue: false,
) as bool);
@override
_i3.Prefs get prefs => (super.noSuchMethod(
Invocation.getter(#prefs),
returnValue: _FakePrefs_1(
this, this,
Invocation.getter(#prefs), Invocation.getter(#electrumXClient),
), ),
) as _i3.Prefs); ) as _i3.ElectrumX);
@override @override
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod( _i4.Future<Map<String, dynamic>> getAnonymitySet({
Invocation.getter(#failovers),
returnValue: <_i4.ElectrumXNode>[],
) as List<_i4.ElectrumXNode>);
@override
_i5.Future<Map<String, dynamic>> getAnonymitySet({
required String? groupId, required String? groupId,
String? blockhash = r'', String? blockhash = r'',
required _i7.Coin? coin, required _i6.Coin? coin,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
String base64ToHex(String? source) => (super.noSuchMethod( String base64ToHex(String? source) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
returnValue: '', returnValue: '',
) as String); ) as String);
@override @override
_i5.Future<Map<String, dynamic>> getTransaction({ _i4.Future<Map<String, dynamic>> getTransaction({
required String? txHash, required String? txHash,
required _i7.Coin? coin, required _i6.Coin? coin,
bool? verbose = true, bool? verbose = true,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
}, },
), ),
returnValue: returnValue:
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i4.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<String>> getUsedCoinSerials({ _i4.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i6.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
(super.noSuchMethod( (super.noSuchMethod(
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<String>>.value(<String>[]), returnValue: _i4.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>); ) as _i4.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(
#clearSharedTransactionCache, #clearSharedTransactionCache,
[], [],
{#coin: coin}, {#coin: coin},
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }
/// A class which mocks [TransactionNotificationTracker]. /// A class which mocks [TransactionNotificationTracker].
/// ///
/// See the documentation for Mockito's code generation for more information. /// See the documentation for Mockito's code generation for more information.
class MockTransactionNotificationTracker extends _i1.Mock class MockTransactionNotificationTracker extends _i1.Mock
implements _i8.TransactionNotificationTracker { implements _i7.TransactionNotificationTracker {
MockTransactionNotificationTracker() { MockTransactionNotificationTracker() {
_i1.throwOnMissingStub(this); _i1.throwOnMissingStub(this);
} }
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedPending, #addNotifiedPending,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
returnValue: false, returnValue: false,
) as bool); ) as bool);
@override @override
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod( _i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#addNotifiedConfirmed, #addNotifiedConfirmed,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
@override @override
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod( _i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#deleteTransaction, #deleteTransaction,
[txid], [txid],
), ),
returnValue: _i5.Future<void>.value(), returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i4.Future<void>.value(),
) as _i5.Future<void>); ) as _i4.Future<void>);
} }

View file

@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>); ) as _i5.Future<void>);
@override @override
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<bool> verifyInstalled({required String? themeId}) => _i5.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>); ) as _i5.Future<void>);
@override @override
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<bool> verifyInstalled({required String? themeId}) => _i5.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>); ) as _i5.Future<void>);
@override @override
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<bool> verifyInstalled({required String? themeId}) => _i5.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -2008,6 +2008,15 @@ class MockThemeService extends _i1.Mock implements _i30.ThemeService {
returnValueForMissingStub: _i23.Future<void>.value(), returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>); ) as _i23.Future<void>);
@override @override
_i23.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<bool> verifyInstalled({required String? themeId}) => _i23.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -729,6 +729,15 @@ class MockThemeService extends _i1.Mock implements _i25.ThemeService {
returnValueForMissingStub: _i22.Future<void>.value(), returnValueForMissingStub: _i22.Future<void>.value(),
) as _i22.Future<void>); ) as _i22.Future<void>);
@override @override
_i22.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i22.Future<void>.value(),
returnValueForMissingStub: _i22.Future<void>.value(),
) as _i22.Future<void>);
@override
_i22.Future<bool> verifyInstalled({required String? themeId}) => _i22.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
returnValueForMissingStub: _i5.Future<void>.value(), returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>); ) as _i5.Future<void>);
@override @override
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<bool> verifyInstalled({required String? themeId}) => _i5.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -2076,6 +2076,14 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
returnValueForMissingStub: _i18.Future<void>.value(), returnValueForMissingStub: _i18.Future<void>.value(),
) as _i18.Future<void>); ) as _i18.Future<void>);
@override @override
int firoGetMintIndex() => (super.noSuchMethod(
Invocation.method(
#firoGetMintIndex,
[],
),
returnValue: 0,
) as int);
@override
_i18.Future<void> firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod( _i18.Future<void> firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod(
Invocation.method( Invocation.method(
#firoUpdateMintIndex, #firoUpdateMintIndex,
@ -2864,6 +2872,15 @@ class MockThemeService extends _i1.Mock implements _i30.ThemeService {
returnValueForMissingStub: _i18.Future<void>.value(), returnValueForMissingStub: _i18.Future<void>.value(),
) as _i18.Future<void>); ) as _i18.Future<void>);
@override @override
_i18.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i18.Future<void>.value(),
returnValueForMissingStub: _i18.Future<void>.value(),
) as _i18.Future<void>);
@override
_i18.Future<bool> verifyInstalled({required String? themeId}) => _i18.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -1812,6 +1812,15 @@ class MockThemeService extends _i1.Mock implements _i30.ThemeService {
returnValueForMissingStub: _i21.Future<void>.value(), returnValueForMissingStub: _i21.Future<void>.value(),
) as _i21.Future<void>); ) as _i21.Future<void>);
@override @override
_i21.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i21.Future<void>.value(),
returnValueForMissingStub: _i21.Future<void>.value(),
) as _i21.Future<void>);
@override
_i21.Future<bool> verifyInstalled({required String? themeId}) => _i21.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -741,6 +741,15 @@ class MockThemeService extends _i1.Mock implements _i26.ThemeService {
returnValueForMissingStub: _i23.Future<void>.value(), returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>); ) as _i23.Future<void>);
@override @override
_i23.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
Invocation.method(
#checkDefaultThemesOnStartup,
[],
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<bool> verifyInstalled({required String? themeId}) => _i23.Future<bool> verifyInstalled({required String? themeId}) =>
(super.noSuchMethod( (super.noSuchMethod(
Invocation.method( Invocation.method(