From acb18fd17eb6aff9de3136dc609739231b9bb5c2 Mon Sep 17 00:00:00 2001 From: Kumi Date: Fri, 9 Aug 2024 08:31:15 +0200 Subject: [PATCH] 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. --- src/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/main.js b/src/js/main.js index 182e9ec..c3cb6bd 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -119,7 +119,7 @@ function fiatConvert(value) { if (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); } }