From 044c53bcad2e28f90d406f7a1ccfb1aca23073e7 Mon Sep 17 00:00:00 2001 From: Bez Reyhan Date: Fri, 12 Dec 2014 12:28:26 -0800 Subject: [PATCH] transaction.addInput checks if sequence is NULL --- src/transaction.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/transaction.js b/src/transaction.js index 8a40709..167126c 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -93,7 +93,10 @@ Transaction.fromHex = function(hex) { * Note that this method does not sign the created input. */ Transaction.prototype.addInput = function(hash, index, sequence, script) { - if (sequence === undefined) sequence = Transaction.DEFAULT_SEQUENCE + if (sequence === undefined || sequence === null) { + sequence = Transaction.DEFAULT_SEQUENCE + } + script = script || Script.EMPTY if (typeof hash === 'string') {