mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
restrict shown sighash to available values
This commit is contained in:
parent
f5a72105ac
commit
4a3ad9f4ff
2 changed files with 3 additions and 3 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
||||||
Subproject commit f1ce2ec939743e24dcd1d8426f3b68e8971c2be0
|
Subproject commit c71979966bbdbff58b1f63946549b15f54890ab5
|
|
@ -409,10 +409,10 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
psbtSigHash = psbtInput.getSigHash();
|
psbtSigHash = psbtInput.getSigHash();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sigHash.setValue(psbtSigHash);
|
sigHash.setValue(psbtSigHash == SigHash.ALL_TAPROOT ? SigHash.ALL : psbtSigHash);
|
||||||
sigHash.valueProperty().addListener((observable, oldValue, newValue) -> {
|
sigHash.valueProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
for(PSBTInput psbtInput : psbt.getPsbtInputs()) {
|
for(PSBTInput psbtInput : psbt.getPsbtInputs()) {
|
||||||
psbtInput.setSigHash(newValue);
|
psbtInput.setSigHash(psbtInput.isTaproot() && newValue == SigHash.ALL ? SigHash.ALL_TAPROOT : newValue);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue