From 4d244a03f88e9d9f8050009d4ebce8b7794c46e2 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 30 Jul 2014 13:35:57 -0700 Subject: [PATCH] paypro: fix total on merchantdata. --- js/models/core/Wallet.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 4f16be2fd..5bccd710c 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -881,8 +881,8 @@ Wallet.prototype.receivePaymentRequest = function(options, pr, cb) { }, signature: sig, ca: ca, - total: bignum('0') - } + }, + total: bignum('0').toString(10) }; return this.getUnspent(function(err, unspent) { @@ -1050,6 +1050,10 @@ Wallet.prototype.createPaymentTxSync = function(options, merchantData, unspent) var signed = b.sign(keys); } + if (typeof merchantData.total === 'string') { + merchantData.total = bignum(merchantData.total, 10); + } + merchantData.pr.pd.outputs.forEach(function(output, i) { var amount = output.get ? output.get('amount')