Use Networks.get with 2 args when possible

This commit is contained in:
eordano 2015-03-29 22:25:19 -03:00
parent 4f4b2b93fb
commit 662099a36e

View File

@ -512,7 +512,7 @@ HDPrivateKey.prototype.inspect = function() {
*/ */
HDPrivateKey.prototype.toObject = function toObject() { HDPrivateKey.prototype.toObject = function toObject() {
return { return {
network: Network.get(BufferUtil.integerFromBuffer(this._buffers.version)).name, network: Network.get(BufferUtil.integerFromBuffer(this._buffers.version), 'xprivkey').name,
depth: BufferUtil.integerFromSingleByteBuffer(this._buffers.depth), depth: BufferUtil.integerFromSingleByteBuffer(this._buffers.depth),
fingerPrint: BufferUtil.integerFromBuffer(this.fingerPrint), fingerPrint: BufferUtil.integerFromBuffer(this.fingerPrint),
parentFingerPrint: BufferUtil.integerFromBuffer(this._buffers.parentFingerPrint), parentFingerPrint: BufferUtil.integerFromBuffer(this._buffers.parentFingerPrint),