fix check for public key when making a private derivation.
This commit is contained in:
parent
26e5914be2
commit
14803d0538
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ BIP32key.prototype.ckd = function(i) {
|
|||
else pub = this.key
|
||||
|
||||
if (i >= 2147483648) {
|
||||
if (this.priv) throw new Error("Can't do private derivation on public key!")
|
||||
if (!priv) throw new Error("Can't do private derivation on public key!")
|
||||
blob = [0].concat(priv.slice(0,32),util.numToBytes(i,4).reverse())
|
||||
}
|
||||
else blob = pub.concat(util.numToBytes(i,4).reverse())
|
||||
|
|
Loading…
Add table
Reference in a new issue