Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Hide Match type column from suspicious domain fraud events (#3677)

Kiran K0d952d027906
diff --git a/.github/workflows/playwright.yaml b/.github/workflows/playwright.yaml
index 356f609b2e..fb53499af0 100644
--- a/.github/workflows/playwright.yaml
+++ b/.github/workflows/playwright.yaml
@@ -38,6 +38,9 @@ jobs:
TINYBIRD_API_KEY: "xx"
TINYBIRD_API_URL: "xx"
+ AXIOM_TOKEN: "xx"
+ AXIOM_DATASET: "xx"
+
# serverless-redis-http (SRH) — must match jobs.e2e.services.srh env
SRH_TOKEN: "e2e_srh_token"
UPSTASH_REDIS_REST_URL: "http://127.0.0.1:8079"
diff --git a/apps/web/ui/partners/fraud-risks/fraud-events-tables/fraud-matching-customer-email-table.tsx b/apps/web/ui/partners/fraud-risks/fraud-events-tables/fraud-matching-customer-email-table.tsx
index 7f29fa3716..79be3a9b3b 100644
--- a/apps/web/ui/partners/fraud-risks/fraud-events-tables/fraud-matching-customer-email-table.tsx
+++ b/apps/web/ui/partners/fraud-risks/fraud-events-tables/fraud-matching-customer-email-table.tsx
@@ -21,7 +21,11 @@ const MATCH_TYPE_LABELS: Record<CustomerEmailMatchType, string> = {
[CustomerEmailMatchType.HISTORICAL_DOMAIN_MATCH]: "Historical domain match",
};
-export function FraudMatchingCustomerEmailTable() {
+export function FraudMatchingCustomerEmailTable({
+ showMatchType,
+}: {
+ showMatchType?: boolean;
+}) {
const { slug: workspaceSlug } = useWorkspace();
const {
@@ -80,21 +84,25 @@ export function FraudMatchingCustomerEmailTable() {
);
},
},
- {
- id: "matchType",
- header: "Match type",
- minSize: 120,
- size: 180,
- cell: ({ row }) => {
- const matchType = row.original.metadata?.matchType ?? "exact";
+ ...(showMatchType
+ ? [
+ {
+ id: "matchType",
+ header: "Match type",
+ minSize: 120,
+ size: 180,
+ cell: ({ row }: { row: { original: EventDataProps } }) => {
+ const matchType = row.original.metadata?.matchType;
- return (
- <span className="text-sm text-neutral-600">
- {MATCH_TYPE_LABELS[matchType]}
- </span>
- );
- },
- },
+ return (
+ <span className="text-sm text-neutral-600">
+ {matchType ? MATCH_TYPE_LABELS[matchType] : "-"}
+ </span>
+ );
+ },
+ },
+ ]
+ : []),
{
id: "view",
header: "",
diff --git a/apps/web/ui/partners/fraud-risks/fraud-events-tables/index.tsx b/apps/web/ui/partners/fraud-risks/fraud-events-tables/index.tsx
index 7a6a73aa7c..30164aa620 100644
--- a/apps/web/ui/partners/fraud-risks/fraud-events-tables/index.tsx
+++ b/apps/web/ui/partners/fraud-risks/fraud-events-tables/index.tsx
@@ -9,8 +9,8 @@ import { FraudReferralSourceBannedTable } from "./fraud-referral-source-banned-t
const FRAUD_EVENTS_TABLES: Partial<Record<FraudRuleType, React.ComponentType>> =
{
- customerEmailMatch: FraudMatchingCustomerEmailTable,
- customerEmailSuspiciousDomain: FraudMatchingCustomerEmailTable,
+ customerEmailMatch: () => <FraudMatchingCustomerEmailTable showMatchType />,
+ customerEmailSuspiciousDomain: () => <FraudMatchingCustomerEmailTable />,
referralSourceBanned: FraudReferralSourceBannedTable,
paidTrafficDetected: FraudPaidTrafficDetectedTable,
partnerCrossProgramBan: FraudCrossProgramBanTable,