From daee409af8498602f10baf484a49d6121aae5518 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Thu, 9 Nov 2023 04:00:42 +0530 Subject: [PATCH] Bug fix for amount conversion --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 3706138..04b1722 100644 --- a/index.html +++ b/index.html @@ -1402,7 +1402,7 @@ }).catch(err => reject(err)) }) } - function getConvertedAmount(amount, formatAmount = false) { + function getConvertedAmount(amount, shouldFormatAmount = false) { // check if amount is a string and convert it to a number if (typeof amount === 'string') { amount = parseFloat(amount) @@ -1410,7 +1410,7 @@ let convertedAmount = amount; if (globalExchangeRate[selectedCurrency]) convertedAmount = parseFloat((amount * globalExchangeRate[selectedCurrency]).toFixed(8)) - if (formatAmount) + if (shouldFormatAmount) convertedAmount = formatAmount(convertedAmount) return convertedAmount }