Skip to content

Commit

Permalink
Use utility method
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Apr 3, 2024
1 parent 295b4b4 commit 9f2081a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/home/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 9f2081a

Please sign in to comment.