diff --git a/lib/bcoin/wallet.js b/lib/bcoin/wallet.js index 063b0194..c2be1abe 100644 --- a/lib/bcoin/wallet.js +++ b/lib/bcoin/wallet.js @@ -319,7 +319,7 @@ Wallet.prototype.sign = function sign(tx, type, inputs, off) { // P2SH requires a redeem script after signatures if (bcoin.script.isScripthash(s)) { - if (input.script.length - 1 === this.n) { + if (input.script.length - 1 === this.m) { input.script.push(this.getP2SHRedemption()); } }