From fc9d2ff2f2df4c3f0774a4515a3f8849e5efc842 Mon Sep 17 00:00:00 2001 From: Joel Santirso Date: Wed, 6 May 2015 17:41:32 +0200 Subject: [PATCH] Update 1.5.x hdnode.js Informed the pubkey when building an HDNode from an ECKey (otherwise, derivation would fail on "this.pubKey.toBuffer()") --- src/hdnode.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hdnode.js b/src/hdnode.js index d3455a9..e189b3a 100644 --- a/src/hdnode.js +++ b/src/hdnode.js @@ -44,6 +44,7 @@ function HDNode (K, chainCode, network) { } else if (K instanceof ECKey) { assert(K.pub.compressed, 'ECKey must be compressed') this.privKey = K + this.pubKey = K.pub } else if (K instanceof ECPubKey) { assert(K.compressed, 'ECPubKey must be compressed') this.pubKey = K