mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 10:06:45 +00:00
change default derivation path to match bip45
This commit is contained in:
parent
c4f5218f29
commit
401d3b8bfb
1 changed files with 6 additions and 3 deletions
|
@ -430,7 +430,7 @@ public enum ScriptType {
|
||||||
return List.of(MULTI);
|
return List.of(MULTI);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
P2SH("P2SH", "m/45'/0'/0'") {
|
P2SH("P2SH", "m/45'") {
|
||||||
@Override
|
@Override
|
||||||
public Address getAddress(byte[] scriptHash) {
|
public Address getAddress(byte[] scriptHash) {
|
||||||
return new P2SHAddress(scriptHash);
|
return new P2SHAddress(scriptHash);
|
||||||
|
@ -998,8 +998,11 @@ public enum ScriptType {
|
||||||
|
|
||||||
public List<ChildNumber> getDefaultDerivation(int account) {
|
public List<ChildNumber> getDefaultDerivation(int account) {
|
||||||
List<ChildNumber> copy = new ArrayList<>(KeyDerivation.parsePath(getDefaultDerivationPath()));
|
List<ChildNumber> copy = new ArrayList<>(KeyDerivation.parsePath(getDefaultDerivationPath()));
|
||||||
ChildNumber accountChildNumber = new ChildNumber(account, true);
|
if(copy.size() > 2) {
|
||||||
copy.set(2, accountChildNumber);
|
ChildNumber accountChildNumber = new ChildNumber(account, true);
|
||||||
|
copy.set(2, accountChildNumber);
|
||||||
|
}
|
||||||
|
|
||||||
return Collections.unmodifiableList(copy);
|
return Collections.unmodifiableList(copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue