mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
Cw 853 mweb utxos are not displayed in coin control screen (#1873)
* fix displaying mweb utxos * fallback for failed electrum UTXO updates * remove throwing uncaught exception and un needed try/catch --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
707395b71a
commit
d55e635f61
3 changed files with 47 additions and 47 deletions
|
@ -235,21 +235,21 @@ class ElectrumClient {
|
|||
return [];
|
||||
});
|
||||
|
||||
Future<List<Map<String, dynamic>>> getListUnspent(String scriptHash) =>
|
||||
call(method: 'blockchain.scripthash.listunspent', params: [scriptHash])
|
||||
.then((dynamic result) {
|
||||
if (result is List) {
|
||||
return result.map((dynamic val) {
|
||||
if (val is Map<String, dynamic>) {
|
||||
return val;
|
||||
}
|
||||
Future<List<Map<String, dynamic>>> getListUnspent(String scriptHash) async {
|
||||
final result = await call(method: 'blockchain.scripthash.listunspent', params: [scriptHash]);
|
||||
|
||||
return <String, dynamic>{};
|
||||
}).toList();
|
||||
if (result is List) {
|
||||
return result.map((dynamic val) {
|
||||
if (val is Map<String, dynamic>) {
|
||||
return val;
|
||||
}
|
||||
|
||||
return [];
|
||||
});
|
||||
return <String, dynamic>{};
|
||||
}).toList();
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
Future<List<Map<String, dynamic>>> getMempool(String scriptHash) =>
|
||||
call(method: 'blockchain.scripthash.get_mempool', params: [scriptHash])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue