From a46b01b027e5ddb2077acf30536b598ea6380dbf Mon Sep 17 00:00:00 2001 From: Roji Philip Date: Thu, 26 Oct 2023 22:52:31 +0530 Subject: [PATCH 1/2] ignore currency symbol for tbd --- src/libs/DistanceRequestUtils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/DistanceRequestUtils.js b/src/libs/DistanceRequestUtils.js index 32de571c218c..6e5eaedccc0c 100644 --- a/src/libs/DistanceRequestUtils.js +++ b/src/libs/DistanceRequestUtils.js @@ -90,7 +90,8 @@ const getDistanceMerchant = (hasRoute, distanceInMeters, unit, rate, currency, t const singularDistanceUnit = unit === CONST.CUSTOM_UNITS.DISTANCE_UNIT_MILES ? translate('common.mile') : translate('common.kilometer'); const unitString = distanceInUnits === 1 ? singularDistanceUnit : distanceUnit; const ratePerUnit = rate ? PolicyUtils.getUnitRateValue({rate}, toLocaleDigit) : translate('common.tbd'); - const currencySymbol = CurrencyUtils.getCurrencySymbol(currency) || `${currency} `; + // Set the currency symbol only if rate is valid + const currencySymbol = rate ? CurrencyUtils.getCurrencySymbol(currency) || `${currency} ` : ''; return `${distanceInUnits} ${unitString} @ ${currencySymbol}${ratePerUnit} / ${singularDistanceUnit}`; }; From 0afb9dd59d8f161613c764252394a3db37b86145 Mon Sep 17 00:00:00 2001 From: Roji Philip Date: Wed, 1 Nov 2023 08:28:00 +0530 Subject: [PATCH 2/2] removed unnecessary comment --- src/libs/DistanceRequestUtils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/DistanceRequestUtils.js b/src/libs/DistanceRequestUtils.js index a7e6ecd0ccc7..0f994cc54f93 100644 --- a/src/libs/DistanceRequestUtils.js +++ b/src/libs/DistanceRequestUtils.js @@ -90,7 +90,6 @@ const getDistanceMerchant = (hasRoute, distanceInMeters, unit, rate, currency, t const singularDistanceUnit = unit === CONST.CUSTOM_UNITS.DISTANCE_UNIT_MILES ? translate('common.mile') : translate('common.kilometer'); const unitString = distanceInUnits === 1 ? singularDistanceUnit : distanceUnit; const ratePerUnit = rate ? PolicyUtils.getUnitRateValue({rate}, toLocaleDigit) : translate('common.tbd'); - // Set the currency symbol only if rate is valid const currencySymbol = rate ? CurrencyUtils.getCurrencySymbol(currency) || `${currency} ` : ''; return `${distanceInUnits} ${unitString} @ ${currencySymbol}${ratePerUnit} / ${singularDistanceUnit}`;