CW-289-Fix bitcoin pending send receive transactions not showing until confirmed (#878)

* Fix error in rendering pending transactions in different device

* Show pending status

* Fix broken subscription stream
This commit is contained in:
Godwin Asuquo 2023-04-20 23:20:37 +03:00 committed by GitHub
parent ab20312e61
commit 3fc927f742
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View file

@ -410,7 +410,7 @@ class ElectrumClient {
switch (method) {
case 'blockchain.scripthash.subscribe':
final params = request['params'] as List<dynamic>;
final scripthash = params.first as String;
final scripthash = params.first as String?;
final id = 'blockchain.scripthash.subscribe:$scripthash';
_tasks[id]?.subject?.add(params.last);
@ -430,15 +430,17 @@ class ElectrumClient {
void _handleResponse(Map<String, dynamic> response) {
final method = response['method'];
final id = response['id'] as String;
final id = response['id'] as String?;
final result = response['result'];
if (method is String) {
_methodHandler(method: method, request: response);
return;
}
_finish(id, result);
if (id != null){
_finish(id, result);
}
}
}