Browse Source
properly show 2 decimal places for exchanged amts
fix-133-memory-crash
Dan Janosik
6 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
1 changed files with
2 additions and
1 deletions
-
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 ""; |
|
|
|