wallet segwit spend bugfix

This commit is contained in:
OutCast3k 2018-06-17 09:22:44 +00:00
parent 5a65a77bd2
commit 37f4395d9f
2 changed files with 10 additions and 8 deletions

View file

@ -1549,13 +1549,15 @@
if(!witness_used.includes(y)){
var sw = coinjs.segwitAddress(this.witness[y][1]);
var b32 = coinjs.bech32Address(this.witness[y][1]);
if((sw['redeemscript'] == Crypto.util.bytesToHex(this.ins[i].script.chunks[0])) || (b32['redeemscript'] == Crypto.util.bytesToHex(this.ins[i].script.chunks[0]))){
witness_order.push(this.witness[y]);
witness_used.push(y);
if(b32['redeemscript'] == Crypto.util.bytesToHex(this.ins[i].script.chunks[0])){
this.ins[index].script = coinjs.script();
if(this.ins[i].script.chunks.length>0){
if((sw['redeemscript'] == Crypto.util.bytesToHex(this.ins[i].script.chunks[0])) || (b32['redeemscript'] == Crypto.util.bytesToHex(this.ins[i].script.chunks[0]))){
witness_order.push(this.witness[y]);
witness_used.push(y);
if(b32['redeemscript'] == Crypto.util.bytesToHex(this.ins[i].script.chunks[0])){
this.ins[index].script = coinjs.script();
}
break;
}
break;
}
}
}

View file

@ -1,9 +1,9 @@
---- Version 1.4 2018.06.11 ---
---- Version 1.4 2018.06.17 ---
77e4519962e2f6a9fc93342137dbb31c33b76b04 ./js/aes.js
3a09a8fc0cfe828b57fc798d668234d0490ee1a6 ./js/bootstrap-datetimepicker.min.js
253711c6d825de55a8360552573be950da180614 ./js/bootstrap.min.js
988f99187ab356bc5d12b61572f463e1785c15c2 ./js/coinbin.js
9b12eedab976f201ae5ee084701a038eebea5c9c ./js/coin.js
776a3e2ae1e5835cf0c290987ac5343d8f57ad73 ./coin.js
988565bc2cb402d63ed5c5fd7ff47c4278efc2c5 ./js/collapse.js
9ba5ede3d7f9d4c8fd623395f196adfdcf7e970f ./js/crypto-min.js
f7c09f2f5a721371e7d478050119f7e2d58e3ef9 ./js/crypto-sha256-hmac.js