From b83677428951cb95795a0c697317cf54a1fc9a30 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 20 Apr 2021 11:57:22 +0200 Subject: [PATCH] if allow unconfirmed, include mempool outputs in balance #2 --- .../sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java index 4087f091..7478615b 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java @@ -38,7 +38,7 @@ public class WalletTransactionsEntry extends Entry { for(Entry entry : getChildren()) { TransactionEntry transactionEntry = (TransactionEntry)entry; - if(transactionEntry.getConfirmations() != 0 || Config.get().isIncludeMempoolChange()) { + if(transactionEntry.getConfirmations() != 0 || transactionEntry.getValue() < 0 || Config.get().isIncludeMempoolChange()) { balance += entry.getValue(); }