From 5c6c02104da6ccce618cc5df2dd01fece032d7c1 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Mon, 9 Jun 2014 16:09:22 -0300 Subject: [PATCH] fixes https://github.com/bitpay/copay/issues/613 --- js/models/core/Wallet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index a26ef3423..970567a5f 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -569,7 +569,7 @@ Wallet.prototype.getBalance = function(cb) { // we multiply and divide by COIN to avoid rounding errors when adding for (var a in balanceByAddr) { - balanceByAddr[a] = balanceByAddr[a] / COIN; + balanceByAddr[a] = balanceByAddr[a].toFixed(0) / COIN; } balance = balance / COIN; @@ -579,7 +579,7 @@ Wallet.prototype.getBalance = function(cb) { safeBalance += amt; } - safeBalance = safeBalance / COIN; + safeBalance = safeBalance.toFixed(0) / COIN; return cb(null, balance, balanceByAddr, safeBalance); }); };