From e62b44bbbeeba86cb0ff2b667b6162681eda041e Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 20 Apr 2021 11:08:44 +0200 Subject: [PATCH] allow external unconfirmed utxos to be spent --- drongo | 2 +- .../java/com/sparrowwallet/sparrow/control/UtxosChart.java | 2 +- .../java/com/sparrowwallet/sparrow/wallet/HashIndexEntry.java | 3 ++- .../com/sparrowwallet/sparrow/preferences/general.fxml | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drongo b/drongo index 85e8b97a..a25dfa5c 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit 85e8b97a8c8d21bfbb76096285eec95d28384090 +Subproject commit a25dfa5c7671023b60d1773cf603b4d46885a546 diff --git a/src/main/java/com/sparrowwallet/sparrow/control/UtxosChart.java b/src/main/java/com/sparrowwallet/sparrow/control/UtxosChart.java index cd8a779a..cd6e12ba 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/UtxosChart.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/UtxosChart.java @@ -72,7 +72,7 @@ public class UtxosChart extends BarChart { private String getCategoryName(Entry entry) { if(entry.getLabel() != null && !entry.getLabel().isEmpty()) { - return entry.getLabel().length() > 15 ? entry.getLabel().substring(0, 15) + "..." : entry.getLabel(); + return entry.getLabel().length() > 15 ? entry.getLabel().substring(0, 15) + "..." : entry.getLabel() + "\n" + ((UtxoEntry)entry).getDescription(); } return ((UtxoEntry)entry).getDescription(); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/HashIndexEntry.java b/src/main/java/com/sparrowwallet/sparrow/wallet/HashIndexEntry.java index 773f7351..28acf37a 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/HashIndexEntry.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/HashIndexEntry.java @@ -8,6 +8,7 @@ import com.sparrowwallet.drongo.wallet.Wallet; import com.sparrowwallet.sparrow.EventManager; import com.sparrowwallet.sparrow.control.DateLabel; import com.sparrowwallet.sparrow.event.WalletEntryLabelChangedEvent; +import com.sparrowwallet.sparrow.io.Config; import java.util.Collections; import java.util.List; @@ -58,7 +59,7 @@ public class HashIndexEntry extends Entry implements Comparable } public boolean isSpendable() { - return !isSpent() && (hashIndex.getHeight() > 0 || getWallet().allInputsFromWallet(hashIndex.getHash())) && (hashIndex.getStatus() == null || hashIndex.getStatus() != Status.FROZEN); + return !isSpent() && (hashIndex.getHeight() > 0 || Config.get().isIncludeMempoolChange()) && (hashIndex.getStatus() == null || hashIndex.getStatus() != Status.FROZEN); } @Override diff --git a/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml b/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml index 87a5cc5a..d1819a25 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/preferences/general.fxml @@ -86,9 +86,9 @@ - + - +