diff --git a/js/coin.js b/js/coin.js index ae88afb..95e36e0 100644 --- a/js/coin.js +++ b/js/coin.js @@ -369,11 +369,11 @@ r.block = null; /* add an input to a transaction */ - r.addinput = function(txid, index, script, sequence){ + r.addinput = function(txid, index, script){ var o = {}; o.outpoint = {'hash':txid, 'index':index}; o.script = coinjs.script(script||[]); - o.sequence = (typeof sequence===undefined) ? 4294967295 : sequence; + o.sequence = (r.lock_time==0) ? 4294967295 : 0; return this.ins.push(o); } diff --git a/js/coinbin.js b/js/coinbin.js index 332c562..d615019 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -356,8 +356,7 @@ $(document).ready(function() { $.each($("#inputs .row"), function(i,o){ if($(".txId",o).val()!="" && $(".txIdN",o).val()!=""){ - var sequence = ($("#nLockTime").val()=="0") ? 4294967295 : 0; - tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val(), sequence); + tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val()); } });