From eda7e9234588bdd6c246d3b1f97c49968d103fb2 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Fri, 20 Dec 2024 09:52:27 -0500 Subject: [PATCH] change logic around when to parse into our native formatter --- src/helpers/strings.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/strings.ts b/src/helpers/strings.ts index 986c23a665a..b53bb781d40 100644 --- a/src/helpers/strings.ts +++ b/src/helpers/strings.ts @@ -119,9 +119,10 @@ export function formatCurrency( const currencySymbol = supportedNativeCurrencies[currency].symbol; const [whole, fraction = ''] = numericString.split('.'); - if (fraction === '') { + const numericalWholeNumber = +whole; + if (numericalWholeNumber > 0) { // if the fraction is empty and the numeric string is less than 6 characters, we can just run it through our native currency display worklet - if (numericString.length <= 6) { + if (whole.length <= 6) { return convertAmountToNativeDisplayWorklet(numericString, currency, false, true); }