restrict shown sighash to available values

This commit is contained in:
Craig Raw
2021-07-14 15:13:38 +02:00
parent f5a72105ac
commit 4a3ad9f4ff
2 changed files with 3 additions and 3 deletions
+1 -1
Submodule drongo updated: f1ce2ec939...c71979966b
@@ -409,10 +409,10 @@ public class HeadersController extends TransactionFormController implements Init
psbtSigHash = psbtInput.getSigHash();
}
}
sigHash.setValue(psbtSigHash);
sigHash.setValue(psbtSigHash == SigHash.ALL_TAPROOT ? SigHash.ALL : psbtSigHash);
sigHash.valueProperty().addListener((observable, oldValue, newValue) -> {
for(PSBTInput psbtInput : psbt.getPsbtInputs()) {
psbtInput.setSigHash(newValue);
psbtInput.setSigHash(psbtInput.isTaproot() && newValue == SigHash.ALL ? SigHash.ALL_TAPROOT : newValue);
}
});