diff --git a/lib/bcoin/coin.js b/lib/bcoin/coin.js index 61c4ec76..383613ec 100644 --- a/lib/bcoin/coin.js +++ b/lib/bcoin/coin.js @@ -168,7 +168,7 @@ Coin.parseJSON = function parseJSON(json) { version: json.version, height: json.height, value: utils.satoshi(json.value), - script: bcoin.script.parseRaw(json.script, 'hex')), + script: bcoin.script.parseRaw(json.script, 'hex'), coinbase: json.coinbase, hash: json.hash ? utils.revHex(json.hash) : null, index: json.index diff --git a/lib/bcoin/output.js b/lib/bcoin/output.js index d9484802..7d247750 100644 --- a/lib/bcoin/output.js +++ b/lib/bcoin/output.js @@ -155,7 +155,7 @@ Output.prototype.toJSON = function toJSON() { Output.parseJSON = function parseJSON(json) { return { value: utils.satoshi(json.value), - script: bcoin.script.parseRaw(json.script, 'hex')) + script: bcoin.script.parseRaw(json.script, 'hex') }; }; diff --git a/lib/bcoin/script.js b/lib/bcoin/script.js index 4ec3178b..537b2df0 100644 --- a/lib/bcoin/script.js +++ b/lib/bcoin/script.js @@ -64,7 +64,7 @@ function Witness(items, mutable) { this.redeem = null; - assert(Array.isArray(items)); + assert(Array.isArray(this.items)); } /** @@ -923,7 +923,7 @@ function Script(code, mutable) { this.redeem = null; - assert(Array.isArray(code)); + assert(Array.isArray(this.code)); assert(!this.raw || Buffer.isBuffer(this.raw)); }