mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 13:16:44 +00:00
fix copy address output script bytes to return entire scriptpubkey
This commit is contained in:
parent
55809b7dc3
commit
7590d786b5
1 changed files with 13 additions and 9 deletions
|
@ -654,14 +654,6 @@ public class EntryCell extends TreeTableCell<Entry, Entry> implements Confirmati
|
||||||
Clipboard.getSystemClipboard().setContent(content);
|
Clipboard.getSystemClipboard().setContent(content);
|
||||||
});
|
});
|
||||||
|
|
||||||
MenuItem copyHex = new MenuItem("Copy Script Output Bytes");
|
|
||||||
copyHex.setOnAction(AE -> {
|
|
||||||
hide();
|
|
||||||
ClipboardContent content = new ClipboardContent();
|
|
||||||
content.putString(Utils.bytesToHex(address.getOutputScriptData()));
|
|
||||||
Clipboard.getSystemClipboard().setContent(content);
|
|
||||||
});
|
|
||||||
|
|
||||||
MenuItem copyOutputDescriptor = new MenuItem("Copy Output Descriptor");
|
MenuItem copyOutputDescriptor = new MenuItem("Copy Output Descriptor");
|
||||||
copyOutputDescriptor.setOnAction(AE -> {
|
copyOutputDescriptor.setOnAction(AE -> {
|
||||||
hide();
|
hide();
|
||||||
|
@ -670,7 +662,19 @@ public class EntryCell extends TreeTableCell<Entry, Entry> implements Confirmati
|
||||||
Clipboard.getSystemClipboard().setContent(content);
|
Clipboard.getSystemClipboard().setContent(content);
|
||||||
});
|
});
|
||||||
|
|
||||||
getItems().addAll(copyAddress, copyHex, copyOutputDescriptor);
|
getItems().addAll(copyAddress, copyOutputDescriptor);
|
||||||
|
|
||||||
|
if(nodeEntry != null) {
|
||||||
|
MenuItem copyHex = new MenuItem("Copy Script Output Bytes");
|
||||||
|
copyHex.setOnAction(AE -> {
|
||||||
|
hide();
|
||||||
|
Script outputScript = nodeEntry.getWallet().getOutputScript(nodeEntry.getNode());
|
||||||
|
ClipboardContent content = new ClipboardContent();
|
||||||
|
content.putString(Utils.bytesToHex(outputScript.getProgram()));
|
||||||
|
Clipboard.getSystemClipboard().setContent(content);
|
||||||
|
});
|
||||||
|
getItems().add(copyHex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue