From 980012cf3ddc36860c34ea49d12cc7612f008603 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Mon, 23 Dec 2024 15:28:44 +0700 Subject: [PATCH] fix lint --- .../MoneyRequestPreview/MoneyRequestPreviewContent.tsx | 8 ++------ src/libs/TransactionUtils/index.ts | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx index b5f49639a6df..6460820b49e6 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx +++ b/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx @@ -299,12 +299,8 @@ function MoneyRequestPreviewContent({ // Clear the draft before selecting a different expense to prevent merging fields from the previous expense // (e.g., category, tag, tax) that may be not enabled/available in the new expense's policy. Transaction.abandonReviewDuplicateTransactions(); - const comparisonResult = TransactionUtils.compareDuplicateTransactionFields( - reviewingTransactionID, - transaction?.reportID ?? '', - transaction?.transactionID ?? reviewingTransactionID, - ); - Transaction.setReviewDuplicatesKey({...comparisonResult.keep, duplicates, transactionID: transaction?.transactionID ?? '', reportID: transaction?.reportID}); + const comparisonResult = TransactionUtils.compareDuplicateTransactionFields(reviewingTransactionID, transaction?.reportID, transaction?.transactionID ?? reviewingTransactionID); + Transaction.setReviewDuplicatesKey({...comparisonResult.keep, duplicates, transactionID: transaction?.transactionID, reportID: transaction?.reportID}); if ('merchant' in comparisonResult.change) { Navigation.navigate(ROUTES.TRANSACTION_DUPLICATE_REVIEW_MERCHANT_PAGE.getRoute(route.params?.threadReportID, backTo)); diff --git a/src/libs/TransactionUtils/index.ts b/src/libs/TransactionUtils/index.ts index f7ead587c799..5787444eb917 100644 --- a/src/libs/TransactionUtils/index.ts +++ b/src/libs/TransactionUtils/index.ts @@ -1062,7 +1062,7 @@ function removeSettledAndApprovedTransactions(transactionIDs: string[]) { function compareDuplicateTransactionFields( reviewingTransactionID: string | undefined, reportID: string | undefined, - selectedTransactionID?: string, + selectedTransactionID?: string | undefined, ): {keep: Partial; change: FieldsToChange} { if (!reviewingTransactionID || !reportID) { return {change: {}, keep: {}};