Cw 868 fix false synchronised status when the socket connection fails due to network issues (#1892)

* prevent setting Synced status when the connection is lost

* fallback for UTXO fetch failures

* minor fix
This commit is contained in:
Serhii 2024-12-25 21:27:28 +02:00 committed by GitHub
parent 20d30013d0
commit b79ef988c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 64 additions and 11 deletions

View file

@ -235,7 +235,7 @@ class ElectrumClient {
return [];
});
Future<List<Map<String, dynamic>>> getListUnspent(String scriptHash) async {
Future<List<Map<String, dynamic>>?> getListUnspent(String scriptHash) async {
final result = await call(method: 'blockchain.scripthash.listunspent', params: [scriptHash]);
if (result is List) {
@ -248,7 +248,7 @@ class ElectrumClient {
}).toList();
}
return [];
return null;
}
Future<List<Map<String, dynamic>>> getMempool(String scriptHash) =>