diff --git a/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java b/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java index 1eabe87..4d5e2be 100644 --- a/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java +++ b/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java @@ -101,7 +101,7 @@ public class Wallet { purposeNode = optionalPurposeNode.get(); } - purposeNode.fillToIndex(getLookAhead(purposeNode) - 1); + purposeNode.fillToIndex(getLookAhead(purposeNode)); return purposeNode; } diff --git a/src/main/java/com/sparrowwallet/drongo/wallet/WalletNode.java b/src/main/java/com/sparrowwallet/drongo/wallet/WalletNode.java index 19cdd92..e74da7a 100644 --- a/src/main/java/com/sparrowwallet/drongo/wallet/WalletNode.java +++ b/src/main/java/com/sparrowwallet/drongo/wallet/WalletNode.java @@ -40,7 +40,7 @@ public class WalletNode implements Comparable { return derivationPath; } - private void parseDerivation() { + public void parseDerivation() { this.derivation = KeyDerivation.parsePath(derivationPath); this.keyPurpose = KeyPurpose.fromChildNumber(derivation.get(0)); this.index = derivation.get(derivation.size() - 1).num();