diff --git a/src/main/java/com/sparrowwallet/drongo/protocol/ScriptType.java b/src/main/java/com/sparrowwallet/drongo/protocol/ScriptType.java index d091b9d..5428b1c 100644 --- a/src/main/java/com/sparrowwallet/drongo/protocol/ScriptType.java +++ b/src/main/java/com/sparrowwallet/drongo/protocol/ScriptType.java @@ -430,7 +430,7 @@ public enum ScriptType { return List.of(MULTI); } }, - P2SH("P2SH", "m/45'/0'/0'") { + P2SH("P2SH", "m/45'") { @Override public Address getAddress(byte[] scriptHash) { return new P2SHAddress(scriptHash); @@ -998,8 +998,11 @@ public enum ScriptType { public List getDefaultDerivation(int account) { List copy = new ArrayList<>(KeyDerivation.parsePath(getDefaultDerivationPath())); - ChildNumber accountChildNumber = new ChildNumber(account, true); - copy.set(2, accountChildNumber); + if(copy.size() > 2) { + ChildNumber accountChildNumber = new ChildNumber(account, true); + copy.set(2, accountChildNumber); + } + return Collections.unmodifiableList(copy); }