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() {