From 3fb76d000e221f6613cd789d5466c94b9bf70f94 Mon Sep 17 00:00:00 2001 From: Jakub Szymczak Date: Tue, 13 Feb 2024 11:24:49 +0100 Subject: [PATCH] fix bug --- src/libs/Navigation/types.ts | 1 + src/pages/EditSplitBillPage.tsx | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index e3423b7c7d2f..5fb50eba29fc 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -335,6 +335,7 @@ type SplitDetailsNavigatorParamList = { field: string; reportID: string; reportActionID: string; + currency: string; }; [SCREENS.SPLIT_DETAILS.EDIT_CURRENCY]: undefined; }; diff --git a/src/pages/EditSplitBillPage.tsx b/src/pages/EditSplitBillPage.tsx index 566e887cd451..b4ca4763ced2 100644 --- a/src/pages/EditSplitBillPage.tsx +++ b/src/pages/EditSplitBillPage.tsx @@ -39,7 +39,7 @@ type EditSplitBillOnyxProps = { type EditSplitBillProps = EditSplitBillOnyxProps & StackScreenProps; function EditSplitBillPage({route, transaction, draftTransaction, report}: EditSplitBillProps) { - const {field: fieldToEdit, reportID, reportActionID} = route.params; + const {field: fieldToEdit, reportID, reportActionID, currency} = route.params; const { amount: transactionAmount, @@ -49,8 +49,7 @@ function EditSplitBillPage({route, transaction, draftTransaction, report}: EditS tag: transactionTag, } = ReportUtils.getTransactionDetails(draftTransaction ?? transaction) ?? {}; - const defaultCurrency = transactionCurrency; - + const defaultCurrency = currency ?? transactionCurrency; function navigateBackToSplitDetails() { Navigation.navigate(ROUTES.SPLIT_BILL_DETAILS.getRoute(reportID, reportActionID)); }