Skip to content

Commit

Permalink
do not show violation twice
Browse files Browse the repository at this point in the history
  • Loading branch information
gijoe0295 committed May 27, 2024
1 parent a6cca8b commit 182fb9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ function MoneyRequestView({
CONST.VIOLATIONS.SMARTSCAN_FAILED,
];
const receiptNoticeViolations =
transactionViolations?.filter((violation) => receiptNoticeNames.includes(violation.name)).map((v) => ViolationsUtils.getViolationTranslation(v, translate)) ?? [];
transactionViolations
?.filter((violation) => violation.type === CONST.VIOLATION_TYPES.NOTICE && receiptNoticeNames.includes(violation.name))
.map((v) => ViolationsUtils.getViolationTranslation(v, translate)) ?? [];
const shouldShowNotesViolations = !isReceiptBeingScanned && canUseViolations && ReportUtils.isPaidGroupPolicy(report);

return (
Expand Down

0 comments on commit 182fb9f

Please sign in to comment.