From aa8d86e6a4c547d33e7df2eccd13636848f3ec50 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Tue, 8 Apr 2014 23:44:55 +1000 Subject: [PATCH] Hash160 now outputs a buffer --- src/crypto.js | 2 +- src/hdwallet.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto.js b/src/crypto.js index 56249a7..64d69e6 100644 --- a/src/crypto.js +++ b/src/crypto.js @@ -11,7 +11,7 @@ function hash160(buffer) { var step2a = convert.bytesToWordArray(step1) var step2b = CryptoJS.RIPEMD160(step2a) - return convert.wordArrayToBytes(step2b) + return new Buffer(convert.wordArrayToBytes(step2b)) } function hash256(buffer) { diff --git a/src/hdwallet.js b/src/hdwallet.js index 776407d..6276111 100644 --- a/src/hdwallet.js +++ b/src/hdwallet.js @@ -130,7 +130,7 @@ HDWallet.prototype.getIdentifier = function() { } HDWallet.prototype.getFingerprint = function() { - return this.getIdentifier().slice(0, 4) + return Array.prototype.slice.call(this.getIdentifier(), 0, 4) } HDWallet.prototype.getAddress = function() {