improve verification of psbt sighash types

This commit is contained in:
Craig Raw
2026-05-31 11:55:38 +02:00
parent 9a603d7547
commit 61ed816c87
2 changed files with 11 additions and 1 deletions
+1 -1
Submodule drongo updated: 7d0699faa0...cab72b2037
@@ -2058,6 +2058,16 @@ public class AppController implements Initializable {
AppServices.showErrorDialog("Invalid PSBT", e.getMessage());
return;
}
try {
psbt.verifySigHashes();
} catch(PSBTSignatureException e) {
Optional<ButtonType> result = AppServices.showWarningDialog("Unsafe PSBT",
e.getMessage() + "\n\nThis PSBT may be unsafe to sign.\n\nOpen the transaction?", ButtonType.YES, ButtonType.NO);
if(result.isEmpty() || result.get() != ButtonType.YES) {
return;
}
}
}
//Skip the warning for already-confirmed transactions loaded for inspection