Compare commits

...

1 Commits

Author SHA1 Message Date
ultragtx
4a74985272 Litecoin: fixed getting bech32 address from P2SH embeded segwit input 2018-01-05 19:49:39 +08:00
3 changed files with 49 additions and 2 deletions

View File

@ -208,7 +208,7 @@ Input.prototype.getAddress = function getAddress(coin) {
if (coin)
return coin.getAddress();
if (this.witness.items.length > 0)
if (this.witness.items.length > 0 && this.script.getSize() === 0)
return this.witness.getInputAddress();
return this.script.getInputAddress();

View File

@ -2396,7 +2396,7 @@ Script.prototype.getMultisigInput = function getMultisigInput() {
*/
Script.prototype.isScripthashInput = function isScripthashInput() {
if (this.code.length < 2)
if (this.code.length < 1) // litecoin: change 2 to 1 to support embeded P2SH segwit tx
return false;
// Grab the raw redeem script.

File diff suppressed because one or more lines are too long