mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
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:
parent
ab20312e61
commit
3fc927f742
3 changed files with 9 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue