Browse Source

show change output when signing

bwt
Craig Raw 5 years ago
parent
commit
f35b3d46a1
  1. 9
      src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java
  2. 1
      src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml

9
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);

1
src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml

@ -34,6 +34,7 @@
<CoinLabel fx:id="value"/>
<CopyableLabel fx:id="to" text="to" />
<AddressLabel fx:id="address" />
<CopyableLabel fx:id="change" text="(Change)" />
</Field>
<Field fx:id="spentField" text="Spent?">
<Label fx:id="spent" />

Loading…
Cancel
Save