From c2e7840c4fac908b02ad154fbd1b50a8d25c93af Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Wed, 16 Jul 2014 17:53:38 +1000 Subject: [PATCH] Transaction: adds assert for invalid value type --- src/transaction.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transaction.js b/src/transaction.js index 80393b9..72e72f6 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -85,6 +85,7 @@ Transaction.prototype.addOutput = function(scriptPubKey, value) { } assert(scriptPubKey instanceof Script, 'Expected Address or Script, got ' + scriptPubKey) + assert.equal(typeof value, 'number', 'Expected number value, got ' + value) return (this.outs.push({ script: scriptPubKey,