From e93ec08ba7ba9887ffd7c73eda6d115b4fb16728 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 18 Jun 2020 13:27:02 +0200 Subject: [PATCH] minor fix --- .../sparrow/transaction/OutputController.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java b/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java index c13564bf..8b64ff9f 100644 --- a/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java +++ b/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java @@ -85,7 +85,7 @@ public class OutputController extends TransactionFormController implements Initi if(outputForm.getPsbt() != null) { spent.setText("Unspent"); - } else if(outputForm.getOutputTransactions() != null && outputForm.getIndex() < outputForm.getMaxOutputFetched()) { + } else if(outputForm.getOutputTransactions() != null) { updateSpent(outputForm.getOutputTransactions()); } else { spent.setText("Unknown"); @@ -97,7 +97,11 @@ public class OutputController extends TransactionFormController implements Initi private void updateSpent(List outputTransactions) { int outputIndex = outputForm.getIndex(); - spent.setText("Unspent"); + if(outputIndex < outputForm.getMaxOutputFetched()) { + spent.setText("Unspent"); + } else { + spent.setText("Unknown"); + } if(outputIndex >= 0 && outputIndex < outputTransactions.size()) { BlockTransaction outputBlockTransaction = outputTransactions.get(outputIndex);