mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 13:26:44 +00:00
finalize psbt tweaks
This commit is contained in:
parent
c86f7d32cb
commit
6ef333ae2a
2 changed files with 11 additions and 2 deletions
|
@ -284,7 +284,6 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
signaturesForm.setVisible(true);
|
signaturesForm.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
signingWallet.valueProperty().addListener((observable, oldValue, newValue) -> headersForm.setSigningWallet(newValue));
|
|
||||||
EventManager.get().post(new RequestOpenWalletsEvent());
|
EventManager.get().post(new RequestOpenWalletsEvent());
|
||||||
|
|
||||||
signingWallet.managedProperty().bind(signingWallet.visibleProperty());
|
signingWallet.managedProperty().bind(signingWallet.visibleProperty());
|
||||||
|
@ -386,6 +385,9 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
|
|
||||||
private void updateTxId() {
|
private void updateTxId() {
|
||||||
id.setText(headersForm.getTransaction().calculateTxId(false).toString());
|
id.setText(headersForm.getTransaction().calculateTxId(false).toString());
|
||||||
|
if(headersForm.getPsbt() != null && headersForm.isEditable()) {
|
||||||
|
id.getStyleClass().add("unfinalized-psbt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void copyId(ActionEvent event) {
|
public void copyId(ActionEvent event) {
|
||||||
|
@ -399,7 +401,7 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
}
|
}
|
||||||
|
|
||||||
public void finalizeTransaction(ActionEvent event) {
|
public void finalizeTransaction(ActionEvent event) {
|
||||||
EventManager.get().post(new FinalizePSBTEvent(headersForm.getPsbt(), headersForm.getSigningWallet()));
|
EventManager.get().post(new FinalizePSBTEvent(headersForm.getPsbt(), signingWallet.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
@ -465,6 +467,9 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
locktimeDateType.setDisable(true);
|
locktimeDateType.setDisable(true);
|
||||||
locktimeBlock.setDisable(true);
|
locktimeBlock.setDisable(true);
|
||||||
locktimeDate.setDisable(true);
|
locktimeDate.setDisable(true);
|
||||||
|
id.getStyleClass().remove("unfinalized-psbt");
|
||||||
|
|
||||||
|
headersForm.setSigningWallet(event.getSigningWallet());
|
||||||
|
|
||||||
finalizeForm.setVisible(false);
|
finalizeForm.setVisible(false);
|
||||||
signaturesForm.setVisible(true);
|
signaturesForm.setVisible(true);
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
-fx-padding: 10 0 0 0;
|
-fx-padding: 10 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unfinalized-psbt {
|
||||||
|
-fx-text-fill: #a0a1a7;
|
||||||
|
}
|
||||||
|
|
||||||
#finalizeForm .input-container {
|
#finalizeForm .input-container {
|
||||||
-fx-alignment: center-left;
|
-fx-alignment: center-left;
|
||||||
-fx-pref-height: 30;
|
-fx-pref-height: 30;
|
||||||
|
|
Loading…
Reference in a new issue