Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymczakJ committed Feb 13, 2024
1 parent e8e0385 commit 3fb76d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ type SplitDetailsNavigatorParamList = {
field: string;
reportID: string;
reportActionID: string;
currency: string;
};
[SCREENS.SPLIT_DETAILS.EDIT_CURRENCY]: undefined;
};
Expand Down
5 changes: 2 additions & 3 deletions src/pages/EditSplitBillPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type EditSplitBillOnyxProps = {
type EditSplitBillProps = EditSplitBillOnyxProps & StackScreenProps<SplitDetailsNavigatorParamList, typeof SCREENS.SPLIT_DETAILS.EDIT_REQUEST>;

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,
Expand All @@ -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));
}
Expand Down

0 comments on commit 3fb76d0

Please sign in to comment.