Fix rounding error

This commit is contained in:
Gustavo Maximiliano Cortez 2017-07-25 19:24:51 -03:00
commit c3a443538c
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
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,