From dfdf16a6c2b20f7c3969dcfc3f86a03a6f289455 Mon Sep 17 00:00:00 2001
From: Matthew Fosse <matt@fosse.co>
Date: Wed, 10 Jul 2024 12:45:30 -0700
Subject: [PATCH] fix unconfirmed balance not updating when receiving

---
 cw_bitcoin/lib/litecoin_wallet.dart | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart
index 0c5078417..0fb8faf31 100644
--- a/cw_bitcoin/lib/litecoin_wallet.dart
+++ b/cw_bitcoin/lib/litecoin_wallet.dart
@@ -271,8 +271,10 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
       if (!(tx.inputAddresses?.contains(utxo.address) ?? false)) addressRecord.txCount++;
       addressRecord.balance += utxo.value.toInt();
       addressRecord.setAsUsed();
+
+      // update the unconfirmed balance when a new tx is added:
+      await updateBalance();
     }
-    print("BEING ADDED HERE@@@@@@@@@@@@@@@@@@@@@@@");
     transactionHistory.addOne(tx);
   }