Browse Source

properly show 2 decimal places for exchanged amts

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
d5c7a07848
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 3
      app/utils.js

3
app/utils.js

@ -202,8 +202,9 @@ function formatExchangedCurrency(amount, exchangeType) {
if (global.exchangeRates != null && global.exchangeRates[exchangeType.toLowerCase()] != null) {
var dec = new Decimal(amount);
dec = dec.times(global.exchangeRates[exchangeType.toLowerCase()]);
var exchangedAmt = parseFloat(Math.round(dec * 100) / 100).toFixed(2);
return "$" + addThousandsSeparators(dec.toDecimalPlaces(2));
return "$" + addThousandsSeparators(exchangedAmt);
}
return "";

Loading…
Cancel
Save