Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -5458,7 +5457,7 @@ function getTaskAssigneeChatOnyxData(
/**
* Return iou report action display message
*/
function getIOUReportActionDisplayMessage(reportAction: OnyxEntry<ReportAction>, transaction?: OnyxEntry<Transaction>, shouldLog = false): string {
function getIOUReportActionDisplayMessage(reportAction: OnyxEntry<ReportAction>, transaction?: OnyxEntry<Transaction>): string {
if (reportAction?.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU) {
return '';
}
Expand Down Expand Up @@ -5488,15 +5487,6 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry<ReportAction>,
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);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItemMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down