From c6631b658af284cdf860e021dd9987b5b5d1bff1 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Mon, 28 Oct 2019 10:41:46 -0700 Subject: [PATCH] Remove pending spent amount from balance --- lib/src/lightwallet.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/lightwallet.rs b/lib/src/lightwallet.rs index a9db4c0..71d1005 100644 --- a/lib/src/lightwallet.rs +++ b/lib/src/lightwallet.rs @@ -767,7 +767,7 @@ impl LightWallet { None => true } }) - .map(|nd| if nd.spent.is_none() { nd.note.value } else { 0 }) + .map(|nd| if nd.spent.is_none() && nd.unconfirmed_spent.is_none() { nd.note.value } else { 0 }) .sum::() }) .sum::()