you now have the option to clear or keep inputs when building a transaction

This commit is contained in:
OutCast3k 2014-12-05 13:00:19 +00:00
parent e486adbcc8
commit 245f1e4508
2 changed files with 8 additions and 2 deletions

View file

@ -300,7 +300,10 @@
</span>
</div>
<p class="text-muted">Enter a regular address or the redeem script to automatically load the inputs to build a transaction</p>
<div class="checkbox">
<label><input type="checkbox" id="clearInputsOnLoad" class="checkbox-inline" checked> Clear existing inputs when new inputs are loaded</label>
</div>
<div class="hidden alert alert-danger" id="redeemFromStatus"></div>

View file

@ -405,7 +405,10 @@ $(document).ready(function() {
var tx = coinjs.transaction();
tx.listUnspent(addr, function(data){
if(addr) {
$("#inputs .txidRemove, #inputs .txidClear").click();
if($("#clearInputsOnLoad").is(":checked")){
$("#inputs .txidRemove, #inputs .txidClear").click();
}
$("#redeemFromAddress").removeClass('hidden').html('<span class="glyphicon glyphicon-info-sign"></span> Retrieved unspent inputs from address <a href="https://www.blockchain.info/address/'+addr+'" target="_blank">'+addr+'</a>');
$.each($(data).find("unspent").children(), function(i,o){