diff --git a/src/CONST.ts b/src/CONST.ts index 31f6529672c0..666d7db19a15 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -234,7 +234,6 @@ const CONST = { PASSWORDLESS: 'passwordless', TASKS: 'tasks', THREADS: 'threads', - SCAN_RECEIPTS: 'scanReceipts', CUSTOM_STATUS: 'customStatus', DISTANCE_REQUESTS: 'distanceRequests', }, diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index 7f52c41ad0fd..e1b51fb0f7c5 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -78,14 +78,6 @@ function canUseTasks(betas) { return _.contains(betas, CONST.BETAS.TASKS) || canUseAllBetas(betas); } -/** - * @param {Array} betas - * @returns {Boolean} - */ -function canUseScanReceipts(betas) { - return _.contains(betas, CONST.BETAS.SCAN_RECEIPTS) || canUseAllBetas(betas); -} - /** * @param {Array} betas * @returns {Boolean} @@ -119,7 +111,6 @@ export default { canUseCommentLinking, canUsePolicyRooms, canUseTasks, - canUseScanReceipts, canUseCustomStatus, canUseDistanceRequests, canUseLinkPreviews, diff --git a/src/pages/iou/MoneyRequestSelectorPage.js b/src/pages/iou/MoneyRequestSelectorPage.js index 31b2c886bd16..3863b43aa073 100644 --- a/src/pages/iou/MoneyRequestSelectorPage.js +++ b/src/pages/iou/MoneyRequestSelectorPage.js @@ -52,7 +52,7 @@ function MoneyRequestSelectorPage(props) { const iouType = lodashGet(props.route, 'params.iouType', ''); const reportID = lodashGet(props.route, 'params.reportID', ''); const {translate} = useLocalize(); - const {canUseScanReceipts, canUseDistanceRequests} = usePermissions(); + const {canUseDistanceRequests} = usePermissions(); const title = { [CONST.IOU.MONEY_REQUEST_TYPE.REQUEST]: translate('iou.requestMoney'), @@ -81,7 +81,7 @@ function MoneyRequestSelectorPage(props) { title={title[iouType]} onBackButtonPress={Navigation.dismissModal} /> - {(canUseScanReceipts || canUseDistanceRequests) && iouType === CONST.IOU.MONEY_REQUEST_TYPE.REQUEST ? ( + {iouType === CONST.IOU.MONEY_REQUEST_TYPE.REQUEST ? ( ( @@ -98,13 +98,11 @@ function MoneyRequestSelectorPage(props) { component={NewRequestAmountPage} initialParams={{reportID, iouType}} /> - {canUseScanReceipts && ( - - )} + {shouldDisplayDistanceRequest && (