From f35b3d46a181d1d5ab3f9c263bb9b055e3b5d881 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Sun, 9 Aug 2020 17:03:38 +0200 Subject: [PATCH] show change output when signing --- .../sparrow/transaction/OutputController.java | 9 +++++++++ .../com/sparrowwallet/sparrow/transaction/output.fxml | 1 + 2 files changed, 10 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java b/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java index 9622d9eb..b816e368 100644 --- a/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java +++ b/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java @@ -39,6 +39,9 @@ public class OutputController extends TransactionFormController implements Initi @FXML private CopyableLabel to; + @FXML + private CopyableLabel change; + @FXML private AddressLabel address; @@ -81,6 +84,12 @@ public class OutputController extends TransactionFormController implements Initi //ignore } + change.managedProperty().bind(change.visibleProperty()); + change.setVisible(false); + outputForm.signingWalletProperty().addListener((observable, oldValue, signingWallet) -> { + change.setVisible(signingWallet != null && signingWallet.isWalletOutputScript(txOutput.getScript())); + }); + spentField.managedProperty().bind(spentField.visibleProperty()); spentByField.managedProperty().bind(spentByField.visibleProperty()); spentByField.setVisible(false); diff --git a/src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml b/src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml index b23e352b..aa445ef4 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml @@ -34,6 +34,7 @@ +