Set #nLockTime automatically

This commit is contained in:
Denilson M. Amorim 2015-12-27 01:15:47 -03:00
parent c8577e03be
commit d53c236ec3

View File

@ -631,6 +631,15 @@ $(document).ready(function() {
} else {
listUnspentDefault(redeem);
}
if($("#redeemFromStatus").hasClass("hidden")) {
// An ethical dilemma: Should we automatically set nLockTime?
if(redeem.from == 'redeemScript' && redeem.decodedRs.type == "hodl__") {
$("#nLockTime").val(redeem.decodedRs.locktime);
} else {
$("#nLockTime").val(0);
}
}
});
/* function to determine what we are redeeming from */
@ -657,7 +666,7 @@ $(document).ready(function() {
r.addr = decodeRs['address'];
r.from = 'redeemScript';
r.decodedRs = decodeRs;
r.isMultisig = true;
r.isMultisig = true; // not quite, may be hodl
} else { // something else
r.addr = '';
r.from = 'other';