From ffcdfdbac3b3e7f8a376b44b13c193d4039b60a2 Mon Sep 17 00:00:00 2001 From: yse <70684173+hydra-yse@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:07:15 +0100 Subject: [PATCH] fix: consider only confirmed txs for wallet balance (#664) --- lib/core/src/sdk.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/core/src/sdk.rs b/lib/core/src/sdk.rs index 39dff2a..eec750a 100644 --- a/lib/core/src/sdk.rs +++ b/lib/core/src/sdk.rs @@ -2519,6 +2519,7 @@ impl LiquidSdk { let transactions = self.onchain_wallet.transactions().await?; let wallet_amount_sat = transactions .into_iter() + .filter(|tx| tx.height.is_some()) .map(|tx| { tx.balance .into_iter()