diff --git a/drongo b/drongo index 10035278..59d610f5 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit 10035278543d9ca90b11ae3d396edc3e6131fee2 +Subproject commit 59d610f5395cab69a33cf675b3fb116f7e09394c diff --git a/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java b/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java index 704b74c8..5046c3da 100644 --- a/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java +++ b/src/main/java/com/sparrowwallet/sparrow/transaction/OutputController.java @@ -1,6 +1,7 @@ package com.sparrowwallet.sparrow.transaction; import com.google.common.eventbus.Subscribe; +import com.sparrowwallet.drongo.KeyPurpose; import com.sparrowwallet.drongo.address.Address; import com.sparrowwallet.drongo.protocol.NonStandardScriptException; import com.sparrowwallet.drongo.protocol.TransactionInput; @@ -39,7 +40,7 @@ public class OutputController extends TransactionFormController implements Initi private CopyableLabel to; @FXML - private CopyableLabel change; + private CopyableLabel walletType; @FXML private AddressLabel address; @@ -83,10 +84,21 @@ public class OutputController extends TransactionFormController implements Initi //ignore } - change.managedProperty().bind(change.visibleProperty()); - change.setVisible(false); + walletType.managedProperty().bind(walletType.visibleProperty()); + walletType.setVisible(false); outputForm.signingWalletProperty().addListener((observable, oldValue, signingWallet) -> { - change.setVisible(signingWallet != null && signingWallet.isWalletOutputScript(txOutput.getScript())); + if(signingWallet != null) { + walletType.setVisible(true); + if(signingWallet.getWalletOutputScripts(KeyPurpose.RECEIVE).containsKey(txOutput.getScript())) { + walletType.setText("(Consolidation)"); + } else if(signingWallet.getWalletOutputScripts(KeyPurpose.CHANGE).containsKey(txOutput.getScript())) { + walletType.setText("(Change)"); + } else { + walletType.setText("(Payment)"); + } + } else { + walletType.setVisible(false); + } }); spentField.managedProperty().bind(spentField.visibleProperty()); diff --git a/src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml b/src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml index 8004847b..32692734 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/transaction/output.fxml @@ -34,7 +34,7 @@ - +