diff --git a/src/address.js b/src/address.js index 9f701c8..57b6038 100644 --- a/src/address.js +++ b/src/address.js @@ -19,10 +19,10 @@ var Address = function (bytes, version) { this.version = arguments[0].version; } else if (typeof bytes === 'string') { - this.hash = + this.hash = bytes.length <= 34 ? base58.checkDecode(bytes) : bytes.length <= 40 ? conv.hexToBytes(bytes) - : util.error('Bad input'); + : util.error('Bad input'); this.version = version || this.hash.version || 0; } diff --git a/src/bip32.js b/src/bip32.js index fb4c80d..db3406f 100644 --- a/src/bip32.js +++ b/src/bip32.js @@ -117,7 +117,7 @@ BIP32key.prototype.privtopub = BIP32key.prototype.getPub = function() { } BIP32key.fromMasterKey = function(seed) { - var I = Crypto.HMAC(Crypto.SHA512,seed, 'Bitcoin seed' , { asBytes: true }) + var I = Crypto.HMAC(Crypto.SHA512,seed, 'Bitcoin seed', { asBytes: true }) return new BIP32key({ vbytes: conv.stringToBytes(PRIVDERIV), type: 'priv', diff --git a/src/crypto-js/sha512.js b/src/crypto-js/sha512.js index 42dd446..d9bc3e7 100644 --- a/src/crypto-js/sha512.js +++ b/src/crypto-js/sha512.js @@ -1,4 +1,3 @@ - var conv = require('../convert'); var util = require('../util'); @@ -44,7 +43,7 @@ var util = require('../util'); [0x4cc5d4be, 0xcb3e42b6], [0x597f299c, 0xfc657e2a], [0x5fcb6fab, 0x3ad6faec], [0x6c44198c, 0x4a475817] ]; - // Reusable objects + // Reusable objects var W = []; for (var i = 0; i < 80; i++) W.push([0,0]) @@ -97,7 +96,7 @@ var util = require('../util'); var hh = H7h; var hl = H7l; - // Rounds + // Rounds for (var i = 0; i < 80; i++) { // Shortcut var Wi = W[i];