fix: standardize decimal places for cryptocurrency conversion

Unified the decimal places to 8 for all cryptocurrency conversions in
fiatConvert function. This simplifies the logic and ensures consistent
precision across all supported cryptocurrencies.
This commit is contained in:
Kumi 2024-08-09 08:31:15 +02:00
parent a1ccf0b43b
commit acb18fd17e
No known key found for this signature in database
GPG key ID: ECBCC9082395383F

View file

@ -119,7 +119,7 @@ function fiatConvert(value) {
if (exchangeRates[selectBox]) { if (exchangeRates[selectBox]) {
let value = fiatAmount / exchangeRates[selectBox]; let value = fiatAmount / exchangeRates[selectBox];
xmrValue.value = value.toFixed(selectBox == 'BTC' || selectBox == 'LTC' || selectBox == 'ETH' || selectBox == 'XAG' || selectBox == 'XAU' ? 8 : 2); xmrValue.value = value.toFixed(8);
} }
} }