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 @@ +