diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 4eaff69a970a..063b9e812cde 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -180,8 +180,17 @@ const ROUTES = { getRoute: (threadReportID: string, field: ValueOf) => `r/${threadReportID}/edit/${field}` as const, }, EDIT_CURRENCY_REQUEST: { - route: 'r/:threadReportID/edit/currency', - getRoute: (threadReportID: string, currency: string, backTo: string) => `r/${threadReportID}/edit/currency?currency=${currency}&backTo=${backTo}` as const, + route: 'r/:action/:iouType/:transactionID/:threadReportID/:reportID/currency/:pageIndex', + getRoute: ( + action: ValueOf, + iouType: ValueOf, + transactionID: string, + reportID: string, + threadReportID: string, + pageIndex: string, + currency: string, + backTo: string, + ) => `r/${action}/${iouType}/${transactionID}/${threadReportID}/${reportID}/currency/${pageIndex}?backTo=${backTo}¤cy=${currency}` as const, }, EDIT_REPORT_FIELD_REQUEST: { route: 'r/:reportID/edit/policyField/:policyID/:fieldID', @@ -228,9 +237,17 @@ const ROUTES = { getRoute: (reportID: string, reportActionID: string, field: ValueOf) => `r/${reportID}/split/${reportActionID}/edit/${field}` as const, }, EDIT_SPLIT_BILL_CURRENCY: { - route: 'r/:reportID/split/:reportActionID/edit/currency', - getRoute: (reportID: string, reportActionID: string, currency: string, backTo: string) => - `r/${reportID}/split/${reportActionID}/edit/currency?currency=${currency}&backTo=${backTo}` as const, + route: 'r/:action/:iouType/:transactionID/:reportID/:reportActionID/currency/:pageIndex', + getRoute: ( + action: ValueOf, + iouType: ValueOf, + transactionID: string, + reportID: string, + reportActionID: string, + pageIndex: string, + currency: string, + backTo: string, + ) => `r/${action}/${iouType}/${transactionID}/${reportID}/${reportActionID}/currency/${pageIndex}?backTo=${backTo}¤cy=${currency}` as const, }, TASK_TITLE: { route: 'r/:reportID/title', @@ -267,8 +284,8 @@ const ROUTES = { getRoute: (iouType: string, reportID = '') => `${iouType}/new/${reportID}` as const, }, MONEY_REQUEST_AMOUNT: { - route: ':iouType/new/amount/:reportID?', - getRoute: (iouType: string, reportID = '') => `${iouType}/new/amount/${reportID}` as const, + route: ':iouType/new/amount/:reportID/:transactionID?', + getRoute: (iouType: string, reportID = '', transactionID = '') => `${iouType}/new/amount/${reportID}/${transactionID}` as const, }, MONEY_REQUEST_PARTICIPANTS: { route: ':iouType/new/participants/:reportID?', @@ -334,9 +351,9 @@ const ROUTES = { getUrlWithBackToParam(`create/${iouType}/category/${transactionID}/${reportID}`, backTo), }, MONEY_REQUEST_STEP_CURRENCY: { - route: 'create/:iouType/currency/:transactionID/:reportID/:pageIndex?', - getRoute: (iouType: ValueOf, transactionID: string, reportID: string, pageIndex = '', backTo = '') => - getUrlWithBackToParam(`create/${iouType}/currency/${transactionID}/${reportID}/${pageIndex}`, backTo), + route: ':action/:iouType/currency/:transactionID/:reportID/:pageIndex?', + getRoute: (action: ValueOf, iouType: ValueOf, transactionID: string, reportID: string, pageIndex = '', backTo = '') => + getUrlWithBackToParam(`${action}/${iouType}/currency/${transactionID}/${reportID}/${pageIndex}`, backTo), }, MONEY_REQUEST_STEP_DATE: { route: ':action/:iouType/date/:transactionID/:reportID', diff --git a/src/components/MoneyRequestConfirmationList.js b/src/components/MoneyRequestConfirmationList.js index dcd1de99f516..3c46f1bfeab9 100755 --- a/src/components/MoneyRequestConfirmationList.js +++ b/src/components/MoneyRequestConfirmationList.js @@ -656,7 +656,7 @@ function MoneyRequestConfirmationList(props) { Navigation.navigate(ROUTES.EDIT_SPLIT_BILL.getRoute(props.reportID, props.reportActionID, CONST.EDIT_REQUEST_FIELD.AMOUNT)); return; } - Navigation.navigate(ROUTES.MONEY_REQUEST_AMOUNT.getRoute(props.iouType, props.reportID)); + Navigation.navigate(ROUTES.MONEY_REQUEST_AMOUNT.getRoute(props.iouType, props.reportID, transaction.transactionID)); }} style={[styles.moneyRequestMenuItem, styles.mt2]} titleStyle={styles.moneyRequestConfirmationAmount} diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx index ee849cd54c10..a7f6e4761491 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx @@ -98,7 +98,6 @@ const MoneyRequestModalStackNavigator = createModalStackNavigator require('../../../pages/iou/steps/NewRequestAmountPage').default as React.ComponentType, [SCREENS.MONEY_REQUEST.PARTICIPANTS]: () => require('../../../pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage').default as React.ComponentType, [SCREENS.MONEY_REQUEST.CONFIRMATION]: () => require('../../../pages/iou/steps/MoneyRequestConfirmPage').default as React.ComponentType, - [SCREENS.MONEY_REQUEST.CURRENCY]: () => require('../../../pages/iou/IOUCurrencySelection').default as React.ComponentType, [SCREENS.MONEY_REQUEST.CATEGORY]: () => require('../../../pages/iou/MoneyRequestCategoryPage').default as React.ComponentType, [SCREENS.IOU_SEND.ADD_BANK_ACCOUNT]: () => require('../../../pages/AddPersonalBankAccountPage').default as React.ComponentType, [SCREENS.IOU_SEND.ADD_DEBIT_CARD]: () => require('../../../pages/settings/Wallet/AddDebitCardPage').default as React.ComponentType, @@ -111,7 +110,7 @@ const MoneyRequestModalStackNavigator = createModalStackNavigator({ [SCREENS.SPLIT_DETAILS.ROOT]: () => require('../../../pages/iou/SplitBillDetailsPage').default as React.ComponentType, [SCREENS.SPLIT_DETAILS.EDIT_REQUEST]: () => require('../../../pages/EditSplitBillPage').default as React.ComponentType, - [SCREENS.SPLIT_DETAILS.EDIT_CURRENCY]: () => require('../../../pages/iou/IOUCurrencySelection').default as React.ComponentType, + [SCREENS.SPLIT_DETAILS.EDIT_CURRENCY]: () => require('../../../pages/iou/request/step/IOURequestStepCurrency').default as React.ComponentType, }); const DetailsModalStackNavigator = createModalStackNavigator({ @@ -276,7 +275,7 @@ const FlagCommentStackNavigator = createModalStackNavigator({ [SCREENS.EDIT_REQUEST.ROOT]: () => require('../../../pages/EditRequestPage').default as React.ComponentType, - [SCREENS.EDIT_REQUEST.CURRENCY]: () => require('../../../pages/iou/IOUCurrencySelection').default as React.ComponentType, + [SCREENS.EDIT_REQUEST.CURRENCY]: () => require('../../../pages/iou/request/step/IOURequestStepCurrency').default as React.ComponentType, [SCREENS.EDIT_REQUEST.REPORT_FIELD]: () => require('../../../pages/EditReportFieldPage').default as React.ComponentType, }); diff --git a/src/pages/EditRequestAmountPage.js b/src/pages/EditRequestAmountPage.js index bc77b9ecca75..a9d24b89f6ca 100644 --- a/src/pages/EditRequestAmountPage.js +++ b/src/pages/EditRequestAmountPage.js @@ -5,7 +5,9 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; import useLocalize from '@hooks/useLocalize'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import Navigation from '@libs/Navigation/Navigation'; import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; import MoneyRequestAmountForm from './iou/steps/MoneyRequestAmountForm'; const propTypes = { @@ -40,6 +42,10 @@ function EditRequestAmountPage({defaultAmount, defaultCurrency, onNavigateToCurr }, []), ); + const navigateBack = () => { + Navigation.goBack(ROUTES.HOME); + }; + return ( - + { const activeRoute = encodeURIComponent(Navigation.getActiveRouteWithoutParams()); - Navigation.navigate(ROUTES.EDIT_CURRENCY_REQUEST.getRoute(report.reportID, defaultCurrency, activeRoute)); + Navigation.navigate( + ROUTES.EDIT_CURRENCY_REQUEST.getRoute( + CONST.IOU.ACTION.EDIT, + CONST.IOU.TYPE.REQUEST, + transaction.transactionID, + report.reportID, + report.reportID, + 'edit', + defaultCurrency, + activeRoute, + ), + ); }} /> ); diff --git a/src/pages/EditSplitBillPage.tsx b/src/pages/EditSplitBillPage.tsx index 8029a4f56f76..3f4d9027570b 100644 --- a/src/pages/EditSplitBillPage.tsx +++ b/src/pages/EditSplitBillPage.tsx @@ -74,7 +74,18 @@ function EditSplitBillPage({route, transaction, draftTransaction, report}: EditS }} onNavigateToCurrency={() => { const activeRoute = encodeURIComponent(Navigation.getActiveRouteWithoutParams()); - Navigation.navigate(ROUTES.EDIT_SPLIT_BILL_CURRENCY.getRoute(reportID, reportActionID, defaultCurrency, activeRoute)); + Navigation.navigate( + ROUTES.EDIT_SPLIT_BILL_CURRENCY.getRoute( + CONST.IOU.ACTION.EDIT, + CONST.IOU.TYPE.SPLIT, + transaction?.transactionID ?? CONST.IOU.OPTIMISTIC_TRANSACTION_ID, + reportID, + reportActionID, + 'edit', + defaultCurrency, + activeRoute, + ), + ); }} /> ); diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js deleted file mode 100644 index 2a48897bfc85..000000000000 --- a/src/pages/iou/IOUCurrencySelection.js +++ /dev/null @@ -1,198 +0,0 @@ -import Str from 'expensify-common/lib/str'; -import lodashGet from 'lodash/get'; -import PropTypes from 'prop-types'; -import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; -import {Keyboard} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; -import _ from 'underscore'; -import HeaderWithBackButton from '@components/HeaderWithBackButton'; -import {withNetwork} from '@components/OnyxProvider'; -import ScreenWrapper from '@components/ScreenWrapper'; -import SelectionList from '@components/SelectionList'; -import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; -import compose from '@libs/compose'; -import * as CurrencyUtils from '@libs/CurrencyUtils'; -import Navigation from '@libs/Navigation/Navigation'; -import * as ReportActionsUtils from '@libs/ReportActionsUtils'; -import * as ReportUtils from '@libs/ReportUtils'; -import CONST from '@src/CONST'; -import ONYXKEYS from '@src/ONYXKEYS'; -import ROUTES from '@src/ROUTES'; -import {iouDefaultProps, iouPropTypes} from './propTypes'; - -/** - * IOU Currency selection for selecting currency - */ -const propTypes = { - /** Route from navigation */ - route: PropTypes.shape({ - /** Params from the route */ - params: PropTypes.shape({ - /** The type of IOU report, i.e. bill, request, send */ - iouType: PropTypes.string, - - /** The report ID of the IOU */ - reportID: PropTypes.string, - - /** Currently selected currency */ - currency: PropTypes.string, - - /** Route to navigate back after selecting a currency */ - backTo: PropTypes.string, - }), - }).isRequired, - - // The currency list constant object from Onyx - currencyList: PropTypes.objectOf( - PropTypes.shape({ - // Symbol for the currency - symbol: PropTypes.string, - - // Name of the currency - name: PropTypes.string, - - // ISO4217 Code for the currency - ISO4217: PropTypes.string, - }), - ), - - /** Holds data related to Money Request view state, rather than the underlying Money Request data. */ - iou: iouPropTypes, - - ...withLocalizePropTypes, -}; - -const defaultProps = { - currencyList: {}, - iou: iouDefaultProps, -}; - -function IOUCurrencySelection(props) { - const [searchValue, setSearchValue] = useState(''); - const optionsSelectorRef = useRef(); - const selectedCurrencyCode = (lodashGet(props.route, 'params.currency', props.iou.currency) || CONST.CURRENCY.USD).toUpperCase(); - const iouType = lodashGet(props.route, 'params.iouType', CONST.IOU.TYPE.REQUEST); - const reportID = lodashGet(props.route, 'params.reportID', ''); - const threadReportID = lodashGet(props.route, 'params.threadReportID', ''); - - // Decides whether to allow or disallow editing a money request - useEffect(() => { - // Do not dismiss the modal, when it is not the edit flow. - if (!threadReportID) { - return; - } - - const report = ReportUtils.getReport(threadReportID); - const parentReportAction = ReportActionsUtils.getReportAction(report.parentReportID, report.parentReportActionID); - - // Do not dismiss the modal, when a current user can edit this currency of this money request. - if (ReportUtils.canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.CURRENCY)) { - return; - } - - // Dismiss the modal when a current user cannot edit a money request. - Navigation.isNavigationReady().then(() => { - Navigation.dismissModal(); - }); - }, [threadReportID]); - - const confirmCurrencySelection = useCallback( - (option) => { - const backTo = lodashGet(props.route, 'params.backTo', ''); - Keyboard.dismiss(); - - // When we refresh the web, the money request route gets cleared from the navigation stack. - // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. - // To prevent any negative experience, we have made the decision to simply close the currency selection page. - if (_.isEmpty(backTo) || props.navigation.getState().routes.length === 1) { - Navigation.goBack(); - } else { - Navigation.navigate(`${props.route.params.backTo}?currency=${option.currencyCode}`); - } - }, - [props.route, props.navigation], - ); - - const {translate, currencyList} = props; - const {sections, headerMessage, initiallyFocusedOptionKey} = useMemo(() => { - const currencyOptions = _.map(currencyList, (currencyInfo, currencyCode) => { - const isSelectedCurrency = currencyCode === selectedCurrencyCode; - return { - currencyName: currencyInfo.name, - text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, - currencyCode, - keyForList: currencyCode, - isSelected: isSelectedCurrency, - }; - }); - - const searchRegex = new RegExp(Str.escapeForRegExp(searchValue.trim().replace(CONST.REGEX.ANY_SPACE, ' ')), 'i'); - const filteredCurrencies = _.filter( - currencyOptions, - (currencyOption) => - searchRegex.test(currencyOption.text.replace(CONST.REGEX.ANY_SPACE, ' ')) || searchRegex.test(currencyOption.currencyName.replace(CONST.REGEX.ANY_SPACE, ' ')), - ); - const isEmpty = searchValue.trim() && !filteredCurrencies.length; - - return { - initiallyFocusedOptionKey: _.get( - _.find(filteredCurrencies, (currency) => currency.currencyCode === selectedCurrencyCode), - 'keyForList', - ), - sections: isEmpty - ? [] - : [ - { - data: filteredCurrencies, - indexOffset: 0, - }, - ], - headerMessage: isEmpty ? translate('common.noResultsFound') : '', - }; - }, [currencyList, searchValue, selectedCurrencyCode, translate]); - - return ( - optionsSelectorRef.current && optionsSelectorRef.current.focus()} - testID={IOUCurrencySelection.displayName} - > - {({didScreenTransitionEnd}) => ( - <> - Navigation.goBack(ROUTES.MONEY_REQUEST.getRoute(iouType, reportID))} - /> - { - if (!didScreenTransitionEnd) { - return; - } - confirmCurrencySelection(option); - }} - headerMessage={headerMessage} - initiallyFocusedOptionKey={initiallyFocusedOptionKey} - showScrollIndicator - /> - - )} - - ); -} - -IOUCurrencySelection.displayName = 'IOUCurrencySelection'; -IOUCurrencySelection.propTypes = propTypes; -IOUCurrencySelection.defaultProps = defaultProps; - -export default compose( - withLocalize, - withOnyx({ - currencyList: {key: ONYXKEYS.CURRENCY_LIST}, - iou: {key: ONYXKEYS.IOU}, - }), - withNetwork(), -)(IOUCurrencySelection); diff --git a/src/pages/iou/request/step/IOURequestStepAmount.js b/src/pages/iou/request/step/IOURequestStepAmount.js index 19b558ef587e..57a3f1f8676f 100644 --- a/src/pages/iou/request/step/IOURequestStepAmount.js +++ b/src/pages/iou/request/step/IOURequestStepAmount.js @@ -109,7 +109,9 @@ function IOURequestStepAmount({ }; const navigateToCurrencySelectionPage = () => { - Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CURRENCY.getRoute(iouType, transactionID, reportID, backTo ? 'confirm' : '', Navigation.getActiveRouteWithoutParams())); + Navigation.navigate( + ROUTES.MONEY_REQUEST_STEP_CURRENCY.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID, backTo ? 'confirm' : '', Navigation.getActiveRouteWithoutParams()), + ); }; /** diff --git a/src/pages/iou/request/step/IOURequestStepCurrency.js b/src/pages/iou/request/step/IOURequestStepCurrency.js index 42e059d7d276..a18814686eb0 100644 --- a/src/pages/iou/request/step/IOURequestStepCurrency.js +++ b/src/pages/iou/request/step/IOURequestStepCurrency.js @@ -1,6 +1,6 @@ import Str from 'expensify-common/lib/str'; import PropTypes from 'prop-types'; -import React, {useMemo, useRef, useState} from 'react'; +import React, {useEffect, useMemo, useRef, useState} from 'react'; import {Keyboard} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; @@ -10,7 +10,10 @@ import useLocalize from '@hooks/useLocalize'; import compose from '@libs/compose'; import * as CurrencyUtils from '@libs/CurrencyUtils'; import Navigation from '@libs/Navigation/Navigation'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES, {getUrlWithBackToParam} from '@src/ROUTES'; import IOURequestStepRoutePropTypes from './IOURequestStepRoutePropTypes'; @@ -51,15 +54,36 @@ const defaultProps = { function IOURequestStepCurrency({ currencyList, route: { - params: {backTo, iouType, pageIndex, reportID, transactionID}, + params: {backTo, iouType, pageIndex, reportID, transactionID, threadReportID, currency: paramCurrency}, }, - transaction: {currency}, + transaction: {currency: transactionCurrency}, }) { const {translate} = useLocalize(); const [searchValue, setSearchValue] = useState(''); const optionsSelectorRef = useRef(); + const currency = paramCurrency || transactionCurrency; - const navigateBack = () => { + useEffect(() => { + // Do not dismiss the modal, when it is not the edit flow. + if (!threadReportID) { + return; + } + + const report = ReportUtils.getReport(threadReportID); + const parentReportAction = ReportActionsUtils.getReportAction(report.parentReportID, report.parentReportActionID); + + // Do not dismiss the modal, when a current user can edit this currency of this money request. + if (ReportUtils.canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.CURRENCY)) { + return; + } + + // Dismiss the modal when a current user cannot edit a money request. + Navigation.isNavigationReady().then(() => { + Navigation.dismissModal(); + }); + }, [threadReportID]); + + const navigateBack = (selectedCurrency = undefined) => { // If the currency selection was done from the confirmation step (eg. + > request money > manual > confirm > amount > currency) // then the user needs taken back to the confirmation page instead of the initial amount page. This is because the route params // are only able to handle one backTo param at a time and the user needs to go back to the amount page before going back @@ -69,6 +93,12 @@ function IOURequestStepCurrency({ Navigation.goBack(routeToAmountPageWithConfirmationAsBackTo); return; } + + if (pageIndex === 'edit' && selectedCurrency) { + Navigation.navigate(`${backTo}?currency=${selectedCurrency}`); + return; + } + Navigation.goBack(backTo); }; @@ -79,7 +109,7 @@ function IOURequestStepCurrency({ const confirmCurrencySelection = (option) => { Keyboard.dismiss(); IOU.setMoneyRequestCurrency_temporaryForRefactor(transactionID, option.currencyCode); - navigateBack(); + navigateBack(option.currencyCode); }; const {sections, headerMessage, initiallyFocusedOptionKey} = useMemo(() => { diff --git a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.js b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.js index 02b0c3c38dd5..f66be992528e 100644 --- a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.js +++ b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.js @@ -106,7 +106,9 @@ function IOURequestStepTaxAmountPage({ // If the money request being created is a distance request, don't allow the user to choose the currency. // Only USD is allowed for distance requests. // Remove query from the route and encode it. - Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CURRENCY.getRoute(iouType, transactionID, reportID, backTo ? 'confirm' : '', Navigation.getActiveRouteWithoutParams())); + Navigation.navigate( + ROUTES.MONEY_REQUEST_STEP_CURRENCY.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID, backTo ? 'confirm' : '', Navigation.getActiveRouteWithoutParams()), + ); }; const updateTaxAmount = (currentAmount) => { diff --git a/src/pages/iou/steps/NewRequestAmountPage.js b/src/pages/iou/steps/NewRequestAmountPage.js index 1df74569e4c3..20d6c0e36f6d 100644 --- a/src/pages/iou/steps/NewRequestAmountPage.js +++ b/src/pages/iou/steps/NewRequestAmountPage.js @@ -35,6 +35,9 @@ const propTypes = { /** Selected currency from IOUCurrencySelection */ currency: PropTypes.string, + + /** TransactionID of the transaction this EReceipt corresponds to. It's used by withOnyx HOC */ + transactionID: PropTypes.string, }), }).isRequired, @@ -62,7 +65,8 @@ function NewRequestAmountPage({route, iou, report, selectedTab}) { const textInput = useRef(null); const iouType = lodashGet(route, 'params.iouType', ''); - const reportID = lodashGet(route, 'params.reportID', ''); + const reportID = lodashGet(route, 'params.reportID', '') || '0'; + const transactionID = lodashGet(route, 'params.transactionID', CONST.IOU.OPTIMISTIC_TRANSACTION_ID); const isEditing = Navigation.getActiveRoute().includes('amount'); const currentCurrency = lodashGet(route, 'params.currency', ''); const isDistanceRequestTab = MoneyRequestUtils.isDistanceRequest(iouType, selectedTab); @@ -117,15 +121,13 @@ function NewRequestAmountPage({route, iou, report, selectedTab}) { }; const navigateToCurrencySelectionPage = () => { - // If the money request being created is a distance request, don't allow the user to choose the currency. - // Only USD is allowed for distance requests. if (isDistanceRequestTab) { return; } // Remove query from the route and encode it. const activeRoute = encodeURIComponent(Navigation.getActiveRouteWithoutParams()); - Navigation.navigate(ROUTES.MONEY_REQUEST_CURRENCY.getRoute(iouType, reportID, currency, activeRoute)); + Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CURRENCY.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID, '0', activeRoute)); }; const navigateToNextPage = ({amount}) => {