From f5cd07f64cf3b01bf7192c57fed9380d69c297ce Mon Sep 17 00:00:00 2001 From: Monil Bhavsar Date: Tue, 3 Dec 2024 18:55:49 +0530 Subject: [PATCH] Remove conditional code and move logic to server --- src/hooks/useViolations.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/hooks/useViolations.ts b/src/hooks/useViolations.ts index 5eb77f2d45e7..cc541eff1487 100644 --- a/src/hooks/useViolations.ts +++ b/src/hooks/useViolations.ts @@ -49,9 +49,6 @@ const violationFields: Record = { type ViolationsMap = Map; -// We don't want to show these violations on NewDot -const excludedViolationsName = ['taxAmountChanged', 'taxRateChanged']; - /** * @param violations – List of transaction violations * @param shouldShowOnlyViolations – Whether we should only show violations of type 'violation' @@ -59,9 +56,6 @@ const excludedViolationsName = ['taxAmountChanged', 'taxRateChanged']; function useViolations(violations: TransactionViolation[], shouldShowOnlyViolations: boolean) { const violationsByField = useMemo((): ViolationsMap => { const filteredViolations = violations.filter((violation) => { - if (excludedViolationsName.includes(violation.name)) { - return false; - } if (shouldShowOnlyViolations) { return violation.type === CONST.VIOLATION_TYPES.VIOLATION; }