diff --git a/src/CONST.ts b/src/CONST.ts
index 23957827d140..9ce1152d5dcb 100755
--- a/src/CONST.ts
+++ b/src/CONST.ts
@@ -234,7 +234,6 @@ const CONST = {
BETA_EXPENSIFY_WALLET: 'expensifyWallet',
BETA_COMMENT_LINKING: 'commentLinking',
INTERNATIONALIZATION: 'internationalization',
- IOU_SEND: 'sendMoney',
POLICY_ROOMS: 'policyRooms',
PASSWORDLESS: 'passwordless',
TASKS: 'tasks',
diff --git a/src/components/ReportWelcomeText.js b/src/components/ReportWelcomeText.js
index 071e53de1776..7c8444a5d5b9 100644
--- a/src/components/ReportWelcomeText.js
+++ b/src/components/ReportWelcomeText.js
@@ -48,9 +48,6 @@ const propTypes = {
/** All of the personal details for everyone */
personalDetails: PropTypes.objectOf(personalDetailsPropTypes),
- /** List of betas available to current user */
- betas: PropTypes.arrayOf(PropTypes.string),
-
...withLocalizePropTypes,
};
@@ -58,7 +55,6 @@ const defaultProps = {
report: {},
policy: {},
personalDetails: {},
- betas: [],
};
function ReportWelcomeText(props) {
@@ -73,7 +69,7 @@ function ReportWelcomeText(props) {
);
const isUserPolicyAdmin = PolicyUtils.isPolicyAdmin(props.policy);
const roomWelcomeMessage = ReportUtils.getRoomWelcomeMessage(props.report, isUserPolicyAdmin);
- const moneyRequestOptions = ReportUtils.getMoneyRequestOptions(props.report, participantAccountIDs, props.betas);
+ const moneyRequestOptions = ReportUtils.getMoneyRequestOptions(props.report, participantAccountIDs);
return (
<>
@@ -137,7 +133,9 @@ function ReportWelcomeText(props) {
))}
)}
- {moneyRequestOptions.includes(CONST.IOU.MONEY_REQUEST_TYPE.REQUEST) && {props.translate('reportActionsView.usePlusButton')}}
+ {(moneyRequestOptions.includes(CONST.IOU.MONEY_REQUEST_TYPE.SEND) || moneyRequestOptions.includes(CONST.IOU.MONEY_REQUEST_TYPE.REQUEST)) && (
+ {props.translate('reportActionsView.usePlusButton')}
+ )}
>
);
@@ -150,9 +148,6 @@ ReportWelcomeText.displayName = 'ReportWelcomeText';
export default compose(
withLocalize,
withOnyx({
- betas: {
- key: ONYXKEYS.BETAS,
- },
personalDetails: {
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
diff --git a/src/languages/en.ts b/src/languages/en.ts
index 7133ed88579e..6b98411550e7 100755
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -441,7 +441,7 @@ export default {
chatWithAccountManager: 'Chat with your account manager here',
sayHello: 'Say hello!',
welcomeToRoom: ({roomName}: WelcomeToRoomParams) => `Welcome to ${roomName}!`,
- usePlusButton: '\n\nYou can also use the + button below to request money or assign a task!',
+ usePlusButton: '\n\nYou can also use the + button to send money, request money, or assign a task!',
},
reportAction: {
asCopilot: 'as copilot for',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index a98ddfaff7d0..ec4dcd8333e9 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -433,7 +433,7 @@ export default {
chatWithAccountManager: 'Chatea con tu gestor de cuenta aquí',
sayHello: '¡Saluda!',
welcomeToRoom: ({roomName}: WelcomeToRoomParams) => `¡Bienvenido a ${roomName}!`,
- usePlusButton: '\n\n¡También puedes usar el botón + de abajo para pedir dinero o asignar una tarea!',
+ usePlusButton: '\n\n¡También puedes usar el botón + de abajo para enviar dinero, pedir dinero, o asignar una tarea!',
},
reportAction: {
asCopilot: 'como copiloto de',
diff --git a/src/libs/IOUUtils.ts b/src/libs/IOUUtils.ts
index 6f6024506985..2425211d16bc 100644
--- a/src/libs/IOUUtils.ts
+++ b/src/libs/IOUUtils.ts
@@ -77,7 +77,7 @@ function isIOUReportPendingCurrencyConversion(iouReport: Report): boolean {
* Checks if the iou type is one of request, send, or split.
*/
function isValidMoneyRequestType(iouType: string): boolean {
- const moneyRequestType: string[] = [CONST.IOU.MONEY_REQUEST_TYPE.REQUEST, CONST.IOU.MONEY_REQUEST_TYPE.SPLIT];
+ const moneyRequestType: string[] = [CONST.IOU.MONEY_REQUEST_TYPE.REQUEST, CONST.IOU.MONEY_REQUEST_TYPE.SPLIT, CONST.IOU.MONEY_REQUEST_TYPE.SEND];
return moneyRequestType.includes(iouType);
}
diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts
index 05322472a407..13489c396c3c 100644
--- a/src/libs/Permissions.ts
+++ b/src/libs/Permissions.ts
@@ -17,13 +17,6 @@ function canUseDefaultRooms(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.DEFAULT_ROOMS) || canUseAllBetas(betas);
}
-/**
- * IOU Send feature is temporarily disabled.
- */
-function canUseIOUSend(): boolean {
- return false;
-}
-
function canUseWallet(betas: Beta[]): boolean {
return betas?.includes(CONST.BETAS.BETA_EXPENSIFY_WALLET) || canUseAllBetas(betas);
}
@@ -68,7 +61,6 @@ export default {
canUseChronos,
canUsePayWithExpensify,
canUseDefaultRooms,
- canUseIOUSend,
canUseWallet,
canUseCommentLinking,
canUsePolicyRooms,
diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js
index 591656b5c06a..fb569cda4e45 100644
--- a/src/libs/ReportUtils.js
+++ b/src/libs/ReportUtils.js
@@ -3367,10 +3367,9 @@ function canRequestMoney(report, participants) {
*
* @param {Object} report
* @param {Array} reportParticipants
- * @param {Array} betas
* @returns {Array}
*/
-function getMoneyRequestOptions(report, reportParticipants, betas) {
+function getMoneyRequestOptions(report, reportParticipants) {
// In any thread or task report, we do not allow any new money requests yet
if (isChatThread(report) || isTaskReport(report)) {
return [];
@@ -3402,7 +3401,7 @@ function getMoneyRequestOptions(report, reportParticipants, betas) {
...(canRequestMoney(report, participants) ? [CONST.IOU.MONEY_REQUEST_TYPE.REQUEST] : []),
// Send money option should be visible only in DMs
- ...(Permissions.canUseIOUSend(betas) && isChatReport(report) && !isPolicyExpenseChat(report) && hasSingleParticipantInReport ? [CONST.IOU.MONEY_REQUEST_TYPE.SEND] : []),
+ ...(isChatReport(report) && !isPolicyExpenseChat(report) && hasSingleParticipantInReport ? [CONST.IOU.MONEY_REQUEST_TYPE.SEND] : []),
];
}
diff --git a/src/libs/__mocks__/Permissions.ts b/src/libs/__mocks__/Permissions.ts
index 2c062590573e..66ef64bbb994 100644
--- a/src/libs/__mocks__/Permissions.ts
+++ b/src/libs/__mocks__/Permissions.ts
@@ -12,6 +12,5 @@ export default {
...jest.requireActual('../Permissions'),
canUseDefaultRooms: (betas: Beta[]) => betas.includes(CONST.BETAS.DEFAULT_ROOMS),
canUsePolicyRooms: (betas: Beta[]) => betas.includes(CONST.BETAS.POLICY_ROOMS),
- canUseIOUSend: (betas: Beta[]) => betas.includes(CONST.BETAS.IOU_SEND),
canUseCustomStatus: (betas: Beta[]) => betas.includes(CONST.BETAS.CUSTOM_STATUS),
};
diff --git a/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js b/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js
index 6dd3355f4a53..4024cbd7a2c8 100644
--- a/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js
+++ b/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js
@@ -140,11 +140,11 @@ function AttachmentPickerWithMenuItems({
},
};
- return _.map(ReportUtils.getMoneyRequestOptions(report, reportParticipantIDs, betas), (option) => ({
+ return _.map(ReportUtils.getMoneyRequestOptions(report, reportParticipantIDs), (option) => ({
...options[option],
onSelected: () => IOU.startMoneyRequest(option, report.reportID),
}));
- }, [betas, report, reportParticipantIDs, translate]);
+ }, [report, reportParticipantIDs, translate]);
/**
* Determines if we can show the task option
diff --git a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
index e9ede2c9a89a..dfdea8894d68 100644
--- a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
+++ b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
@@ -185,15 +185,11 @@ function FloatingActionButtonAndPopover(props) {
text: props.translate('sidebarScreen.fabNewChat'),
onSelected: () => interceptAnonymousUser(() => Navigation.navigate(ROUTES.NEW)),
},
- ...(Permissions.canUseIOUSend(props.betas)
- ? [
- {
- icon: Expensicons.Send,
- text: props.translate('iou.sendMoney'),
- onSelected: () => interceptAnonymousUser(() => IOU.startMoneyRequest(CONST.IOU.MONEY_REQUEST_TYPE.SEND)),
- },
- ]
- : []),
+ {
+ icon: Expensicons.Send,
+ text: props.translate('iou.sendMoney'),
+ onSelected: () => interceptAnonymousUser(() => IOU.startMoneyRequest(CONST.IOU.MONEY_REQUEST_TYPE.SEND)),
+ },
{
icon: Expensicons.MoneyCircle,
text: props.translate('iou.requestMoney'),
diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
index 89c18efc4e76..bd3ea8a50402 100644
--- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
+++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
@@ -35,11 +35,12 @@ const propTypes = {
iou: iouPropTypes,
/** The current tab we have navigated to in the request modal. String that corresponds to the request type. */
- selectedTab: PropTypes.oneOf([CONST.TAB.DISTANCE, CONST.TAB.MANUAL, CONST.TAB.SCAN]).isRequired,
+ selectedTab: PropTypes.oneOf([CONST.TAB.DISTANCE, CONST.TAB.MANUAL, CONST.TAB.SCAN]),
};
const defaultProps = {
iou: iouDefaultProps,
+ selectedTab: undefined,
};
function MoneyRequestParticipantsPage({iou, selectedTab, route}) {
@@ -113,7 +114,7 @@ function MoneyRequestParticipantsPage({iou, selectedTab, route}) {
ref={(el) => (optionsSelectorRef.current = el)}
participants={iou.participants}
onAddParticipants={IOU.setMoneyRequestParticipants}
- navigateToRequest={() => navigateToConfirmationStep(CONST.IOU.MONEY_REQUEST_TYPE.REQUEST)}
+ navigateToRequest={() => navigateToConfirmationStep(iouType.current)}
navigateToSplit={() => navigateToConfirmationStep(CONST.IOU.MONEY_REQUEST_TYPE.SPLIT)}
safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle}
iouType={iouType.current}
@@ -126,7 +127,7 @@ function MoneyRequestParticipantsPage({iou, selectedTab, route}) {
);
}
-MoneyRequestParticipantsPage.displayName = 'IOUParticipantsPage';
+MoneyRequestParticipantsPage.displayName = 'MoneyRequestParticipantsPage';
MoneyRequestParticipantsPage.propTypes = propTypes;
MoneyRequestParticipantsPage.defaultProps = defaultProps;
diff --git a/tests/unit/IOUUtilsTest.js b/tests/unit/IOUUtilsTest.js
index 9ea30638af87..9785acf68317 100644
--- a/tests/unit/IOUUtilsTest.js
+++ b/tests/unit/IOUUtilsTest.js
@@ -118,10 +118,10 @@ describe('isValidMoneyRequestType', () => {
test('Return true for valid iou type', () => {
expect(IOUUtils.isValidMoneyRequestType('request')).toBe(true);
expect(IOUUtils.isValidMoneyRequestType('split')).toBe(true);
+ expect(IOUUtils.isValidMoneyRequestType('send')).toBe(true);
});
test('Return false for invalid iou type', () => {
- expect(IOUUtils.isValidMoneyRequestType('send')).toBe(false);
expect(IOUUtils.isValidMoneyRequestType('money')).toBe(false);
});
});