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')