diff --git a/lib/bip70/payment.js b/lib/bip70/payment.js index cdb8da07..bc34b141 100644 --- a/lib/bip70/payment.js +++ b/lib/bip70/payment.js @@ -104,7 +104,7 @@ Payment.prototype.toRaw = function toRaw(writer) { for (i = 0; i < this.transactions.length; i++) { tx = this.transactions[i]; - this.writeFieldBytes(2, tx.toRaw()); + bw.writeFieldBytes(2, tx.toRaw()); } for (i = 0; i < this.refundTo.length; i++) {