From 6664586568924b7a2c5597b36563859019834426 Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Mon, 15 Dec 2014 00:24:31 +0000 Subject: [PATCH] The clear existing inputs checkbox was not behaving properly. This fixes the issue --- js/coinbin.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/js/coinbin.js b/js/coinbin.js index 194314d..3ac3da9 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -419,6 +419,13 @@ $(document).ready(function() { $("#redeemFromAddress").removeClass('hidden').html(' Retrieved unspent inputs from address '+addr+''); $.each($(data).find("unspent").children(), function(i,o){ + + if($("#inputs .txId:last").val()!=""){ + $("#inputs .txidAdd").click(); + } + + $("#inputs .row:last input").attr('disabled',true); + var val = (($(o).find("value").text()*1)/100000000); var txid = (($(o).find("tx_hash").text()).match(/.{1,2}/g).reverse()).join("")+''; @@ -430,12 +437,6 @@ $(document).ready(function() { } else { $("#inputs .txIdScript:last").val($(o).find("script").text()); } - - $("#inputs .row:last input").attr('disabled',true); - - if(i<($(data).find("unspent").children().length-1)){ - $("#inputs .txidAdd").click(); - } }); }