Skip to content

Commit

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

return (
Expand Down Expand Up @@ -394,7 +392,6 @@ function MoneyRequestView({
)}
{!shouldShowReceiptEmptyState && !shouldShowMapOrReceipt && <View style={{marginVertical: 6}} />}
{shouldShowNotesViolations && <ReceiptAuditMessages notes={receiptNoticeViolations} />}
{canUseViolations && <ViolationMessages violations={getViolationsForField('receipt')} />}
<OfflineWithFeedback pendingAction={getPendingFieldAction('amount')}>
<MenuItemWithTopDescription
title={amountTitle}
Expand Down

0 comments on commit 9c42539

Please sign in to comment.