mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
show hwi signature verification errors, display strings encoded into scripts
This commit is contained in:
parent
c360177c31
commit
38768885e2
4 changed files with 5 additions and 3 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit 883b1c95b4e8bd961fb07ff09327d9da4a5bcb9d
|
||||
Subproject commit 0002d6bae69feb4a5195418ae99d520653c5e7dc
|
|
@ -25,7 +25,7 @@ public abstract class BaseController {
|
|||
scriptArea.setMouseOverTextDelay(Duration.ofMillis(150));
|
||||
scriptArea.addEventHandler(MouseOverTextEvent.MOUSE_OVER_TEXT_BEGIN, e -> {
|
||||
TwoDimensional.Position position = scriptArea.getParagraph(0).getStyleSpans().offsetToPosition(e.getCharacterIndex(), Backward);
|
||||
if(position.getMajor() % 2 == 0) {
|
||||
if(position.getMajor() % 2 == 0 && scriptArea.getScript().getChunks().size() > position.getMajor() / 2) {
|
||||
ScriptChunk hoverChunk = scriptArea.getScript().getChunks().get(position.getMajor()/2);
|
||||
if(!hoverChunk.isOpCode()) {
|
||||
Point2D pos = e.getScreenPosition();
|
||||
|
|
|
@ -58,6 +58,8 @@ public class ScriptArea extends CodeArea {
|
|||
append("<signature" + signatureCount++ + ">", "script-signature");
|
||||
} else if(chunk.isPubKey()) {
|
||||
append("<pubkey" + pubKeyCount++ + ">", "script-pubkey");
|
||||
} else if(chunk.isString()) {
|
||||
append(chunk.toString(), "script-other");
|
||||
} else if(chunk.isScript()) {
|
||||
Script nestedScript = chunk.getScript();
|
||||
if (nestedScript.equals(redeemScript)) {
|
||||
|
|
|
@ -278,7 +278,7 @@ public class Hwi {
|
|||
} catch(IOException e) {
|
||||
throw new SignTransactionException("Could not sign PSBT", e);
|
||||
} catch(PSBTParseException e) {
|
||||
throw new SignTransactionException("Could not parse signed PSBT", e);
|
||||
throw new SignTransactionException("Could not parse signed PSBT" + (e.getMessage() != null ? ": " + e.getMessage() : ""), e);
|
||||
} finally {
|
||||
isPromptActive = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue