Skip to content

Commit

Permalink
Merge pull request #46327 from Expensify/revert-46308-memoize-formatP…
Browse files Browse the repository at this point in the history
…honeNumber

Revert "memoize formatPhoneNumber method"
  • Loading branch information
chiragsalian authored Jul 26, 2024
2 parents ac2bcc7 + 39b78c8 commit a0cecfa
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/libs/LocalePhoneNumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {Str} from 'expensify-common';
import Onyx from 'react-native-onyx';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import memoize from './memoize';
import {parsePhoneNumber} from './PhoneNumber';

let countryCodeByIP: number;
Expand All @@ -15,7 +14,7 @@ Onyx.connect({
* Returns a locally converted phone number for numbers from the same region
* and an internationally converted phone number with the country code for numbers from other regions
*/
function formatPhoneNumberBase(number: string): string {
function formatPhoneNumber(number: string): string {
if (!number) {
return '';
}
Expand Down Expand Up @@ -47,8 +46,6 @@ function formatPhoneNumberBase(number: string): string {
return parsedPhoneNumber.number.international;
}

const formatPhoneNumber = memoize(formatPhoneNumberBase, {monitoringName: 'formatPhoneNumber'});

export {
// eslint-disable-next-line import/prefer-default-export
formatPhoneNumber,
Expand Down

0 comments on commit a0cecfa

Please sign in to comment.