if allow unconfirmed, include mempool outputs in balance #2

This commit is contained in:
Craig Raw 2021-04-20 11:57:22 +02:00
parent f2f15208bf
commit b836774289

View file

@ -38,7 +38,7 @@ public class WalletTransactionsEntry extends Entry {
for(Entry entry : getChildren()) { for(Entry entry : getChildren()) {
TransactionEntry transactionEntry = (TransactionEntry)entry; TransactionEntry transactionEntry = (TransactionEntry)entry;
if(transactionEntry.getConfirmations() != 0 || Config.get().isIncludeMempoolChange()) { if(transactionEntry.getConfirmations() != 0 || transactionEntry.getValue() < 0 || Config.get().isIncludeMempoolChange()) {
balance += entry.getValue(); balance += entry.getValue();
} }