diff --git a/src/CONST.ts b/src/CONST.ts index 6ca8574b425b..55096bb279b2 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -363,7 +363,6 @@ const CONST = { }, BETAS: { ALL: 'all', - CHRONOS_IN_CASH: 'chronosInCash', DEFAULT_ROOMS: 'defaultRooms', VIOLATIONS: 'violations', DUPE_DETECTION: 'dupeDetection', diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 033f92b914f1..2fe9ea55a0ee 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -1713,14 +1713,12 @@ function canCreateOptimisticPersonalDetailOption({ * - There's no matching recent report and personal detail option * - The searchValue is a valid email or phone number * - The searchValue isn't the current personal detail login - * - We can use chronos or the search value is not the chronos email */ function getUserToInviteOption({ searchValue, excludeUnknownUsers = false, optionsToExclude = [], selectedOptions = [], - betas, reportActions = {}, showChatPreviewLine = false, }: GetUserToInviteConfig): ReportUtils.OptionData | null { @@ -1731,17 +1729,8 @@ function getUserToInviteOption({ const isValidPhoneNumber = parsedPhoneNumber.possible && Str.isValidE164Phone(LoginUtils.getPhoneNumberWithoutSpecialChars(parsedPhoneNumber.number?.input ?? '')); const isInOptionToExclude = optionsToExclude.findIndex((optionToExclude) => 'login' in optionToExclude && optionToExclude.login === PhoneNumber.addSMSDomainIfPhoneNumber(searchValue).toLowerCase()) !== -1; - const isChronosEmail = searchValue === CONST.EMAIL.CHRONOS; - if ( - !searchValue || - isCurrentUserLogin || - isInSelectedOption || - (!isValidEmail && !isValidPhoneNumber) || - isInOptionToExclude || - (isChronosEmail && !Permissions.canUseChronos(betas)) || - excludeUnknownUsers - ) { + if (!searchValue || isCurrentUserLogin || isInSelectedOption || (!isValidEmail && !isValidPhoneNumber) || isInOptionToExclude || excludeUnknownUsers) { return null; } diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index ee1ce27103de..3bfddca16401 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -7,10 +7,6 @@ function canUseAllBetas(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.ALL); } -function canUseChronos(betas: OnyxEntry): boolean { - return !!betas?.includes(CONST.BETAS.CHRONOS_IN_CASH) || canUseAllBetas(betas); -} - function canUseDefaultRooms(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.DEFAULT_ROOMS) || canUseAllBetas(betas); } @@ -60,7 +56,6 @@ function canUseLinkPreviews(): boolean { } export default { - canUseChronos, canUseDefaultRooms, canUseLinkPreviews, canUseViolations,