mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +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;
|
Script witnessScript = null;
|
||||||
|
|
||||||
if(txInput.hasWitness()) {
|
if(txInput.hasWitness()) {
|
||||||
List<ScriptChunk> witnessChunks = txInput.getWitness().asScriptChunks();
|
witnesses = new Script(txInput.getWitness().asScriptChunks());
|
||||||
if(witnessChunks.get(witnessChunks.size() - 1).isScript()) {
|
witnessScript = txInput.getWitness().getWitnessScript();
|
||||||
witnesses = new Script(witnessChunks.subList(0, witnessChunks.size() - 1));
|
|
||||||
witnessScript = witnessChunks.get(witnessChunks.size() - 1).getScript();
|
|
||||||
} else {
|
|
||||||
witnesses = new Script(witnessChunks);
|
|
||||||
}
|
|
||||||
} else if(psbtInput != null) {
|
} else if(psbtInput != null) {
|
||||||
if(psbtInput.getFinalScriptWitness() != null) {
|
if(psbtInput.getFinalScriptWitness() != null) {
|
||||||
List<ScriptChunk> witnessChunks = psbtInput.getFinalScriptWitness().asScriptChunks();
|
witnesses = new Script(psbtInput.getFinalScriptWitness().asScriptChunks());
|
||||||
if(witnessChunks.get(witnessChunks.size() - 1).isScript()) {
|
witnessScript = psbtInput.getFinalScriptWitness().getWitnessScript();
|
||||||
witnesses = new Script(witnessChunks.subList(0, witnessChunks.size() - 1));
|
|
||||||
witnessScript = witnessChunks.get(witnessChunks.size() - 1).getScript();
|
|
||||||
} else {
|
|
||||||
witnesses = new Script(witnessChunks);
|
|
||||||
}
|
|
||||||
} else if(psbtInput.getWitnessScript() != null) {
|
} else if(psbtInput.getWitnessScript() != null) {
|
||||||
witnessScript = psbtInput.getWitnessScript();
|
witnessScript = psbtInput.getWitnessScript();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue