bug fix for time locked addresses. transactions not being built correctly (no loss of funds!!!!)

This commit is contained in:
OutCast3k 2018-12-28 23:33:42 +00:00
parent 739aee3c0f
commit 194df37d56

View file

@ -854,7 +854,7 @@ $(document).ready(function() {
/* redeem from button code */ /* redeem from button code */
$("#redeemFromBtn").click(function(){ $("#redeemFromBtn").click(function(){
var redeem = redeemingFrom($("#redeemFrom").val()); var redeem = redeemingFrom($("#redeemFrom").val());
$("#redeemFromStatus, #redeemFromAddress").addClass('hidden'); $("#redeemFromStatus, #redeemFromAddress").addClass('hidden');
@ -888,8 +888,9 @@ $(document).ready(function() {
if($("#redeemFromStatus").hasClass("hidden")) { if($("#redeemFromStatus").hasClass("hidden")) {
// An ethical dilemma: Should we automatically set nLockTime? // An ethical dilemma: Should we automatically set nLockTime?
if(redeem.from == 'redeemScript' && redeem.decodedRs.type == "hodl__") { console.log(redeem);
$("#nLockTime").val(redeem.decodedRs.checklocktimeverify); if(redeem.from == 'redeemScript' && redeem.decodescript.type == "hodl__") {
$("#nLockTime").val(redeem.decodescript.checklocktimeverify);
} else { } else {
$("#nLockTime").val(0); $("#nLockTime").val(0);
} }
@ -925,7 +926,9 @@ $(document).ready(function() {
r.addr = decodeRs['address']; r.addr = decodeRs['address'];
r.from = 'redeemScript'; r.from = 'redeemScript';
r.decodedRs = decodeRs.redeemscript; r.decodedRs = decodeRs.redeemscript;
r.type = decodeRs['type'];
r.redeemscript = true; r.redeemscript = true;
r.decodescript = decodeRs;
} else { // something else } else { // something else
r.addr = ''; r.addr = '';
r.from = 'other'; r.from = 'other';