From 9f2081ab645bf6f5521cf78365e51f6b1f205462 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Wed, 3 Apr 2024 18:19:33 +0100 Subject: [PATCH] Use utility method --- src/pages/home/report/ReportActionsView.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index 40097d1e1c51..ef436e57dc10 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -148,8 +148,7 @@ function ReportActionsView({ // Filter out request and send money request actions because we don't want to show any preview actions for one transaction reports const filteredReportActions = [...allReportActions, ...filteredTransactionThreadReportActions].filter((action) => { const actionType = (action as OnyxTypes.OriginalMessageIOU).originalMessage?.type ?? ''; - const isSendMoneyAction = Boolean(actionType === CONST.IOU.REPORT_ACTION_TYPE.PAY && (action as OnyxTypes.OriginalMessageIOU).originalMessage?.IOUDetails); - return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE && !isSendMoneyAction; + return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE && !ReportActionsUtils.isSentMoneyReportAction(action); }); return ReportActionsUtils.getSortedReportActions(filteredReportActions, true); }, [allReportActions, transactionThreadReportActions]);