From 7978ad447690b386f2058c10f318f5045b1aa24b Mon Sep 17 00:00:00 2001 From: Hector Chu <hectorchu@gmail.com> Date: Mon, 29 Apr 2024 13:08:05 +0100 Subject: [PATCH] Update confs --- cw_bitcoin/lib/litecoin_wallet.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index 703571bd5..fba4bbc4a 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -149,6 +149,14 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { if (resp.mwebUtxosHeight > mwebUtxosHeight) { mwebUtxosHeight = resp.mwebUtxosHeight; await checkMwebUtxosSpent(); + for (final transaction in transactionHistory.transactions.values) { + if (transaction.isPending) continue; + final confirmations = mwebUtxosHeight - transaction.height + 1; + if (transaction.confirmations == confirmations) continue; + transaction.confirmations = confirmations; + transactionHistory.addOne(transaction); + } + await transactionHistory.save(); } } });