diff --git a/src/pages/iou/request/step/IOURequestStepCurrency.js b/src/pages/iou/request/step/IOURequestStepCurrency.js index 75372657c622..e29788f4474b 100644 --- a/src/pages/iou/request/step/IOURequestStepCurrency.js +++ b/src/pages/iou/request/step/IOURequestStepCurrency.js @@ -83,7 +83,7 @@ function IOURequestStepCurrency({ }); }, [threadReportID]); - const navigateBack = () => { + 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 @@ -109,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/steps/NewRequestAmountPage.js b/src/pages/iou/steps/NewRequestAmountPage.js index e8741f844778..20d6c0e36f6d 100644 --- a/src/pages/iou/steps/NewRequestAmountPage.js +++ b/src/pages/iou/steps/NewRequestAmountPage.js @@ -65,7 +65,7 @@ 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', ''); @@ -127,7 +127,7 @@ function NewRequestAmountPage({route, iou, report, selectedTab}) { // Remove query from the route and encode it. const activeRoute = encodeURIComponent(Navigation.getActiveRouteWithoutParams()); - Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CURRENCY.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID, '', activeRoute)); + Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CURRENCY.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID, '0', activeRoute)); }; const navigateToNextPage = ({amount}) => {