Merge pull request #6469 from cmgustavo/bug/topup-rounding-error

Fix rounding error
This commit is contained in:
Matias Alejo Garcia 2017-07-26 00:39:59 +02:00 committed by GitHub
commit 20109d9cc3
2 changed files with 2 additions and 2 deletions

View file

@ -139,7 +139,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
var outputs = [];
var toAddress = invoice.bitcoinAddress;
var amountSat = parseInt(invoice.btcDue * 100000000); // BTC to Satoshi
var amountSat = parseInt((invoice.btcDue * 100000000).toFixed(0)); // BTC to Satoshi
outputs.push({
'toAddress': toAddress,

View file

@ -117,7 +117,7 @@ angular.module('copayApp.controllers').controller('topUpController', function($s
var outputs = [];
var toAddress = invoice.bitcoinAddress;
var amountSat = parseInt(invoice.btcDue * 100000000); // BTC to Satoshi
var amountSat = parseInt((invoice.btcDue * 100000000).toFixed(0)); // BTC to Satoshi
outputs.push({
'toAddress': toAddress,