Update electrum_wallet.dart (#1411)

Serhii committed Apr 26, 2024 at 19:18 UTC a6dc9bf9d675d27297afbdec616ba5e1d251d566
1 file changed +2
cw_bitcoin/lib/electrum_wallet.dart
+2
@@ -1037,9 +1037,11 @@ abstract class ElectrumWalletBase
1037
1038 return Future.wait(addressesByType.map((addressRecord) async {
1039 final history = await _fetchAddressHistory(addressRecord, addressesSet, currentHeight);
1040 + final balance = await electrumClient.getBalance(addressRecord.scriptHash!);
1041
1042 if (history.isNotEmpty) {
1043 addressRecord.txCount = history.length;
1044 + addressRecord.balance = balance['confirmed'] as int? ?? 0;
1045 historiesWithDetails.addAll(history);
1046
1047 final matchedAddresses =