Skip to content

Commit

Permalink
Merge pull request #44357 from Expensify/aldo_fix-infinite-loading-bug
Browse files Browse the repository at this point in the history
Remove checks for IOU

(cherry picked from commit 522eab7)
  • Loading branch information
luacmartins authored and OSBotify committed Jun 25, 2024
1 parent bcfc99b commit 92dac2c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2170,10 +2170,11 @@ function getDeletedParentActionMessageForChatReport(reportAction: OnyxEntry<Repo
/**
* Returns the preview message for `REIMBURSEMENT_QUEUED` action
*/
function getReimbursementQueuedActionMessage(reportAction: OnyxEntry<ReportAction>, reportOrID: OnyxEntry<Report> | string, shouldUseShortDisplayName = true): string {
if (!ReportActionsUtils.isMoneyRequestAction(reportAction)) {
return '';
}
function getReimbursementQueuedActionMessage(
reportAction: OnyxEntry<ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_QUEUED>>,
reportOrID: OnyxEntry<Report> | string,
shouldUseShortDisplayName = true,
): string {
const report = typeof reportOrID === 'string' ? allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportOrID}`] : reportOrID;
const submitterDisplayName = getDisplayNameForParticipant(report?.ownerAccountID, shouldUseShortDisplayName) ?? '';
const originalMessage = ReportActionsUtils.getOriginalMessage(reportAction);
Expand All @@ -2195,9 +2196,6 @@ function getReimbursementDeQueuedActionMessage(
reportOrID: OnyxEntry<Report> | EmptyObject | string,
isLHNPreview = false,
): string {
if (!ReportActionsUtils.isReimbursementDeQueuedAction(reportAction)) {
return '';
}
const report = typeof reportOrID === 'string' ? allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportOrID}`] : reportOrID;
const originalMessage = ReportActionsUtils.getOriginalMessage(reportAction);
const amount = originalMessage?.amount;
Expand Down

0 comments on commit 92dac2c

Please sign in to comment.