mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 20:36:44 +00:00
minor refactoring
This commit is contained in:
parent
6f10f87c5b
commit
fdc31b8719
2 changed files with 5 additions and 15 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit c8226ea947d910186d3a2e37ba9c5e85c2ec09ef
|
||||
Subproject commit 2f5655708df1b7722dfb4098cd9c79aad1a35886
|
|
@ -185,22 +185,12 @@ public class InputController extends TransactionFormController implements Initia
|
|||
Script witnessScript = null;
|
||||
|
||||
if(txInput.hasWitness()) {
|
||||
List<ScriptChunk> witnessChunks = txInput.getWitness().asScriptChunks();
|
||||
if(witnessChunks.get(witnessChunks.size() - 1).isScript()) {
|
||||
witnesses = new Script(witnessChunks.subList(0, witnessChunks.size() - 1));
|
||||
witnessScript = witnessChunks.get(witnessChunks.size() - 1).getScript();
|
||||
} else {
|
||||
witnesses = new Script(witnessChunks);
|
||||
}
|
||||
witnesses = new Script(txInput.getWitness().asScriptChunks());
|
||||
witnessScript = txInput.getWitness().getWitnessScript();
|
||||
} else if(psbtInput != null) {
|
||||
if(psbtInput.getFinalScriptWitness() != null) {
|
||||
List<ScriptChunk> witnessChunks = psbtInput.getFinalScriptWitness().asScriptChunks();
|
||||
if(witnessChunks.get(witnessChunks.size() - 1).isScript()) {
|
||||
witnesses = new Script(witnessChunks.subList(0, witnessChunks.size() - 1));
|
||||
witnessScript = witnessChunks.get(witnessChunks.size() - 1).getScript();
|
||||
} else {
|
||||
witnesses = new Script(witnessChunks);
|
||||
}
|
||||
witnesses = new Script(psbtInput.getFinalScriptWitness().asScriptChunks());
|
||||
witnessScript = psbtInput.getFinalScriptWitness().getWitnessScript();
|
||||
} else if(psbtInput.getWitnessScript() != null) {
|
||||
witnessScript = psbtInput.getWitnessScript();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue