Skip to content

Commit

Permalink
bug fix for time locked addresses. transactions not being built corre…
Browse files Browse the repository at this point in the history
…ctly (no loss of funds!!!!)
  • Loading branch information
OutCast3k committed Dec 28, 2018
1 parent 739aee3 commit 194df37
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions js/coinbin.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ $(document).ready(function() {
/* redeem from button code */

$("#redeemFromBtn").click(function(){
var redeem = redeemingFrom($("#redeemFrom").val());
var redeem = redeemingFrom($("#redeemFrom").val());

$("#redeemFromStatus, #redeemFromAddress").addClass('hidden');

Expand Down Expand Up @@ -888,8 +888,9 @@ $(document).ready(function() {

if($("#redeemFromStatus").hasClass("hidden")) {
// An ethical dilemma: Should we automatically set nLockTime?
if(redeem.from == 'redeemScript' && redeem.decodedRs.type == "hodl__") {
$("#nLockTime").val(redeem.decodedRs.checklocktimeverify);
console.log(redeem);
if(redeem.from == 'redeemScript' && redeem.decodescript.type == "hodl__") {
$("#nLockTime").val(redeem.decodescript.checklocktimeverify);
} else {
$("#nLockTime").val(0);
}
Expand Down Expand Up @@ -925,7 +926,9 @@ $(document).ready(function() {
r.addr = decodeRs['address'];
r.from = 'redeemScript';
r.decodedRs = decodeRs.redeemscript;
r.type = decodeRs['type'];
r.redeemscript = true;
r.decodescript = decodeRs;
} else { // something else
r.addr = '';
r.from = 'other';
Expand Down

0 comments on commit 194df37

Please sign in to comment.