mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-25 08:38:45 +00:00
fix: update electrumx tests
This commit is contained in:
parent
86fabcf9ff
commit
021165eb17
21 changed files with 1282 additions and 1219 deletions
|
@ -57,16 +57,18 @@ void main() {
|
|||
const jsonArgs = '["",true]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"error": {
|
||||
"code": 1,
|
||||
"message": "None should be a transaction hash",
|
||||
},
|
||||
"id": "some requestId",
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -93,13 +95,15 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": {"height": 520481, "hex": "some block hex string"},
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -126,7 +130,9 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -153,9 +159,15 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {"jsonrpc": "2.0", "result": null, "id": "some requestId"},
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": null,
|
||||
"id": "some requestId",
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -181,7 +193,9 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -208,9 +222,11 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": {
|
||||
"genesis_hash":
|
||||
|
@ -225,7 +241,7 @@ void main() {
|
|||
"hash_function": "sha256"
|
||||
},
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -263,7 +279,9 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -290,13 +308,15 @@ void main() {
|
|||
const jsonArgs = '["some raw transaction string"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": "the txid of the rawtx",
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -323,7 +343,9 @@ void main() {
|
|||
const jsonArgs = '["some raw transaction string"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -353,16 +375,18 @@ void main() {
|
|||
const jsonArgs = '["dummy hash"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": {
|
||||
"confirmed": 103873966,
|
||||
"unconfirmed": 23684400,
|
||||
},
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -389,7 +413,9 @@ void main() {
|
|||
const jsonArgs = '["dummy hash"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -418,9 +444,11 @@ void main() {
|
|||
const jsonArgs = '["dummy hash"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": [
|
||||
{
|
||||
|
@ -435,7 +463,7 @@ void main() {
|
|||
}
|
||||
],
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -473,7 +501,9 @@ void main() {
|
|||
const jsonArgs = '["dummy hash"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -502,9 +532,11 @@ void main() {
|
|||
const jsonArgs = '["dummy hash"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": [
|
||||
{
|
||||
|
@ -523,7 +555,7 @@ void main() {
|
|||
}
|
||||
],
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -565,7 +597,9 @@ void main() {
|
|||
const jsonArgs = '["dummy hash"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -594,13 +628,15 @@ void main() {
|
|||
const jsonArgs = '["${SampleGetTransactionData.txHash0}",true]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": SampleGetTransactionData.txData0,
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -629,7 +665,9 @@ void main() {
|
|||
const jsonArgs = '["${SampleGetTransactionData.txHash0}",true]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -659,13 +697,15 @@ void main() {
|
|||
const jsonArgs = '["1",""]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": GetAnonymitySetSampleData.data,
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -692,7 +732,9 @@ void main() {
|
|||
const jsonArgs = '["1",""]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -721,13 +763,15 @@ void main() {
|
|||
const jsonArgs = '["some mints"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": "mint meta data",
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -754,7 +798,9 @@ void main() {
|
|||
const jsonArgs = '["some mints"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -783,13 +829,15 @@ void main() {
|
|||
const jsonArgs = '["0"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": GetUsedSerialsSampleData.serials,
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -816,7 +864,9 @@ void main() {
|
|||
const jsonArgs = '["0"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -845,9 +895,15 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {"jsonrpc": "2.0", "result": 1, "id": "some requestId"},
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": 1,
|
||||
"id": "some requestId",
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -873,7 +929,9 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -886,7 +944,10 @@ void main() {
|
|||
prefs: mockPrefs,
|
||||
failovers: []);
|
||||
|
||||
expect(() => client.getLatestCoinId(requestID: "some requestId"),
|
||||
expect(
|
||||
() => client.getLatestCoinId(
|
||||
requestID: "some requestId",
|
||||
),
|
||||
throwsA(isA<Exception>()));
|
||||
verify(mockPrefs.wifiOnly).called(1);
|
||||
verifyNoMoreInteractions(mockPrefs);
|
||||
|
@ -900,13 +961,15 @@ void main() {
|
|||
const jsonArgs = '["1",""]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": GetAnonymitySetSampleData.data,
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -933,7 +996,9 @@ void main() {
|
|||
const jsonArgs = '["1",""]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -947,8 +1012,10 @@ void main() {
|
|||
failovers: []);
|
||||
|
||||
expect(
|
||||
() =>
|
||||
client.getAnonymitySet(groupId: "1", requestID: "some requestId"),
|
||||
() => client.getAnonymitySet(
|
||||
groupId: "1",
|
||||
requestID: "some requestId",
|
||||
),
|
||||
throwsA(isA<Exception>()));
|
||||
verify(mockPrefs.wifiOnly).called(1);
|
||||
verifyNoMoreInteractions(mockPrefs);
|
||||
|
@ -962,13 +1029,15 @@ void main() {
|
|||
const jsonArgs = '["some mints"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": "mint meta data",
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -995,7 +1064,9 @@ void main() {
|
|||
const jsonArgs = '["some mints"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -1010,7 +1081,9 @@ void main() {
|
|||
|
||||
expect(
|
||||
() => client.getMintData(
|
||||
mints: "some mints", requestID: "some requestId"),
|
||||
mints: "some mints",
|
||||
requestID: "some requestId",
|
||||
),
|
||||
throwsA(isA<Exception>()));
|
||||
verify(mockPrefs.wifiOnly).called(1);
|
||||
verifyNoMoreInteractions(mockPrefs);
|
||||
|
@ -1024,13 +1097,15 @@ void main() {
|
|||
const jsonArgs = '["0"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": GetUsedSerialsSampleData.serials,
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -1057,7 +1132,9 @@ void main() {
|
|||
const jsonArgs = '["0"]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -1086,9 +1163,15 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {"jsonrpc": "2.0", "result": 1, "id": "some requestId"},
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": 1,
|
||||
"id": "some requestId",
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -1114,7 +1197,9 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -1141,15 +1226,17 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenAnswer(
|
||||
(_) async => {
|
||||
(_) async => JsonRPCResponse(data: {
|
||||
"jsonrpc": "2.0",
|
||||
"result": {
|
||||
"rate": 1000,
|
||||
},
|
||||
"id": "some requestId"
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
@ -1175,7 +1262,9 @@ void main() {
|
|||
const jsonArgs = '[]';
|
||||
when(
|
||||
mockClient.request(
|
||||
'{"jsonrpc": "2.0", "id": "some requestId","method": "$command","params": $jsonArgs}'),
|
||||
'{"jsonrpc": "2.0", "id": "some requestId",'
|
||||
'"method": "$command","params": $jsonArgs}',
|
||||
),
|
||||
).thenThrow(Exception());
|
||||
|
||||
final mockPrefs = MockPrefs();
|
||||
|
|
|
@ -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].
|
||||
///
|
||||
/// 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,
|
||||
) as bool);
|
||||
@override
|
||||
set useSSL(bool? _useSSL) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#useSSL,
|
||||
_useSSL,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
String get host => (super.noSuchMethod(
|
||||
Invocation.getter(#host),
|
||||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
set host(String? _host) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#host,
|
||||
_host,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
int get port => (super.noSuchMethod(
|
||||
Invocation.getter(#port),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
set port(int? _port) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#port,
|
||||
_port,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
Duration get connectionTimeout => (super.noSuchMethod(
|
||||
Invocation.getter(#connectionTimeout),
|
||||
returnValue: _FakeDuration_0(
|
||||
|
@ -89,21 +76,40 @@ class MockJsonRPC extends _i1.Mock implements _i2.JsonRPC {
|
|||
),
|
||||
) as Duration);
|
||||
@override
|
||||
set connectionTimeout(Duration? _connectionTimeout) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#connectionTimeout,
|
||||
_connectionTimeout,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
_i3.Future<dynamic> request(String? jsonRpcRequest) => (super.noSuchMethod(
|
||||
_i3.Future<_i2.JsonRPCResponse> request(String? jsonRpcRequest) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#request,
|
||||
[jsonRpcRequest],
|
||||
),
|
||||
returnValue: _i3.Future<dynamic>.value(),
|
||||
) as _i3.Future<dynamic>);
|
||||
returnValue:
|
||||
_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].
|
||||
|
|
|
@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
|||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -2278,6 +2278,15 @@ class MockThemeService extends _i1.Mock implements _i32.ThemeService {
|
|||
returnValueForMissingStub: _i23.Future<void>.value(),
|
||||
) as _i23.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -3,24 +3,23 @@
|
|||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i9;
|
||||
import 'dart:ui' as _i15;
|
||||
import 'dart:async' as _i8;
|
||||
import 'dart:ui' as _i14;
|
||||
|
||||
import 'package:local_auth/auth_strings.dart' as _i12;
|
||||
import 'package:local_auth/local_auth.dart' as _i11;
|
||||
import 'package:local_auth/auth_strings.dart' as _i11;
|
||||
import 'package:local_auth/local_auth.dart' as _i10;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
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/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/services/coins/coin_service.dart' as _i3;
|
||||
import 'package:stackwallet/services/coins/manager.dart' as _i16;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i14;
|
||||
import 'package:stackwallet/services/coins/manager.dart' as _i15;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i13;
|
||||
import 'package:stackwallet/utilities/amount/amount.dart' as _i6;
|
||||
import 'package:stackwallet/utilities/biometrics.dart' as _i13;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10;
|
||||
import 'package:stackwallet/utilities/prefs.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/biometrics.dart' as _i12;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// 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: subtype_of_sealed_class
|
||||
|
||||
class _FakePrefs_0 extends _i1.SmartFake implements _i2.Prefs {
|
||||
_FakePrefs_0(
|
||||
class _FakeElectrumX_0 extends _i1.SmartFake implements _i2.ElectrumX {
|
||||
_FakeElectrumX_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -93,38 +92,18 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
|||
}
|
||||
|
||||
@override
|
||||
String get server => (super.noSuchMethod(
|
||||
Invocation.getter(#server),
|
||||
returnValue: '',
|
||||
) 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(
|
||||
_i2.ElectrumX get electrumXClient => (super.noSuchMethod(
|
||||
Invocation.getter(#electrumXClient),
|
||||
returnValue: _FakeElectrumX_0(
|
||||
this,
|
||||
Invocation.getter(#prefs),
|
||||
Invocation.getter(#electrumXClient),
|
||||
),
|
||||
) as _i2.Prefs);
|
||||
) as _i2.ElectrumX);
|
||||
@override
|
||||
List<_i8.ElectrumXNode> get failovers => (super.noSuchMethod(
|
||||
Invocation.getter(#failovers),
|
||||
returnValue: <_i8.ElectrumXNode>[],
|
||||
) as List<_i8.ElectrumXNode>);
|
||||
@override
|
||||
_i9.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i8.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
required String? groupId,
|
||||
String? blockhash = r'',
|
||||
required _i10.Coin? coin,
|
||||
required _i9.Coin? coin,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -137,8 +116,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i9.Future<Map<String, dynamic>>);
|
||||
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i8.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
String base64ToHex(String? source) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -156,9 +135,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
|||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
_i9.Future<Map<String, dynamic>> getTransaction({
|
||||
_i8.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
required _i10.Coin? coin,
|
||||
required _i9.Coin? coin,
|
||||
bool? verbose = true,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -172,11 +151,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i9.Future<Map<String, dynamic>>);
|
||||
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i8.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i9.Future<List<String>> getUsedCoinSerials({
|
||||
required _i10.Coin? coin,
|
||||
_i8.Future<List<String>> getUsedCoinSerials({
|
||||
required _i9.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -188,43 +167,43 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<List<String>>.value(<String>[]),
|
||||
) as _i9.Future<List<String>>);
|
||||
returnValue: _i8.Future<List<String>>.value(<String>[]),
|
||||
) as _i8.Future<List<String>>);
|
||||
@override
|
||||
_i9.Future<void> clearSharedTransactionCache({required _i10.Coin? coin}) =>
|
||||
_i8.Future<void> clearSharedTransactionCache({required _i9.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearSharedTransactionCache,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [LocalAuthentication].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockLocalAuthentication extends _i1.Mock
|
||||
implements _i11.LocalAuthentication {
|
||||
implements _i10.LocalAuthentication {
|
||||
MockLocalAuthentication() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i9.Future<bool> get canCheckBiometrics => (super.noSuchMethod(
|
||||
_i8.Future<bool> get canCheckBiometrics => (super.noSuchMethod(
|
||||
Invocation.getter(#canCheckBiometrics),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
_i9.Future<bool> authenticateWithBiometrics({
|
||||
_i8.Future<bool> authenticateWithBiometrics({
|
||||
required String? localizedReason,
|
||||
bool? useErrorDialogs = true,
|
||||
bool? stickyAuth = false,
|
||||
_i12.AndroidAuthMessages? androidAuthStrings =
|
||||
const _i12.AndroidAuthMessages(),
|
||||
_i12.IOSAuthMessages? iOSAuthStrings = const _i12.IOSAuthMessages(),
|
||||
_i11.AndroidAuthMessages? androidAuthStrings =
|
||||
const _i11.AndroidAuthMessages(),
|
||||
_i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(),
|
||||
bool? sensitiveTransaction = true,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -240,16 +219,16 @@ class MockLocalAuthentication extends _i1.Mock
|
|||
#sensitiveTransaction: sensitiveTransaction,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
_i9.Future<bool> authenticate({
|
||||
_i8.Future<bool> authenticate({
|
||||
required String? localizedReason,
|
||||
bool? useErrorDialogs = true,
|
||||
bool? stickyAuth = false,
|
||||
_i12.AndroidAuthMessages? androidAuthStrings =
|
||||
const _i12.AndroidAuthMessages(),
|
||||
_i12.IOSAuthMessages? iOSAuthStrings = const _i12.IOSAuthMessages(),
|
||||
_i11.AndroidAuthMessages? androidAuthStrings =
|
||||
const _i11.AndroidAuthMessages(),
|
||||
_i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(),
|
||||
bool? sensitiveTransaction = true,
|
||||
bool? biometricOnly = false,
|
||||
}) =>
|
||||
|
@ -267,46 +246,46 @@ class MockLocalAuthentication extends _i1.Mock
|
|||
#biometricOnly: biometricOnly,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
_i9.Future<bool> stopAuthentication() => (super.noSuchMethod(
|
||||
_i8.Future<bool> stopAuthentication() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#stopAuthentication,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
_i9.Future<bool> isDeviceSupported() => (super.noSuchMethod(
|
||||
_i8.Future<bool> isDeviceSupported() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isDeviceSupported,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
_i9.Future<List<_i11.BiometricType>> getAvailableBiometrics() =>
|
||||
_i8.Future<List<_i10.BiometricType>> getAvailableBiometrics() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getAvailableBiometrics,
|
||||
[],
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<List<_i11.BiometricType>>.value(<_i11.BiometricType>[]),
|
||||
) as _i9.Future<List<_i11.BiometricType>>);
|
||||
_i8.Future<List<_i10.BiometricType>>.value(<_i10.BiometricType>[]),
|
||||
) as _i8.Future<List<_i10.BiometricType>>);
|
||||
}
|
||||
|
||||
/// A class which mocks [Biometrics].
|
||||
///
|
||||
/// 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() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i9.Future<bool> authenticate({
|
||||
_i8.Future<bool> authenticate({
|
||||
required String? cancelButtonText,
|
||||
required String? localizedReason,
|
||||
required String? title,
|
||||
|
@ -321,28 +300,28 @@ class MockBiometrics extends _i1.Mock implements _i13.Biometrics {
|
|||
#title: title,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
}
|
||||
|
||||
/// A class which mocks [WalletsService].
|
||||
///
|
||||
/// 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
|
||||
_i9.Future<Map<String, _i14.WalletInfo>> get walletNames =>
|
||||
_i8.Future<Map<String, _i13.WalletInfo>> get walletNames =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#walletNames),
|
||||
returnValue: _i9.Future<Map<String, _i14.WalletInfo>>.value(
|
||||
<String, _i14.WalletInfo>{}),
|
||||
) as _i9.Future<Map<String, _i14.WalletInfo>>);
|
||||
returnValue: _i8.Future<Map<String, _i13.WalletInfo>>.value(
|
||||
<String, _i13.WalletInfo>{}),
|
||||
) as _i8.Future<Map<String, _i13.WalletInfo>>);
|
||||
@override
|
||||
bool get hasListeners => (super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i9.Future<bool> renameWallet({
|
||||
_i8.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
|
@ -357,21 +336,21 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
|
|||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
Map<String, _i14.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Map<String, _i13.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i14.WalletInfo>{},
|
||||
) as Map<String, _i14.WalletInfo>);
|
||||
returnValue: <String, _i13.WalletInfo>{},
|
||||
) as Map<String, _i13.WalletInfo>);
|
||||
@override
|
||||
_i9.Future<void> addExistingStackWallet({
|
||||
_i8.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i10.Coin? coin,
|
||||
required _i9.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -385,13 +364,13 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
|
|||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<String?> addNewWallet({
|
||||
_i8.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i10.Coin? coin,
|
||||
required _i9.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -404,46 +383,46 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
|
|||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<String?>.value(),
|
||||
) as _i9.Future<String?>);
|
||||
returnValue: _i8.Future<String?>.value(),
|
||||
) as _i8.Future<String?>);
|
||||
@override
|
||||
_i9.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
_i8.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<List<String>>.value(<String>[]),
|
||||
) as _i9.Future<List<String>>);
|
||||
returnValue: _i8.Future<List<String>>.value(<String>[]),
|
||||
) as _i8.Future<List<String>>);
|
||||
@override
|
||||
_i9.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
_i8.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
_i8.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
_i8.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<void> moveFavorite({
|
||||
_i8.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
|
@ -456,48 +435,48 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
|
|||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
_i8.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
_i9.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
_i8.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i9.Future<String?>.value(),
|
||||
) as _i9.Future<String?>);
|
||||
returnValue: _i8.Future<String?>.value(),
|
||||
) as _i8.Future<String?>);
|
||||
@override
|
||||
_i9.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
_i8.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
_i9.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
_i8.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<int> deleteWallet(
|
||||
_i8.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
|
@ -509,20 +488,20 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
|
|||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i9.Future<int>.value(0),
|
||||
) as _i9.Future<int>);
|
||||
returnValue: _i8.Future<int>.value(0),
|
||||
) as _i8.Future<int>);
|
||||
@override
|
||||
_i9.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
_i8.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i14.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -530,7 +509,7 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
@ -558,7 +537,7 @@ class MockWalletsService extends _i1.Mock implements _i14.WalletsService {
|
|||
/// A class which mocks [Manager].
|
||||
///
|
||||
/// 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
|
||||
bool get isActiveWallet => (super.noSuchMethod(
|
||||
Invocation.getter(#isActiveWallet),
|
||||
|
@ -586,10 +565,10 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i10.Coin get coin => (super.noSuchMethod(
|
||||
_i9.Coin get coin => (super.noSuchMethod(
|
||||
Invocation.getter(#coin),
|
||||
returnValue: _i10.Coin.bitcoin,
|
||||
) as _i10.Coin);
|
||||
returnValue: _i9.Coin.bitcoin,
|
||||
) as _i9.Coin);
|
||||
@override
|
||||
bool get isRefreshing => (super.noSuchMethod(
|
||||
Invocation.getter(#isRefreshing),
|
||||
|
@ -622,23 +601,23 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
_i9.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
|
||||
_i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod(
|
||||
Invocation.getter(#fees),
|
||||
returnValue: _i9.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
|
||||
returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2(
|
||||
this,
|
||||
Invocation.getter(#fees),
|
||||
)),
|
||||
) as _i9.Future<_i4.FeeObject>);
|
||||
) as _i8.Future<_i4.FeeObject>);
|
||||
@override
|
||||
_i9.Future<int> get maxFee => (super.noSuchMethod(
|
||||
_i8.Future<int> get maxFee => (super.noSuchMethod(
|
||||
Invocation.getter(#maxFee),
|
||||
returnValue: _i9.Future<int>.value(0),
|
||||
) as _i9.Future<int>);
|
||||
returnValue: _i8.Future<int>.value(0),
|
||||
) as _i8.Future<int>);
|
||||
@override
|
||||
_i9.Future<String> get currentReceivingAddress => (super.noSuchMethod(
|
||||
_i8.Future<String> get currentReceivingAddress => (super.noSuchMethod(
|
||||
Invocation.getter(#currentReceivingAddress),
|
||||
returnValue: _i9.Future<String>.value(''),
|
||||
) as _i9.Future<String>);
|
||||
returnValue: _i8.Future<String>.value(''),
|
||||
) as _i8.Future<String>);
|
||||
@override
|
||||
_i5.Balance get balance => (super.noSuchMethod(
|
||||
Invocation.getter(#balance),
|
||||
|
@ -648,16 +627,16 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
),
|
||||
) as _i5.Balance);
|
||||
@override
|
||||
_i9.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
|
||||
_i8.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
|
||||
Invocation.getter(#transactions),
|
||||
returnValue:
|
||||
_i9.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
|
||||
) as _i9.Future<List<_i17.Transaction>>);
|
||||
_i8.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
|
||||
) as _i8.Future<List<_i16.Transaction>>);
|
||||
@override
|
||||
_i9.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
|
||||
_i8.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
|
||||
Invocation.getter(#utxos),
|
||||
returnValue: _i9.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
|
||||
) as _i9.Future<List<_i17.UTXO>>);
|
||||
returnValue: _i8.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
|
||||
) as _i8.Future<List<_i16.UTXO>>);
|
||||
@override
|
||||
set walletName(String? newName) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
|
@ -677,15 +656,15 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
_i9.Future<List<String>> get mnemonic => (super.noSuchMethod(
|
||||
_i8.Future<List<String>> get mnemonic => (super.noSuchMethod(
|
||||
Invocation.getter(#mnemonic),
|
||||
returnValue: _i9.Future<List<String>>.value(<String>[]),
|
||||
) as _i9.Future<List<String>>);
|
||||
returnValue: _i8.Future<List<String>>.value(<String>[]),
|
||||
) as _i8.Future<List<String>>);
|
||||
@override
|
||||
_i9.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
|
||||
_i8.Future<String?> get mnemonicPassphrase => (super.noSuchMethod(
|
||||
Invocation.getter(#mnemonicPassphrase),
|
||||
returnValue: _i9.Future<String?>.value(),
|
||||
) as _i9.Future<String?>);
|
||||
returnValue: _i8.Future<String?>.value(),
|
||||
) as _i8.Future<String?>);
|
||||
@override
|
||||
bool get isConnected => (super.noSuchMethod(
|
||||
Invocation.getter(#isConnected),
|
||||
|
@ -727,24 +706,24 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i9.Future<String> get xpub => (super.noSuchMethod(
|
||||
_i8.Future<String> get xpub => (super.noSuchMethod(
|
||||
Invocation.getter(#xpub),
|
||||
returnValue: _i9.Future<String>.value(''),
|
||||
) as _i9.Future<String>);
|
||||
returnValue: _i8.Future<String>.value(''),
|
||||
) as _i8.Future<String>);
|
||||
@override
|
||||
bool get hasListeners => (super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i9.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
|
||||
_i8.Future<void> updateNode(bool? shouldRefresh) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateNode,
|
||||
[shouldRefresh],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
void dispose() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -754,7 +733,7 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
_i9.Future<Map<String, dynamic>> prepareSend({
|
||||
_i8.Future<Map<String, dynamic>> prepareSend({
|
||||
required String? address,
|
||||
required _i6.Amount? amount,
|
||||
Map<String, dynamic>? args,
|
||||
|
@ -770,27 +749,27 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i9.Future<Map<String, dynamic>>);
|
||||
_i8.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i8.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i9.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
|
||||
_i8.Future<String> confirmSend({required Map<String, dynamic>? txData}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#confirmSend,
|
||||
[],
|
||||
{#txData: txData},
|
||||
),
|
||||
returnValue: _i9.Future<String>.value(''),
|
||||
) as _i9.Future<String>);
|
||||
returnValue: _i8.Future<String>.value(''),
|
||||
) as _i8.Future<String>);
|
||||
@override
|
||||
_i9.Future<void> refresh() => (super.noSuchMethod(
|
||||
_i8.Future<void> refresh() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refresh,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
bool validateAddress(String? address) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -800,33 +779,33 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i9.Future<bool> testNetworkConnection() => (super.noSuchMethod(
|
||||
_i8.Future<bool> testNetworkConnection() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#testNetworkConnection,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
_i9.Future<void> initializeNew() => (super.noSuchMethod(
|
||||
_i8.Future<void> initializeNew() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initializeNew,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<void> initializeExisting() => (super.noSuchMethod(
|
||||
_i8.Future<void> initializeExisting() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initializeExisting,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<void> recoverFromMnemonic({
|
||||
_i8.Future<void> recoverFromMnemonic({
|
||||
required String? mnemonic,
|
||||
String? mnemonicPassphrase,
|
||||
required int? maxUnusedAddressGap,
|
||||
|
@ -845,20 +824,20 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
#height: height,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<void> exitCurrentWallet() => (super.noSuchMethod(
|
||||
_i8.Future<void> exitCurrentWallet() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#exitCurrentWallet,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<void> fullRescan(
|
||||
_i8.Future<void> fullRescan(
|
||||
int? maxUnusedAddressGap,
|
||||
int? maxNumberOfIndexesToCheck,
|
||||
) =>
|
||||
|
@ -870,11 +849,11 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
maxNumberOfIndexesToCheck,
|
||||
],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
_i9.Future<_i6.Amount> estimateFeeFor(
|
||||
_i8.Future<_i6.Amount> estimateFeeFor(
|
||||
_i6.Amount? amount,
|
||||
int? feeRate,
|
||||
) =>
|
||||
|
@ -886,7 +865,7 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
feeRate,
|
||||
],
|
||||
),
|
||||
returnValue: _i9.Future<_i6.Amount>.value(_FakeAmount_4(
|
||||
returnValue: _i8.Future<_i6.Amount>.value(_FakeAmount_4(
|
||||
this,
|
||||
Invocation.method(
|
||||
#estimateFeeFor,
|
||||
|
@ -896,26 +875,26 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
],
|
||||
),
|
||||
)),
|
||||
) as _i9.Future<_i6.Amount>);
|
||||
) as _i8.Future<_i6.Amount>);
|
||||
@override
|
||||
_i9.Future<bool> generateNewAddress() => (super.noSuchMethod(
|
||||
_i8.Future<bool> generateNewAddress() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#generateNewAddress,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<bool>.value(false),
|
||||
) as _i9.Future<bool>);
|
||||
returnValue: _i8.Future<bool>.value(false),
|
||||
) as _i8.Future<bool>);
|
||||
@override
|
||||
_i9.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
|
||||
_i8.Future<void> resetRescanOnOpen() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#resetRescanOnOpen,
|
||||
[],
|
||||
),
|
||||
returnValue: _i9.Future<void>.value(),
|
||||
returnValueForMissingStub: _i9.Future<void>.value(),
|
||||
) as _i9.Future<void>);
|
||||
returnValue: _i8.Future<void>.value(),
|
||||
returnValueForMissingStub: _i8.Future<void>.value(),
|
||||
) as _i8.Future<void>);
|
||||
@override
|
||||
void addListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i14.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -923,7 +902,7 @@ class MockManager extends _i1.Mock implements _i16.Manager {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i15.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -3,16 +3,15 @@
|
|||
// Do not manually edit this file.
|
||||
|
||||
// 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:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
|
||||
import 'package:stackwallet/services/transaction_notification_tracker.dart'
|
||||
as _i8;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
|
||||
import 'package:stackwallet/utilities/prefs.dart' as _i3;
|
||||
as _i7;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// 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 {
|
||||
_FakePrefs_1(
|
||||
class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
|
||||
_FakeElectrumX_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
|
|||
/// A class which mocks [ElectrumX].
|
||||
///
|
||||
/// 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() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#failovers,
|
||||
_failovers,
|
||||
|
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<dynamic> request({
|
||||
_i4.Future<dynamic> request({
|
||||
required String? command,
|
||||
List<dynamic>? args = const [],
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
_i4.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
required String? command,
|
||||
required Map<String, List<dynamic>>? args,
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@override
|
||||
_i5.Future<bool> ping({
|
||||
_i4.Future<bool> ping({
|
||||
String? requestID,
|
||||
int? retryCount = 1,
|
||||
}) =>
|
||||
|
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retryCount: retryCount,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getBlockHeadTip,
|
||||
|
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerFeatures,
|
||||
|
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<String> broadcastTransaction({
|
||||
_i4.Future<String> broadcastTransaction({
|
||||
required String? rawTx,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<String>.value(''),
|
||||
) as _i5.Future<String>);
|
||||
returnValue: _i4.Future<String>.value(''),
|
||||
) as _i4.Future<String>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBalance({
|
||||
_i4.Future<Map<String, dynamic>> getBalance({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getHistory({
|
||||
_i4.Future<List<Map<String, dynamic>>> getHistory({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
bool? verbose = true,
|
||||
String? requestID,
|
||||
|
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
String? groupId = r'1',
|
||||
String? blockhash = r'',
|
||||
String? requestID,
|
||||
|
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<dynamic> getMintData({
|
||||
_i4.Future<dynamic> getMintData({
|
||||
dynamic mints,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
_i4.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
String? requestID,
|
||||
required int? startNumber,
|
||||
}) =>
|
||||
|
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getLatestCoinId,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFeeRate,
|
||||
|
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> estimateFee({
|
||||
_i4.Future<_i2.Decimal> estimateFee({
|
||||
String? requestID,
|
||||
required int? blocks,
|
||||
}) =>
|
||||
|
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#blocks: blocks,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#estimateFee,
|
||||
|
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
|
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
}
|
||||
|
||||
/// A class which mocks [CachedElectrumX].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
|
||||
MockCachedElectrumX() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
String get server => (super.noSuchMethod(
|
||||
Invocation.getter(#server),
|
||||
returnValue: '',
|
||||
) 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(
|
||||
_i3.ElectrumX get electrumXClient => (super.noSuchMethod(
|
||||
Invocation.getter(#electrumXClient),
|
||||
returnValue: _FakeElectrumX_1(
|
||||
this,
|
||||
Invocation.getter(#prefs),
|
||||
Invocation.getter(#electrumXClient),
|
||||
),
|
||||
) as _i3.Prefs);
|
||||
) as _i3.ElectrumX);
|
||||
@override
|
||||
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod(
|
||||
Invocation.getter(#failovers),
|
||||
returnValue: <_i4.ElectrumXNode>[],
|
||||
) as List<_i4.ElectrumXNode>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
required String? groupId,
|
||||
String? blockhash = r'',
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
String base64ToHex(String? source) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
bool? verbose = true,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
_i4.Future<List<String>> getUsedCoinSerials({
|
||||
required _i6.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
returnValue: _i4.Future<List<String>>.value(<String>[]),
|
||||
) as _i4.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearSharedTransactionCache,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [TransactionNotificationTracker].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockTransactionNotificationTracker extends _i1.Mock
|
||||
implements _i8.TransactionNotificationTracker {
|
||||
implements _i7.TransactionNotificationTracker {
|
||||
MockTransactionNotificationTracker() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedPending,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedConfirmed,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteTransaction,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
|
|
@ -3,16 +3,15 @@
|
|||
// Do not manually edit this file.
|
||||
|
||||
// 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:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
|
||||
import 'package:stackwallet/services/transaction_notification_tracker.dart'
|
||||
as _i8;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
|
||||
import 'package:stackwallet/utilities/prefs.dart' as _i3;
|
||||
as _i7;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// 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 {
|
||||
_FakePrefs_1(
|
||||
class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
|
||||
_FakeElectrumX_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
|
|||
/// A class which mocks [ElectrumX].
|
||||
///
|
||||
/// 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() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#failovers,
|
||||
_failovers,
|
||||
|
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<dynamic> request({
|
||||
_i4.Future<dynamic> request({
|
||||
required String? command,
|
||||
List<dynamic>? args = const [],
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
_i4.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
required String? command,
|
||||
required Map<String, List<dynamic>>? args,
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@override
|
||||
_i5.Future<bool> ping({
|
||||
_i4.Future<bool> ping({
|
||||
String? requestID,
|
||||
int? retryCount = 1,
|
||||
}) =>
|
||||
|
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retryCount: retryCount,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getBlockHeadTip,
|
||||
|
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerFeatures,
|
||||
|
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<String> broadcastTransaction({
|
||||
_i4.Future<String> broadcastTransaction({
|
||||
required String? rawTx,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<String>.value(''),
|
||||
) as _i5.Future<String>);
|
||||
returnValue: _i4.Future<String>.value(''),
|
||||
) as _i4.Future<String>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBalance({
|
||||
_i4.Future<Map<String, dynamic>> getBalance({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getHistory({
|
||||
_i4.Future<List<Map<String, dynamic>>> getHistory({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
bool? verbose = true,
|
||||
String? requestID,
|
||||
|
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
String? groupId = r'1',
|
||||
String? blockhash = r'',
|
||||
String? requestID,
|
||||
|
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<dynamic> getMintData({
|
||||
_i4.Future<dynamic> getMintData({
|
||||
dynamic mints,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
_i4.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
String? requestID,
|
||||
required int? startNumber,
|
||||
}) =>
|
||||
|
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getLatestCoinId,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFeeRate,
|
||||
|
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> estimateFee({
|
||||
_i4.Future<_i2.Decimal> estimateFee({
|
||||
String? requestID,
|
||||
required int? blocks,
|
||||
}) =>
|
||||
|
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#blocks: blocks,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#estimateFee,
|
||||
|
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
|
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
}
|
||||
|
||||
/// A class which mocks [CachedElectrumX].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
|
||||
MockCachedElectrumX() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
String get server => (super.noSuchMethod(
|
||||
Invocation.getter(#server),
|
||||
returnValue: '',
|
||||
) 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(
|
||||
_i3.ElectrumX get electrumXClient => (super.noSuchMethod(
|
||||
Invocation.getter(#electrumXClient),
|
||||
returnValue: _FakeElectrumX_1(
|
||||
this,
|
||||
Invocation.getter(#prefs),
|
||||
Invocation.getter(#electrumXClient),
|
||||
),
|
||||
) as _i3.Prefs);
|
||||
) as _i3.ElectrumX);
|
||||
@override
|
||||
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod(
|
||||
Invocation.getter(#failovers),
|
||||
returnValue: <_i4.ElectrumXNode>[],
|
||||
) as List<_i4.ElectrumXNode>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
required String? groupId,
|
||||
String? blockhash = r'',
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
String base64ToHex(String? source) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
bool? verbose = true,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
_i4.Future<List<String>> getUsedCoinSerials({
|
||||
required _i6.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
returnValue: _i4.Future<List<String>>.value(<String>[]),
|
||||
) as _i4.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearSharedTransactionCache,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [TransactionNotificationTracker].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockTransactionNotificationTracker extends _i1.Mock
|
||||
implements _i8.TransactionNotificationTracker {
|
||||
implements _i7.TransactionNotificationTracker {
|
||||
MockTransactionNotificationTracker() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedPending,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedConfirmed,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteTransaction,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
|
|
@ -3,16 +3,15 @@
|
|||
// Do not manually edit this file.
|
||||
|
||||
// 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:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
|
||||
import 'package:stackwallet/services/transaction_notification_tracker.dart'
|
||||
as _i8;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
|
||||
import 'package:stackwallet/utilities/prefs.dart' as _i3;
|
||||
as _i7;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// 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 {
|
||||
_FakePrefs_1(
|
||||
class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
|
||||
_FakeElectrumX_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
|
|||
/// A class which mocks [ElectrumX].
|
||||
///
|
||||
/// 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() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#failovers,
|
||||
_failovers,
|
||||
|
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<dynamic> request({
|
||||
_i4.Future<dynamic> request({
|
||||
required String? command,
|
||||
List<dynamic>? args = const [],
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
_i4.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
required String? command,
|
||||
required Map<String, List<dynamic>>? args,
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@override
|
||||
_i5.Future<bool> ping({
|
||||
_i4.Future<bool> ping({
|
||||
String? requestID,
|
||||
int? retryCount = 1,
|
||||
}) =>
|
||||
|
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retryCount: retryCount,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getBlockHeadTip,
|
||||
|
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerFeatures,
|
||||
|
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<String> broadcastTransaction({
|
||||
_i4.Future<String> broadcastTransaction({
|
||||
required String? rawTx,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<String>.value(''),
|
||||
) as _i5.Future<String>);
|
||||
returnValue: _i4.Future<String>.value(''),
|
||||
) as _i4.Future<String>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBalance({
|
||||
_i4.Future<Map<String, dynamic>> getBalance({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getHistory({
|
||||
_i4.Future<List<Map<String, dynamic>>> getHistory({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
bool? verbose = true,
|
||||
String? requestID,
|
||||
|
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
String? groupId = r'1',
|
||||
String? blockhash = r'',
|
||||
String? requestID,
|
||||
|
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<dynamic> getMintData({
|
||||
_i4.Future<dynamic> getMintData({
|
||||
dynamic mints,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
_i4.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
String? requestID,
|
||||
required int? startNumber,
|
||||
}) =>
|
||||
|
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getLatestCoinId,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFeeRate,
|
||||
|
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> estimateFee({
|
||||
_i4.Future<_i2.Decimal> estimateFee({
|
||||
String? requestID,
|
||||
required int? blocks,
|
||||
}) =>
|
||||
|
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#blocks: blocks,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#estimateFee,
|
||||
|
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
|
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
}
|
||||
|
||||
/// A class which mocks [CachedElectrumX].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
|
||||
MockCachedElectrumX() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
String get server => (super.noSuchMethod(
|
||||
Invocation.getter(#server),
|
||||
returnValue: '',
|
||||
) 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(
|
||||
_i3.ElectrumX get electrumXClient => (super.noSuchMethod(
|
||||
Invocation.getter(#electrumXClient),
|
||||
returnValue: _FakeElectrumX_1(
|
||||
this,
|
||||
Invocation.getter(#prefs),
|
||||
Invocation.getter(#electrumXClient),
|
||||
),
|
||||
) as _i3.Prefs);
|
||||
) as _i3.ElectrumX);
|
||||
@override
|
||||
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod(
|
||||
Invocation.getter(#failovers),
|
||||
returnValue: <_i4.ElectrumXNode>[],
|
||||
) as List<_i4.ElectrumXNode>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
required String? groupId,
|
||||
String? blockhash = r'',
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
String base64ToHex(String? source) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
bool? verbose = true,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
_i4.Future<List<String>> getUsedCoinSerials({
|
||||
required _i6.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
returnValue: _i4.Future<List<String>>.value(<String>[]),
|
||||
) as _i4.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearSharedTransactionCache,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [TransactionNotificationTracker].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockTransactionNotificationTracker extends _i1.Mock
|
||||
implements _i8.TransactionNotificationTracker {
|
||||
implements _i7.TransactionNotificationTracker {
|
||||
MockTransactionNotificationTracker() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedPending,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedConfirmed,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteTransaction,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1086,6 +1086,14 @@ class MockFiroWallet extends _i1.Mock implements _i10.FiroWallet {
|
|||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
@override
|
||||
int firoGetMintIndex() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoGetMintIndex,
|
||||
[],
|
||||
),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
_i11.Future<void> firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoUpdateMintIndex,
|
||||
|
|
|
@ -3,16 +3,15 @@
|
|||
// Do not manually edit this file.
|
||||
|
||||
// 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:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
|
||||
import 'package:stackwallet/services/transaction_notification_tracker.dart'
|
||||
as _i8;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
|
||||
import 'package:stackwallet/utilities/prefs.dart' as _i3;
|
||||
as _i7;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// 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 {
|
||||
_FakePrefs_1(
|
||||
class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
|
||||
_FakeElectrumX_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
|
|||
/// A class which mocks [ElectrumX].
|
||||
///
|
||||
/// 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() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#failovers,
|
||||
_failovers,
|
||||
|
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<dynamic> request({
|
||||
_i4.Future<dynamic> request({
|
||||
required String? command,
|
||||
List<dynamic>? args = const [],
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
_i4.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
required String? command,
|
||||
required Map<String, List<dynamic>>? args,
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@override
|
||||
_i5.Future<bool> ping({
|
||||
_i4.Future<bool> ping({
|
||||
String? requestID,
|
||||
int? retryCount = 1,
|
||||
}) =>
|
||||
|
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retryCount: retryCount,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getBlockHeadTip,
|
||||
|
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerFeatures,
|
||||
|
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<String> broadcastTransaction({
|
||||
_i4.Future<String> broadcastTransaction({
|
||||
required String? rawTx,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<String>.value(''),
|
||||
) as _i5.Future<String>);
|
||||
returnValue: _i4.Future<String>.value(''),
|
||||
) as _i4.Future<String>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBalance({
|
||||
_i4.Future<Map<String, dynamic>> getBalance({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getHistory({
|
||||
_i4.Future<List<Map<String, dynamic>>> getHistory({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
bool? verbose = true,
|
||||
String? requestID,
|
||||
|
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
String? groupId = r'1',
|
||||
String? blockhash = r'',
|
||||
String? requestID,
|
||||
|
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<dynamic> getMintData({
|
||||
_i4.Future<dynamic> getMintData({
|
||||
dynamic mints,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
_i4.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
String? requestID,
|
||||
required int? startNumber,
|
||||
}) =>
|
||||
|
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getLatestCoinId,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFeeRate,
|
||||
|
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> estimateFee({
|
||||
_i4.Future<_i2.Decimal> estimateFee({
|
||||
String? requestID,
|
||||
required int? blocks,
|
||||
}) =>
|
||||
|
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#blocks: blocks,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#estimateFee,
|
||||
|
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
|
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
}
|
||||
|
||||
/// A class which mocks [CachedElectrumX].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
|
||||
MockCachedElectrumX() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
String get server => (super.noSuchMethod(
|
||||
Invocation.getter(#server),
|
||||
returnValue: '',
|
||||
) 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(
|
||||
_i3.ElectrumX get electrumXClient => (super.noSuchMethod(
|
||||
Invocation.getter(#electrumXClient),
|
||||
returnValue: _FakeElectrumX_1(
|
||||
this,
|
||||
Invocation.getter(#prefs),
|
||||
Invocation.getter(#electrumXClient),
|
||||
),
|
||||
) as _i3.Prefs);
|
||||
) as _i3.ElectrumX);
|
||||
@override
|
||||
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod(
|
||||
Invocation.getter(#failovers),
|
||||
returnValue: <_i4.ElectrumXNode>[],
|
||||
) as List<_i4.ElectrumXNode>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
required String? groupId,
|
||||
String? blockhash = r'',
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
String base64ToHex(String? source) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
bool? verbose = true,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
_i4.Future<List<String>> getUsedCoinSerials({
|
||||
required _i6.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
returnValue: _i4.Future<List<String>>.value(<String>[]),
|
||||
) as _i4.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearSharedTransactionCache,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [TransactionNotificationTracker].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockTransactionNotificationTracker extends _i1.Mock
|
||||
implements _i8.TransactionNotificationTracker {
|
||||
implements _i7.TransactionNotificationTracker {
|
||||
MockTransactionNotificationTracker() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedPending,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedConfirmed,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteTransaction,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
|
|
@ -3,16 +3,15 @@
|
|||
// Do not manually edit this file.
|
||||
|
||||
// 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:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i6;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i3;
|
||||
import 'package:stackwallet/services/transaction_notification_tracker.dart'
|
||||
as _i8;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
|
||||
import 'package:stackwallet/utilities/prefs.dart' as _i3;
|
||||
as _i7;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// 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 {
|
||||
_FakePrefs_1(
|
||||
class _FakeElectrumX_1 extends _i1.SmartFake implements _i3.ElectrumX {
|
||||
_FakeElectrumX_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -48,13 +47,13 @@ class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
|
|||
/// A class which mocks [ElectrumX].
|
||||
///
|
||||
/// 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() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
set failovers(List<_i4.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#failovers,
|
||||
_failovers,
|
||||
|
@ -90,7 +89,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<dynamic> request({
|
||||
_i4.Future<dynamic> request({
|
||||
required String? command,
|
||||
List<dynamic>? args = const [],
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -109,10 +108,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
_i4.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
required String? command,
|
||||
required Map<String, List<dynamic>>? args,
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
|
@ -129,11 +128,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@override
|
||||
_i5.Future<bool> ping({
|
||||
_i4.Future<bool> ping({
|
||||
String? requestID,
|
||||
int? retryCount = 1,
|
||||
}) =>
|
||||
|
@ -146,10 +145,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#retryCount: retryCount,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getBlockHeadTip,
|
||||
|
@ -157,10 +156,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerFeatures,
|
||||
|
@ -168,10 +167,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<String> broadcastTransaction({
|
||||
_i4.Future<String> broadcastTransaction({
|
||||
required String? rawTx,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -184,10 +183,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<String>.value(''),
|
||||
) as _i5.Future<String>);
|
||||
returnValue: _i4.Future<String>.value(''),
|
||||
) as _i4.Future<String>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getBalance({
|
||||
_i4.Future<Map<String, dynamic>> getBalance({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -201,10 +200,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getHistory({
|
||||
_i4.Future<List<Map<String, dynamic>>> getHistory({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -217,11 +216,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -229,11 +228,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
_i4.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -246,11 +245,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<Map<String, dynamic>>>.value(
|
||||
returnValue: _i4.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i5.Future<List<Map<String, dynamic>>>);
|
||||
) as _i4.Future<List<Map<String, dynamic>>>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -258,11 +257,11 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
[],
|
||||
{#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>>>{}),
|
||||
) as _i5.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
) as _i4.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
bool? verbose = true,
|
||||
String? requestID,
|
||||
|
@ -278,10 +277,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
String? groupId = r'1',
|
||||
String? blockhash = r'',
|
||||
String? requestID,
|
||||
|
@ -297,10 +296,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<dynamic> getMintData({
|
||||
_i4.Future<dynamic> getMintData({
|
||||
dynamic mints,
|
||||
String? requestID,
|
||||
}) =>
|
||||
|
@ -313,10 +312,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<dynamic>.value(),
|
||||
) as _i5.Future<dynamic>);
|
||||
returnValue: _i4.Future<dynamic>.value(),
|
||||
) as _i4.Future<dynamic>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
_i4.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
String? requestID,
|
||||
required int? startNumber,
|
||||
}) =>
|
||||
|
@ -330,19 +329,19 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getLatestCoinId,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
_i4.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFeeRate,
|
||||
|
@ -350,10 +349,10 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> estimateFee({
|
||||
_i4.Future<_i2.Decimal> estimateFee({
|
||||
String? requestID,
|
||||
required int? blocks,
|
||||
}) =>
|
||||
|
@ -366,7 +365,7 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
#blocks: blocks,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#estimateFee,
|
||||
|
@ -377,15 +376,15 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
@override
|
||||
_i5.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
_i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i5.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
|
@ -393,50 +392,30 @@ class MockElectrumX extends _i1.Mock implements _i4.ElectrumX {
|
|||
{#requestID: requestID},
|
||||
),
|
||||
)),
|
||||
) as _i5.Future<_i2.Decimal>);
|
||||
) as _i4.Future<_i2.Decimal>);
|
||||
}
|
||||
|
||||
/// A class which mocks [CachedElectrumX].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
|
||||
MockCachedElectrumX() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
String get server => (super.noSuchMethod(
|
||||
Invocation.getter(#server),
|
||||
returnValue: '',
|
||||
) 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(
|
||||
_i3.ElectrumX get electrumXClient => (super.noSuchMethod(
|
||||
Invocation.getter(#electrumXClient),
|
||||
returnValue: _FakeElectrumX_1(
|
||||
this,
|
||||
Invocation.getter(#prefs),
|
||||
Invocation.getter(#electrumXClient),
|
||||
),
|
||||
) as _i3.Prefs);
|
||||
) as _i3.ElectrumX);
|
||||
@override
|
||||
List<_i4.ElectrumXNode> get failovers => (super.noSuchMethod(
|
||||
Invocation.getter(#failovers),
|
||||
returnValue: <_i4.ElectrumXNode>[],
|
||||
) as List<_i4.ElectrumXNode>);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
_i4.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
required String? groupId,
|
||||
String? blockhash = r'',
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -449,8 +428,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
String base64ToHex(String? source) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -468,9 +447,9 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
_i5.Future<Map<String, dynamic>> getTransaction({
|
||||
_i4.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
required _i7.Coin? coin,
|
||||
required _i6.Coin? coin,
|
||||
bool? verbose = true,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -484,11 +463,11 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
},
|
||||
),
|
||||
returnValue:
|
||||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
_i4.Future<List<String>> getUsedCoinSerials({
|
||||
required _i6.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -500,26 +479,26 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
returnValue: _i4.Future<List<String>>.value(<String>[]),
|
||||
) as _i4.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
_i4.Future<void> clearSharedTransactionCache({required _i6.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearSharedTransactionCache,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [TransactionNotificationTracker].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockTransactionNotificationTracker extends _i1.Mock
|
||||
implements _i8.TransactionNotificationTracker {
|
||||
implements _i7.TransactionNotificationTracker {
|
||||
MockTransactionNotificationTracker() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
@ -548,14 +527,14 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedPending,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
@ -565,21 +544,21 @@ class MockTransactionNotificationTracker extends _i1.Mock
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedConfirmed,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
_i4.Future<void> deleteTransaction(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteTransaction,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
}
|
||||
|
|
|
@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
|||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
|||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
|||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -2008,6 +2008,15 @@ class MockThemeService extends _i1.Mock implements _i30.ThemeService {
|
|||
returnValueForMissingStub: _i23.Future<void>.value(),
|
||||
) as _i23.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -729,6 +729,15 @@ class MockThemeService extends _i1.Mock implements _i25.ThemeService {
|
|||
returnValueForMissingStub: _i22.Future<void>.value(),
|
||||
) as _i22.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -83,6 +83,15 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
|||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -2076,6 +2076,14 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
|
|||
returnValueForMissingStub: _i18.Future<void>.value(),
|
||||
) as _i18.Future<void>);
|
||||
@override
|
||||
int firoGetMintIndex() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoGetMintIndex,
|
||||
[],
|
||||
),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
_i18.Future<void> firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoUpdateMintIndex,
|
||||
|
@ -2864,6 +2872,15 @@ class MockThemeService extends _i1.Mock implements _i30.ThemeService {
|
|||
returnValueForMissingStub: _i18.Future<void>.value(),
|
||||
) as _i18.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -1812,6 +1812,15 @@ class MockThemeService extends _i1.Mock implements _i30.ThemeService {
|
|||
returnValueForMissingStub: _i21.Future<void>.value(),
|
||||
) as _i21.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -741,6 +741,15 @@ class MockThemeService extends _i1.Mock implements _i26.ThemeService {
|
|||
returnValueForMissingStub: _i23.Future<void>.value(),
|
||||
) as _i23.Future<void>);
|
||||
@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}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
Loading…
Reference in a new issue