From f2f15208bf7a02eedd8951c70f177b540eda8ede Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 20 Apr 2021 11:55:43 +0200 Subject: [PATCH] if allow unconfirmed, include mempool outputs in balance --- .../sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java | 3 ++- 1 file changed, 2 insertions(+), 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 9318270e..4087f091 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java @@ -7,6 +7,7 @@ import com.sparrowwallet.drongo.wallet.Wallet; import com.sparrowwallet.drongo.wallet.WalletNode; import com.sparrowwallet.sparrow.EventManager; import com.sparrowwallet.sparrow.event.NewWalletTransactionsEvent; +import com.sparrowwallet.sparrow.io.Config; import javafx.beans.property.LongProperty; import javafx.beans.property.LongPropertyBase; import org.slf4j.Logger; @@ -37,7 +38,7 @@ public class WalletTransactionsEntry extends Entry { for(Entry entry : getChildren()) { TransactionEntry transactionEntry = (TransactionEntry)entry; - if(transactionEntry.getConfirmations() != 0 || transactionEntry.getValue() < 0) { + if(transactionEntry.getConfirmations() != 0 || Config.get().isIncludeMempoolChange()) { balance += entry.getValue(); }