diff --git a/src/CONST.ts b/src/CONST.ts index e2ba7ef0aa1d..8c3197a48b8b 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -359,7 +359,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 d7614139927f..3268db4be641 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -1699,14 +1699,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 { @@ -1717,17 +1715,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 23aabcf3c6d0..1ecde92eff19 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); } @@ -64,7 +60,6 @@ function canUseLinkPreviews(): boolean { } export default { - canUseChronos, canUseDefaultRooms, canUseLinkPreviews, canUseViolations,