Update electrum_wallet.dart (#1411)

This commit is contained in:
Serhii 2024-04-26 19:18:35 +03:00 committed by GitHub
parent 7fcf48f91d
commit a6dc9bf9d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1037,9 +1037,11 @@ abstract class ElectrumWalletBase
return Future.wait(addressesByType.map((addressRecord) async { return Future.wait(addressesByType.map((addressRecord) async {
final history = await _fetchAddressHistory(addressRecord, addressesSet, currentHeight); final history = await _fetchAddressHistory(addressRecord, addressesSet, currentHeight);
final balance = await electrumClient.getBalance(addressRecord.scriptHash!);
if (history.isNotEmpty) { if (history.isNotEmpty) {
addressRecord.txCount = history.length; addressRecord.txCount = history.length;
addressRecord.balance = balance['confirmed'] as int? ?? 0;
historiesWithDetails.addAll(history); historiesWithDetails.addAll(history);
final matchedAddresses = final matchedAddresses =