Skip to content

Commit

Permalink
Merge pull request #45978 from Expensify/scott-removeChronosBeta
Browse files Browse the repository at this point in the history
Remove the chronosInCash beta
  • Loading branch information
aldo-expensify authored Jul 30, 2024
2 parents a5a17b0 + ad906ad commit df69c80
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
1 change: 0 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ const CONST = {
},
BETAS: {
ALL: 'all',
CHRONOS_IN_CASH: 'chronosInCash',
DEFAULT_ROOMS: 'defaultRooms',
VIOLATIONS: 'violations',
DUPE_DETECTION: 'dupeDetection',
Expand Down
13 changes: 1 addition & 12 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}

Expand Down
5 changes: 0 additions & 5 deletions src/libs/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ function canUseAllBetas(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.ALL);
}

function canUseChronos(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.CHRONOS_IN_CASH) || canUseAllBetas(betas);
}

function canUseDefaultRooms(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.DEFAULT_ROOMS) || canUseAllBetas(betas);
}
Expand Down Expand Up @@ -60,7 +56,6 @@ function canUseLinkPreviews(): boolean {
}

export default {
canUseChronos,
canUseDefaultRooms,
canUseLinkPreviews,
canUseViolations,
Expand Down

0 comments on commit df69c80

Please sign in to comment.