From 86cb0467967ad23d028feaaead91cd9bf9402f0f Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Thu, 18 Apr 2024 13:52:25 +0300 Subject: [PATCH 1/2] removed server logging code --- src/libs/ReportUtils.ts | 11 +---------- src/pages/home/report/ReportActionItemMessage.tsx | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 28a0f6b385bb..d1fe14271749 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -5458,7 +5458,7 @@ function getTaskAssigneeChatOnyxData( /** * Return iou report action display message */ -function getIOUReportActionDisplayMessage(reportAction: OnyxEntry, transaction?: OnyxEntry, shouldLog = false): string { +function getIOUReportActionDisplayMessage(reportAction: OnyxEntry, transaction?: OnyxEntry): string { if (reportAction?.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU) { return ''; } @@ -5488,15 +5488,6 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry, return Localize.translateLocal(translationKey, {amount: formattedAmount, payer: ''}); } - // This log to server is temporary and needed to determine if there is a case we need the transaction param - // when we call getIOUReportActionDisplayMessage from ReportActionItemMessage - if (shouldLog) { - Log.alert('Transaction Param Used when getIOUReportActionDisplayMessage was called from ReportActionItemMessage', { - reportActionID: reportAction.reportActionID, - originalMessageType: originalMessage.type, - }); - } - const transactionDetails = getTransactionDetails(!isEmptyObject(transaction) ? transaction : null); const formattedAmount = CurrencyUtils.convertToDisplayString(transactionDetails?.amount ?? 0, transactionDetails?.currency); const isRequestSettled = isSettled(originalMessage.IOUReportID); diff --git a/src/pages/home/report/ReportActionItemMessage.tsx b/src/pages/home/report/ReportActionItemMessage.tsx index b2f120f16ef4..35bf2507ba64 100644 --- a/src/pages/home/report/ReportActionItemMessage.tsx +++ b/src/pages/home/report/ReportActionItemMessage.tsx @@ -66,7 +66,7 @@ function ReportActionItemMessage({action, transaction, displayAsGroup, reportID, const originalMessage = action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? action.originalMessage : null; const iouReportID = originalMessage?.IOUReportID; if (iouReportID) { - iouMessage = ReportUtils.getIOUReportActionDisplayMessage(action, transaction, true); + iouMessage = ReportUtils.getIOUReportActionDisplayMessage(action, transaction); } } From 57aa026053ac3dd0f2e63e86197da99f3dc12b16 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Thu, 18 Apr 2024 14:00:58 +0300 Subject: [PATCH 2/2] remove unnecessary import --- src/libs/ReportUtils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index d1fe14271749..34f7614a2773 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -63,7 +63,6 @@ import isReportMessageAttachment from './isReportMessageAttachment'; import localeCompare from './LocaleCompare'; import * as LocalePhoneNumber from './LocalePhoneNumber'; import * as Localize from './Localize'; -import Log from './Log'; import {isEmailPublicDomain} from './LoginUtils'; import ModifiedExpenseMessage from './ModifiedExpenseMessage'; import linkingConfig from './Navigation/linkingConfig';