mirror of https://github.com/BTCPrivate/copay.git
paypro: fix total on merchantdata.
This commit is contained in:
parent
f9406bbde2
commit
4d244a03f8
|
@ -881,8 +881,8 @@ Wallet.prototype.receivePaymentRequest = function(options, pr, cb) {
|
||||||
},
|
},
|
||||||
signature: sig,
|
signature: sig,
|
||||||
ca: ca,
|
ca: ca,
|
||||||
total: bignum('0')
|
},
|
||||||
}
|
total: bignum('0').toString(10)
|
||||||
};
|
};
|
||||||
|
|
||||||
return this.getUnspent(function(err, unspent) {
|
return this.getUnspent(function(err, unspent) {
|
||||||
|
@ -1050,6 +1050,10 @@ Wallet.prototype.createPaymentTxSync = function(options, merchantData, unspent)
|
||||||
var signed = b.sign(keys);
|
var signed = b.sign(keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof merchantData.total === 'string') {
|
||||||
|
merchantData.total = bignum(merchantData.total, 10);
|
||||||
|
}
|
||||||
|
|
||||||
merchantData.pr.pd.outputs.forEach(function(output, i) {
|
merchantData.pr.pd.outputs.forEach(function(output, i) {
|
||||||
var amount = output.get
|
var amount = output.get
|
||||||
? output.get('amount')
|
? output.get('amount')
|
||||||
|
|
Loading…
Reference in New Issue