diff --git a/src/CONST.ts b/src/CONST.ts
index 6f388ae93b73..f1364ebbb5bf 100755
--- a/src/CONST.ts
+++ b/src/CONST.ts
@@ -248,18 +248,9 @@ const CONST = {
BETAS: {
ALL: 'all',
CHRONOS_IN_CASH: 'chronosInCash',
- PAY_WITH_EXPENSIFY: 'payWithExpensify',
- FREE_PLAN: 'freePlan',
DEFAULT_ROOMS: 'defaultRooms',
- BETA_EXPENSIFY_WALLET: 'expensifyWallet',
BETA_COMMENT_LINKING: 'commentLinking',
- INTERNATIONALIZATION: 'internationalization',
POLICY_ROOMS: 'policyRooms',
- PASSWORDLESS: 'passwordless',
- TASKS: 'tasks',
- THREADS: 'threads',
- CUSTOM_STATUS: 'customStatus',
- NEW_DOT_SAML: 'newDotSAML',
VIOLATIONS: 'violations',
},
BUTTON_STATES: {
diff --git a/src/components/AddPaymentMethodMenu.js b/src/components/AddPaymentMethodMenu.js
index 4f1500132106..ce26985932d6 100644
--- a/src/components/AddPaymentMethodMenu.js
+++ b/src/components/AddPaymentMethodMenu.js
@@ -5,7 +5,6 @@ import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import useLocalize from '@hooks/useLocalize';
import compose from '@libs/compose';
-import Permissions from '@libs/Permissions';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import * as ReportUtils from '@libs/ReportUtils';
import iouReportPropTypes from '@pages/iouReportPropTypes';
@@ -41,9 +40,6 @@ const propTypes = {
vertical: PropTypes.oneOf(_.values(CONST.MODAL.ANCHOR_ORIGIN_VERTICAL)),
}),
- /** List of betas available to current user */
- betas: PropTypes.arrayOf(PropTypes.string),
-
/** Popover anchor ref */
anchorRef: refPropTypes,
@@ -61,12 +57,11 @@ const defaultProps = {
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT,
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM,
},
- betas: [],
anchorRef: () => {},
session: {},
};
-function AddPaymentMethodMenu({isVisible, onClose, anchorPosition, anchorAlignment, anchorRef, iouReport, onItemSelected, session, betas}) {
+function AddPaymentMethodMenu({isVisible, onClose, anchorPosition, anchorAlignment, anchorRef, iouReport, onItemSelected, session}) {
const {translate} = useLocalize();
return (
@@ -98,15 +93,13 @@ function AddPaymentMethodMenu({isVisible, onClose, anchorPosition, anchorAlignme
},
]
: []),
- ...(Permissions.canUseWallet(betas)
- ? [
- {
- text: translate('common.debitCard'),
- icon: Expensicons.CreditCard,
- onSelected: () => onItemSelected(CONST.PAYMENT_METHODS.DEBIT_CARD),
- },
- ]
- : []),
+ ...[
+ {
+ text: translate('common.debitCard'),
+ icon: Expensicons.CreditCard,
+ onSelected: () => onItemSelected(CONST.PAYMENT_METHODS.DEBIT_CARD),
+ },
+ ],
]}
withoutOverlay
/>
@@ -120,9 +113,6 @@ AddPaymentMethodMenu.displayName = 'AddPaymentMethodMenu';
export default compose(
withWindowDimensions,
withOnyx({
- betas: {
- key: ONYXKEYS.BETAS,
- },
session: {
key: ONYXKEYS.SESSION,
},
diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js
index 8420f3db7a1e..4e01ee4d7830 100644
--- a/src/components/LHNOptionsList/OptionRowLHN.js
+++ b/src/components/LHNOptionsList/OptionRowLHN.js
@@ -20,7 +20,6 @@ import DateUtils from '@libs/DateUtils';
import DomUtils from '@libs/DomUtils';
import {getGroupChatName} from '@libs/GroupChatUtils';
import * as OptionsListUtils from '@libs/OptionsListUtils';
-import Permissions from '@libs/Permissions';
import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager';
import * as ReportUtils from '@libs/ReportUtils';
import * as ContextMenuActions from '@pages/home/report/ContextMenu/ContextMenuActions';
@@ -36,9 +35,6 @@ const propTypes = {
// eslint-disable-next-line react/forbid-prop-types
hoverStyle: PropTypes.object,
- /** List of betas available to current user */
- betas: PropTypes.arrayOf(PropTypes.string),
-
/** The ID of the report that the option is for */
reportID: PropTypes.string.isRequired,
@@ -65,7 +61,6 @@ const defaultProps = {
style: null,
optionItem: null,
isFocused: false,
- betas: [],
};
function OptionRowLHN(props) {
@@ -157,7 +152,7 @@ function OptionRowLHN(props) {
const statusClearAfterDate = lodashGet(optionItem, 'status.clearAfter', '');
const formattedDate = DateUtils.getStatusUntilDate(statusClearAfterDate);
const statusContent = formattedDate ? `${statusText} (${formattedDate})` : statusText;
- const isStatusVisible = Permissions.canUseCustomStatus(props.betas) && !!emojiCode && ReportUtils.isOneOnOneChat(ReportUtils.getReport(optionItem.reportID));
+ const isStatusVisible = !!emojiCode && ReportUtils.isOneOnOneChat(ReportUtils.getReport(optionItem.reportID));
const isGroupChat =
optionItem.type === CONST.REPORT.TYPE.CHAT && _.isEmpty(optionItem.chatType) && !optionItem.isThread && lodashGet(optionItem, 'displayNamesWithTooltips.length', 0) > 2;
diff --git a/src/components/SettlementButton.js b/src/components/SettlementButton.js
index 27ba3d08a16f..8cf9655d34dc 100644
--- a/src/components/SettlementButton.js
+++ b/src/components/SettlementButton.js
@@ -5,7 +5,6 @@ import _ from 'underscore';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import compose from '@libs/compose';
-import Permissions from '@libs/Permissions';
import * as ReportUtils from '@libs/ReportUtils';
import iouReportPropTypes from '@pages/iouReportPropTypes';
import * as BankAccounts from '@userActions/BankAccounts';
@@ -34,9 +33,6 @@ const propTypes = {
/** The IOU/Expense report we are paying */
iouReport: iouReportPropTypes,
- /** List of betas available to current user */
- betas: PropTypes.arrayOf(PropTypes.string),
-
/** The route to redirect if user does not have a payment method setup */
enablePaymentsRoute: PropTypes.string.isRequired,
@@ -89,9 +85,8 @@ const defaultProps = {
currency: CONST.CURRENCY.USD,
chatReportID: '',
- // The "betas" array, "iouReport" and "nvp_lastPaymentMethod" objects needs to be stable to prevent the "useMemo"
+ // The "iouReport" and "nvp_lastPaymentMethod" objects needs to be stable to prevent the "useMemo"
// hook from being recreated unnecessarily, hence the use of CONST.EMPTY_ARRAY and CONST.EMPTY_OBJECT
- betas: CONST.EMPTY_ARRAY,
iouReport: CONST.EMPTY_OBJECT,
nvp_lastPaymentMethod: CONST.EMPTY_OBJECT,
style: [],
@@ -113,7 +108,6 @@ function SettlementButton({
addBankAccountRoute,
kycWallAnchorAlignment,
paymentMethodDropdownAnchorAlignment,
- betas,
buttonSize,
chatReportID,
currency,
@@ -155,7 +149,7 @@ function SettlementButton({
value: CONST.IOU.PAYMENT_TYPE.ELSEWHERE,
},
};
- const canUseWallet = !isExpenseReport && currency === CONST.CURRENCY.USD && Permissions.canUsePayWithExpensify(betas) && Permissions.canUseWallet(betas);
+ const canUseWallet = !isExpenseReport && currency === CONST.CURRENCY.USD;
// To achieve the one tap pay experience we need to choose the correct payment type as default,
// if user already paid for some request or expense, let's use the last payment method or use default.
@@ -171,7 +165,7 @@ function SettlementButton({
return _.sortBy(buttonOptions, (method) => (method.value === paymentMethod ? 0 : 1));
}
return buttonOptions;
- }, [betas, currency, formattedAmount, iouReport, nvp_lastPaymentMethod, policyID, translate]);
+ }, [currency, formattedAmount, iouReport, nvp_lastPaymentMethod, policyID, translate]);
const selectPaymentType = (event, iouPaymentType, triggerKYCFlow) => {
if (iouPaymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY || iouPaymentType === CONST.IOU.PAYMENT_TYPE.VBBA) {
@@ -219,9 +213,6 @@ SettlementButton.displayName = 'SettlementButton';
export default compose(
withNavigation,
withOnyx({
- betas: {
- key: ONYXKEYS.BETAS,
- },
nvp_lastPaymentMethod: {
key: ONYXKEYS.NVP_LAST_PAYMENT_METHOD,
},
diff --git a/src/libs/E2E/apiMocks/beginSignin.ts b/src/libs/E2E/apiMocks/beginSignin.ts
index 298846250a12..c5002f1f3dd8 100644
--- a/src/libs/E2E/apiMocks/beginSignin.ts
+++ b/src/libs/E2E/apiMocks/beginSignin.ts
@@ -17,11 +17,6 @@ const beginSignin = ({email}: SigninParams): Response => ({
validated: true,
},
},
- {
- onyxMethod: 'set',
- key: 'betas',
- value: ['passwordless'],
- },
],
jsonCode: 200,
requestID: '783e54ef4b38cff5-SJC',
diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts
index 0c8843b87415..c3e01735fb07 100644
--- a/src/libs/Permissions.ts
+++ b/src/libs/Permissions.ts
@@ -9,18 +9,10 @@ function canUseChronos(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.CHRONOS_IN_CASH) || canUseAllBetas(betas);
}
-function canUsePayWithExpensify(betas: Beta[]): boolean {
- return betas?.includes(CONST.BETAS.PAY_WITH_EXPENSIFY) || canUseAllBetas(betas);
-}
-
function canUseDefaultRooms(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.DEFAULT_ROOMS) || canUseAllBetas(betas);
}
-function canUseWallet(betas: Beta[]): boolean {
- return betas?.includes(CONST.BETAS.BETA_EXPENSIFY_WALLET) || canUseAllBetas(betas);
-}
-
function canUseCommentLinking(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.BETA_COMMENT_LINKING) || canUseAllBetas(betas);
}
@@ -34,14 +26,6 @@ function canUsePolicyRooms(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.POLICY_ROOMS) || canUseAllBetas(betas);
}
-function canUseTasks(betas: Beta[]): boolean {
- return betas?.includes(CONST.BETAS.TASKS) || canUseAllBetas(betas);
-}
-
-function canUseCustomStatus(betas: Beta[]): boolean {
- return betas?.includes(CONST.BETAS.CUSTOM_STATUS) || canUseAllBetas(betas);
-}
-
function canUseViolations(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.VIOLATIONS) || canUseAllBetas(betas);
}
@@ -55,13 +39,9 @@ function canUseLinkPreviews(): boolean {
export default {
canUseChronos,
- canUsePayWithExpensify,
canUseDefaultRooms,
- canUseWallet,
canUseCommentLinking,
canUsePolicyRooms,
- canUseTasks,
- canUseCustomStatus,
canUseLinkPreviews,
canUseViolations,
};
diff --git a/src/libs/__mocks__/Permissions.ts b/src/libs/__mocks__/Permissions.ts
index e95d13f52803..4f47c0b756b7 100644
--- a/src/libs/__mocks__/Permissions.ts
+++ b/src/libs/__mocks__/Permissions.ts
@@ -12,5 +12,4 @@ export default {
...jest.requireActual('../Permissions'),
canUseDefaultRooms: (betas: Beta[]) => betas.includes(CONST.BETAS.DEFAULT_ROOMS),
canUsePolicyRooms: (betas: Beta[]) => betas.includes(CONST.BETAS.POLICY_ROOMS),
- canUseCustomStatus: (betas: Beta[]) => betas.includes(CONST.BETAS.CUSTOM_STATUS),
};
diff --git a/src/libs/actions/User.js b/src/libs/actions/User.js
index 3c91dc4624cd..ad6fd7be10dd 100644
--- a/src/libs/actions/User.js
+++ b/src/libs/actions/User.js
@@ -77,7 +77,6 @@ function closeAccount(message) {
* Resends a validation link to a given login
*
* @param {String} login
- * @param {Boolean} isPasswordless - temporary param to trigger passwordless flow in backend
*/
function resendValidateCode(login) {
Session.resendValidateCode(login);
diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js
index 4b3c927ef317..ffe8271629f4 100755
--- a/src/pages/ProfilePage.js
+++ b/src/pages/ProfilePage.js
@@ -25,7 +25,6 @@ import UserDetailsTooltip from '@components/UserDetailsTooltip';
import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
import compose from '@libs/compose';
import Navigation from '@libs/Navigation/Navigation';
-import Permissions from '@libs/Permissions';
import * as ReportUtils from '@libs/ReportUtils';
import * as UserUtils from '@libs/UserUtils';
import * as ValidationUtils from '@libs/ValidationUtils';
@@ -133,7 +132,7 @@ function ProfilePage(props) {
const statusEmojiCode = lodashGet(details, 'status.emojiCode', '');
const statusText = lodashGet(details, 'status.text', '');
- const hasStatus = !!statusEmojiCode && Permissions.canUseCustomStatus(props.betas);
+ const hasStatus = !!statusEmojiCode;
const statusContent = `${statusEmojiCode} ${statusText}`;
const navigateBackTo = lodashGet(props.route, 'params.backTo', ROUTES.HOME);
@@ -292,9 +291,6 @@ export default compose(
isLoadingReportData: {
key: ONYXKEYS.IS_LOADING_REPORT_DATA,
},
- betas: {
- key: ONYXKEYS.BETAS,
- },
session: {
key: ONYXKEYS.SESSION,
},
diff --git a/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js b/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js
index 44183b23e43f..ec9421bfa1cb 100644
--- a/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js
+++ b/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js
@@ -1,7 +1,6 @@
import PropTypes from 'prop-types';
import React, {useMemo} from 'react';
import {View} from 'react-native';
-import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import AttachmentPicker from '@components/AttachmentPicker';
import Icon from '@components/Icon';
@@ -12,19 +11,14 @@ import Tooltip from '@components/Tooltip/PopoverAnchorTooltip';
import useLocalize from '@hooks/useLocalize';
import useWindowDimensions from '@hooks/useWindowDimensions';
import * as Browser from '@libs/Browser';
-import Permissions from '@libs/Permissions';
import * as ReportUtils from '@libs/ReportUtils';
import useThemeStyles from '@styles/useThemeStyles';
import * as IOU from '@userActions/IOU';
import * as Report from '@userActions/Report';
import * as Task from '@userActions/Task';
import CONST from '@src/CONST';
-import ONYXKEYS from '@src/ONYXKEYS';
const propTypes = {
- /** Beta features list */
- betas: PropTypes.arrayOf(PropTypes.string),
-
/** The report currently being looked at */
report: PropTypes.shape({
/** ID of the report */
@@ -87,7 +81,6 @@ const propTypes = {
};
const defaultProps = {
- betas: [],
reportParticipantIDs: [],
};
@@ -98,7 +91,6 @@ const defaultProps = {
* @returns {React.Component}
*/
function AttachmentPickerWithMenuItems({
- betas,
report,
reportParticipantIDs,
displayFileInModal,
@@ -152,7 +144,7 @@ function AttachmentPickerWithMenuItems({
* @returns {Boolean}
*/
const taskOption = useMemo(() => {
- if (!Permissions.canUseTasks(betas) || !ReportUtils.canCreateTaskInReport(report)) {
+ if (!ReportUtils.canCreateTaskInReport(report)) {
return [];
}
@@ -163,7 +155,7 @@ function AttachmentPickerWithMenuItems({
onSelected: () => Task.clearOutTaskInfoAndNavigate(reportID),
},
];
- }, [betas, report, reportID, translate]);
+ }, [report, reportID, translate]);
const onPopoverMenuClose = () => {
setMenuVisibility(false);
@@ -287,8 +279,4 @@ AttachmentPickerWithMenuItems.propTypes = propTypes;
AttachmentPickerWithMenuItems.defaultProps = defaultProps;
AttachmentPickerWithMenuItems.displayName = 'AttachmentPickerWithMenuItems';
-export default withOnyx({
- betas: {
- key: ONYXKEYS.BETAS,
- },
-})(AttachmentPickerWithMenuItems);
+export default AttachmentPickerWithMenuItems;
diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js
index 955e024bd7a8..e69531e2cc53 100644
--- a/src/pages/home/report/ReportActionItemSingle.js
+++ b/src/pages/home/report/ReportActionItemSingle.js
@@ -2,7 +2,6 @@ import lodashGet from 'lodash/get';
import PropTypes from 'prop-types';
import React, {useCallback, useMemo} from 'react';
import {View} from 'react-native';
-import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import Avatar from '@components/Avatar';
import MultipleAvatars from '@components/MultipleAvatars';
@@ -14,11 +13,9 @@ import Text from '@components/Text';
import Tooltip from '@components/Tooltip';
import UserDetailsTooltip from '@components/UserDetailsTooltip';
import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
-import compose from '@libs/compose';
import ControlSelection from '@libs/ControlSelection';
import DateUtils from '@libs/DateUtils';
import Navigation from '@libs/Navigation/Navigation';
-import Permissions from '@libs/Permissions';
import * as ReportUtils from '@libs/ReportUtils';
import * as UserUtils from '@libs/UserUtils';
import reportPropTypes from '@pages/reportPropTypes';
@@ -26,7 +23,6 @@ import styles from '@styles/styles';
import * as StyleUtils from '@styles/StyleUtils';
import themeColors from '@styles/themes/default';
import CONST from '@src/CONST';
-import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import ReportActionItemDate from './ReportActionItemDate';
import ReportActionItemFragment from './ReportActionItemFragment';
@@ -205,7 +201,7 @@ function ReportActionItemSingle(props) {
);
};
- const hasEmojiStatus = !displayAllActors && status && status.emojiCode && Permissions.canUseCustomStatus(props.betas);
+ const hasEmojiStatus = !displayAllActors && status && status.emojiCode;
const formattedDate = DateUtils.getStatusUntilDate(lodashGet(status, 'clearAfter'));
const statusText = lodashGet(status, 'text', '');
const statusTooltipText = formattedDate ? `${statusText} (${formattedDate})` : statusText;
@@ -267,11 +263,4 @@ ReportActionItemSingle.propTypes = propTypes;
ReportActionItemSingle.defaultProps = defaultProps;
ReportActionItemSingle.displayName = 'ReportActionItemSingle';
-export default compose(
- withLocalize,
- withOnyx({
- betas: {
- key: ONYXKEYS.BETAS,
- },
- }),
-)(ReportActionItemSingle);
+export default withLocalize(ReportActionItemSingle);
diff --git a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
index 739f7e3e0295..a1ba7042f158 100644
--- a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
+++ b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
@@ -13,7 +13,6 @@ import withWindowDimensions from '@components/withWindowDimensions';
import usePrevious from '@hooks/usePrevious';
import compose from '@libs/compose';
import Navigation from '@libs/Navigation/Navigation';
-import Permissions from '@libs/Permissions';
import useThemeStyles from '@styles/useThemeStyles';
import * as App from '@userActions/App';
import * as IOU from '@userActions/IOU';
@@ -54,9 +53,6 @@ const propTypes = {
name: PropTypes.string,
}),
- /* Beta features list */
- betas: PropTypes.arrayOf(PropTypes.string),
-
/** Indicated whether the report data is loading */
isLoading: PropTypes.bool,
@@ -74,7 +70,6 @@ const defaultProps = {
onHideCreateMenu: () => {},
onShowCreateMenu: () => {},
allPolicies: {},
- betas: [],
isLoading: false,
innerRef: null,
demoInfo: {},
@@ -207,15 +202,13 @@ function FloatingActionButtonAndPopover(props) {
text: props.translate('iou.sendMoney'),
onSelected: () => interceptAnonymousUser(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SEND)),
},
- ...(Permissions.canUseTasks(props.betas)
- ? [
- {
- icon: Expensicons.Task,
- text: props.translate('newTaskPage.assignTask'),
- onSelected: () => interceptAnonymousUser(() => Task.clearOutTaskInfoAndNavigate()),
- },
- ]
- : []),
+ ...[
+ {
+ icon: Expensicons.Task,
+ text: props.translate('newTaskPage.assignTask'),
+ onSelected: () => interceptAnonymousUser(() => Task.clearOutTaskInfoAndNavigate()),
+ },
+ ],
{
icon: Expensicons.Heart,
text: props.translate('sidebarScreen.saveTheWorld'),
@@ -278,9 +271,6 @@ export default compose(
key: ONYXKEYS.COLLECTION.POLICY,
selector: policySelector,
},
- betas: {
- key: ONYXKEYS.BETAS,
- },
isLoading: {
key: ONYXKEYS.IS_LOADING_APP,
},
diff --git a/src/pages/home/sidebar/SignInOrAvatarWithOptionalStatus.js b/src/pages/home/sidebar/SignInOrAvatarWithOptionalStatus.js
index 8e41e1c6af6a..8e680a20d419 100644
--- a/src/pages/home/sidebar/SignInOrAvatarWithOptionalStatus.js
+++ b/src/pages/home/sidebar/SignInOrAvatarWithOptionalStatus.js
@@ -2,13 +2,9 @@
import lodashGet from 'lodash/get';
import PropTypes from 'prop-types';
import React from 'react';
-import {withOnyx} from 'react-native-onyx';
import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails';
-import compose from '@libs/compose';
-import Permissions from '@libs/Permissions';
import personalDetailsPropType from '@pages/personalDetailsPropType';
import * as Session from '@userActions/Session';
-import ONYXKEYS from '@src/ONYXKEYS';
import AvatarWithOptionalStatus from './AvatarWithOptionalStatus';
import PressableAvatarWithIndicator from './PressableAvatarWithIndicator';
import SignInButton from './SignInButton';
@@ -19,22 +15,17 @@ const propTypes = {
/** Whether the create menu is open or not */
isCreateMenuOpen: PropTypes.bool,
-
- /** Beta features list */
- betas: PropTypes.arrayOf(PropTypes.string),
};
const defaultProps = {
- betas: [],
isCreateMenuOpen: false,
currentUserPersonalDetails: {
status: {emojiCode: ''},
},
};
-function SignInOrAvatarWithOptionalStatus({currentUserPersonalDetails, isCreateMenuOpen, betas}) {
- const statusEmojiCode = lodashGet(currentUserPersonalDetails, 'status.emojiCode', '');
- const emojiStatus = Permissions.canUseCustomStatus(betas) ? statusEmojiCode : '';
+function SignInOrAvatarWithOptionalStatus({currentUserPersonalDetails, isCreateMenuOpen}) {
+ const emojiStatus = lodashGet(currentUserPersonalDetails, 'status.emojiCode', '');
if (Session.isAnonymousUser()) {
return ;
@@ -53,11 +44,4 @@ function SignInOrAvatarWithOptionalStatus({currentUserPersonalDetails, isCreateM
SignInOrAvatarWithOptionalStatus.propTypes = propTypes;
SignInOrAvatarWithOptionalStatus.defaultProps = defaultProps;
SignInOrAvatarWithOptionalStatus.displayName = 'SignInOrAvatarWithOptionalStatus';
-export default compose(
- withCurrentUserPersonalDetails,
- withOnyx({
- betas: {
- key: ONYXKEYS.BETAS,
- },
- }),
-)(SignInOrAvatarWithOptionalStatus);
+export default withCurrentUserPersonalDetails(SignInOrAvatarWithOptionalStatus);
diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js
index d88105b31360..1bd57bcab32b 100755
--- a/src/pages/settings/InitialSettingsPage.js
+++ b/src/pages/settings/InitialSettingsPage.js
@@ -25,7 +25,6 @@ import useWaitForNavigation from '@hooks/useWaitForNavigation';
import compose from '@libs/compose';
import * as CurrencyUtils from '@libs/CurrencyUtils';
import Navigation from '@libs/Navigation/Navigation';
-import Permissions from '@libs/Permissions';
import * as PolicyUtils from '@libs/PolicyUtils';
import * as ReportUtils from '@libs/ReportUtils';
import * as UserUtils from '@libs/UserUtils';
@@ -89,9 +88,6 @@ const propTypes = {
/** Bank account attached to free plan */
reimbursementAccount: ReimbursementAccountProps.reimbursementAccountPropTypes,
- /** List of betas available to current user */
- betas: PropTypes.arrayOf(PropTypes.string),
-
/** Information about the user accepting the terms for payments */
walletTerms: walletTermsPropTypes,
@@ -120,7 +116,6 @@ const defaultProps = {
currentBalance: 0,
},
reimbursementAccount: {},
- betas: [],
walletTerms: {},
bankAccountList: {},
fundList: null,
@@ -288,8 +283,7 @@ function InitialSettingsPage(props) {
* @param {Boolean} isPaymentItem whether the item being rendered is the payments menu item
* @returns {Number} the user wallet balance
*/
- const getWalletBalance = (isPaymentItem) =>
- isPaymentItem && Permissions.canUseWallet(props.betas) ? CurrencyUtils.convertToDisplayString(props.userWallet.currentBalance) : undefined;
+ const getWalletBalance = (isPaymentItem) => isPaymentItem && CurrencyUtils.convertToDisplayString(props.userWallet.currentBalance);
return (
<>
@@ -324,7 +318,7 @@ function InitialSettingsPage(props) {
})}
>
);
- }, [getDefaultMenuItems, props.betas, props.userWallet.currentBalance, translate, isExecuting, singleExecution]);
+ }, [getDefaultMenuItems, props.userWallet.currentBalance, translate, isExecuting, singleExecution]);
const headerContent = (
@@ -426,9 +420,6 @@ export default compose(
userWallet: {
key: ONYXKEYS.USER_WALLET,
},
- betas: {
- key: ONYXKEYS.BETAS,
- },
bankAccountList: {
key: ONYXKEYS.BANK_ACCOUNT_LIST,
},
diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js
index 1e4485b4c36b..fc6c38f96335 100755
--- a/src/pages/settings/Profile/ProfilePage.js
+++ b/src/pages/settings/Profile/ProfilePage.js
@@ -15,7 +15,6 @@ import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions';
import compose from '@libs/compose';
import Navigation from '@libs/Navigation/Navigation';
-import Permissions from '@libs/Permissions';
import * as UserUtils from '@libs/UserUtils';
import userPropTypes from '@pages/settings/userPropTypes';
import useThemeStyles from '@styles/useThemeStyles';
@@ -83,15 +82,13 @@ function ProfilePage(props) {
pageRoute: ROUTES.SETTINGS_CONTACT_METHODS.route,
brickRoadIndicator: contactMethodBrickRoadIndicator,
},
- ...(Permissions.canUseCustomStatus(props.betas)
- ? [
- {
- description: props.translate('statusPage.status'),
- title: emojiCode ? `${emojiCode} ${lodashGet(props, 'currentUserPersonalDetails.status.text', '')}` : '',
- pageRoute: ROUTES.SETTINGS_STATUS,
- },
- ]
- : []),
+ ...[
+ {
+ description: props.translate('statusPage.status'),
+ title: emojiCode ? `${emojiCode} ${lodashGet(props, 'currentUserPersonalDetails.status.text', '')}` : '',
+ pageRoute: ROUTES.SETTINGS_STATUS,
+ },
+ ],
{
description: props.translate('pronounsPage.pronouns'),
title: getPronouns(),
@@ -184,8 +181,5 @@ export default compose(
user: {
key: ONYXKEYS.USER,
},
- betas: {
- key: ONYXKEYS.BETAS,
- },
}),
)(ProfilePage);
diff --git a/src/pages/settings/Wallet/AddDebitCardPage.js b/src/pages/settings/Wallet/AddDebitCardPage.js
index 45893dfb5d65..ed4a545ff208 100644
--- a/src/pages/settings/Wallet/AddDebitCardPage.js
+++ b/src/pages/settings/Wallet/AddDebitCardPage.js
@@ -14,9 +14,7 @@ import TextLink from '@components/TextLink';
import useLocalize from '@hooks/useLocalize';
import usePrevious from '@hooks/usePrevious';
import Navigation from '@libs/Navigation/Navigation';
-import Permissions from '@libs/Permissions';
import * as ValidationUtils from '@libs/ValidationUtils';
-import NotFoundPage from '@pages/ErrorPage/NotFoundPage';
import useThemeStyles from '@styles/useThemeStyles';
import * as PaymentMethods from '@userActions/PaymentMethods';
import CONST from '@src/CONST';
@@ -28,16 +26,12 @@ const propTypes = {
formData: PropTypes.shape({
setupComplete: PropTypes.bool,
}),
-
- /** List of betas available to current user */
- betas: PropTypes.arrayOf(PropTypes.string),
};
const defaultProps = {
formData: {
setupComplete: false,
},
- betas: [],
};
function DebitCardPage(props) {
@@ -104,10 +98,6 @@ function DebitCardPage(props) {
return errors;
};
- if (!Permissions.canUseWallet(props.betas)) {
- return ;
- }
-
return (
nameOnCardRef.current && nameOnCardRef.current.focus()}
@@ -212,7 +202,4 @@ export default withOnyx({
formData: {
key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM,
},
- betas: {
- key: ONYXKEYS.BETAS,
- },
})(DebitCardPage);
diff --git a/src/pages/settings/Wallet/WalletPage/WalletPage.js b/src/pages/settings/Wallet/WalletPage/WalletPage.js
index 4ef540f91eef..3ac8586daf97 100644
--- a/src/pages/settings/Wallet/WalletPage/WalletPage.js
+++ b/src/pages/settings/Wallet/WalletPage/WalletPage.js
@@ -25,7 +25,6 @@ import compose from '@libs/compose';
import getClickedTargetLocation from '@libs/getClickedTargetLocation';
import Navigation from '@libs/Navigation/Navigation';
import * as PaymentUtils from '@libs/PaymentUtils';
-import Permissions from '@libs/Permissions';
import PaymentMethodList from '@pages/settings/Wallet/PaymentMethodList';
import WalletEmptyState from '@pages/settings/Wallet/WalletEmptyState';
import useTheme from '@styles/themes/useTheme';
@@ -38,7 +37,7 @@ import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import {defaultProps, propTypes} from './walletPagePropTypes';
-function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymentMethods, network, shouldListenForResize, userWallet, walletTerms}) {
+function WalletPage({bankAccountList, cardList, fundList, isLoadingPaymentMethods, network, shouldListenForResize, userWallet, walletTerms}) {
const theme = useTheme();
const styles = useThemeStyles();
const {translate} = useLocalize();
@@ -309,7 +308,6 @@ function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymen
const shouldShowMakeDefaultButton =
!paymentMethod.isSelectedPaymentMethodDefault &&
- Permissions.canUseWallet(betas) &&
!(paymentMethod.formattedSelectedPaymentMethod.type === CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT && paymentMethod.selectedPaymentMethod.type === CONST.BANK_ACCOUNT.TYPE.BUSINESS);
// Determines whether or not the modal popup is mounted from the bottom of the screen instead of the side mount on Web or Desktop screens
@@ -565,9 +563,6 @@ WalletPage.displayName = 'WalletPage';
export default compose(
withNetwork(),
withOnyx({
- betas: {
- key: ONYXKEYS.BETAS,
- },
cardList: {
key: ONYXKEYS.CARD_LIST,
},
diff --git a/src/pages/tasks/NewTaskDescriptionPage.js b/src/pages/tasks/NewTaskDescriptionPage.js
index e571edce39e9..002ca2944e52 100644
--- a/src/pages/tasks/NewTaskDescriptionPage.js
+++ b/src/pages/tasks/NewTaskDescriptionPage.js
@@ -13,7 +13,6 @@ import useAutoFocusInput from '@hooks/useAutoFocusInput';
import * as Browser from '@libs/Browser';
import compose from '@libs/compose';
import Navigation from '@libs/Navigation/Navigation';
-import Permissions from '@libs/Permissions';
import updateMultilineInputRange from '@libs/UpdateMultilineInputRange';
import useThemeStyles from '@styles/useThemeStyles';
import * as Task from '@userActions/Task';
@@ -22,9 +21,6 @@ import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
const propTypes = {
- /** Beta features list */
- betas: PropTypes.arrayOf(PropTypes.string),
-
/** Grab the Share description of the Task */
task: PropTypes.shape({
/** Description of the Task */
@@ -35,7 +31,6 @@ const propTypes = {
};
const defaultProps = {
- betas: [],
task: {
description: '',
},
@@ -52,10 +47,6 @@ function NewTaskDescriptionPage(props) {
Navigation.goBack(ROUTES.NEW_TASK);
};
- if (!Permissions.canUseTasks(props.betas)) {
- Navigation.dismissModal();
- return null;
- }
return (
({
useAnimatedRef: jest.fn,
}));
-jest.mock('../../src/libs/Permissions', () => ({
- canUseTasks: jest.fn(() => true),
-}));
-
jest.mock('@react-navigation/native', () => {
const actualNav = jest.requireActual('@react-navigation/native');
return {
diff --git a/tests/perf-test/ReportScreen.perf-test.js b/tests/perf-test/ReportScreen.perf-test.js
index f8a44b54cc39..a49aaff4d697 100644
--- a/tests/perf-test/ReportScreen.perf-test.js
+++ b/tests/perf-test/ReportScreen.perf-test.js
@@ -54,7 +54,6 @@ jest.mock('../../src/hooks/useEnvironment', () =>
);
jest.mock('../../src/libs/Permissions', () => ({
- canUseTasks: jest.fn(() => true),
canUseLinkPreviews: jest.fn(() => true),
}));