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.

small changes

Steven Teyb6a4fd492b56
diff --git a/apps/web/lib/partners/create-partner-commission.ts b/apps/web/lib/partners/create-partner-commission.ts
index bec91708f0..fd11b1bfe5 100644
--- a/apps/web/lib/partners/create-partner-commission.ts
+++ b/apps/web/lib/partners/create-partner-commission.ts
@@ -8,7 +8,7 @@ import {
ProgramEnrollment,
WorkflowTrigger,
} from "@dub/prisma/client";
-import { currencyFormatter, log } from "@dub/utils";
+import { currencyFormatter, log, prettyPrint } from "@dub/utils";
import { waitUntil } from "@vercel/functions";
import { differenceInMonths } from "date-fns";
import { recordAuditLog } from "../api/audit-logs/record-audit-log";
@@ -266,7 +266,7 @@ export const createPartnerCommission = async ({
});
console.log(
- `Created a ${event} commission ${commission.id} (${currencyFormatter(commission.earnings, { currency: commission.currency })}) for ${partnerId}: ${JSON.stringify(commission)}`,
+ `Created a ${event} commission ${commission.id} (${currencyFormatter(commission.earnings, { currency: commission.currency })}) for ${partnerId}: ${prettyPrint(commission)}`,
);
const webhookPartner = constructWebhookPartner(programEnrollment, {
diff --git a/packages/email/src/templates/duplicate-payout-method.tsx b/packages/email/src/templates/duplicate-payout-method.tsx
index d7a4536843..5a721d84c2 100644
--- a/packages/email/src/templates/duplicate-payout-method.tsx
+++ b/packages/email/src/templates/duplicate-payout-method.tsx
@@ -52,7 +52,17 @@ export default function DuplicatePayoutMethod({
<Text className="mb-6 text-sm leading-6 text-neutral-600">
We've detected that the payout method you're trying to connect is
- already associated with another Dub Partners account.
+ already associated with another Dub partner account,{" "}
+ <strong>
+ which is against our{" "}
+ <Link
+ href="https://dub.co/legal/partners"
+ className="font-semibold text-black underline"
+ >
+ terms of service
+ </Link>
+ .
+ </strong>
</Text>
{/* Payout Method Details Card */}
@@ -106,7 +116,7 @@ export default function DuplicatePayoutMethod({
{/* What This Means Section */}
<Section className="mb-6 rounded-lg border border-solid border-blue-200 bg-blue-50 px-4 py-2">
- <Text className="mb-3 text-sm font-semibold text-blue-800">
+ <Text className="text-sm font-semibold text-blue-800">
What does this mean?
</Text>
<Text className="text-sm leading-6 text-blue-700">
@@ -117,7 +127,7 @@ export default function DuplicatePayoutMethod({
</Section>
{/* Next Steps */}
- <Section className="mb-6">
+ <Section className="mb-4">
<Text className="mb-3 text-base font-semibold text-neutral-800">
Next Steps
</Text>
@@ -128,15 +138,15 @@ export default function DuplicatePayoutMethod({
</Text>
<Text className="mb-3 text-sm leading-6 text-neutral-600">
<strong>2. Merge your partner accounts:</strong> If you have
- multiple partner accounts and need to consolidate them, you can
- easily{" "}
+ multiple partner accounts and need to consolidate them, we
+ recommend{" "}
<Link
href="https://dub.co/help/article/merging-partner-accounts"
className="font-semibold text-black underline"
>
- merge them in your Profile Settings
- </Link>
- .
+ merging them in your Profile Settings
+ </Link>{" "}
+ as soon as possible.
</Text>
</Section>
@@ -148,11 +158,6 @@ export default function DuplicatePayoutMethod({
>
Update payout method
</Link>
- {/* Additional Info */}
- <Text className="text-xs leading-5 text-neutral-500">
- If you believe this is an error or need help resolving this
- issue, simply reply to this email and we'd be happy to help.
- </Text>
</Section>
<Footer email={email} />
diff --git a/packages/prisma/schema/fraud.prisma b/packages/prisma/schema/fraud.prisma
index 45c5a28385..a604d3a110 100644
--- a/packages/prisma/schema/fraud.prisma
+++ b/packages/prisma/schema/fraud.prisma
@@ -43,9 +43,9 @@ model FraudEventGroup {
program Program @relation(fields: [programId], references: [id], onDelete: Cascade)
partner Partner @relation(fields: [partnerId], references: [id], onDelete: Cascade)
- user User? @relation(fields: [userId], references: [id])
programEnrollment ProgramEnrollment @relation(fields: [programId, partnerId], references: [programId, partnerId], onDelete: Cascade)
fraudEvents FraudEvent[]
+ user User? @relation(fields: [userId], references: [id])
@@index([programId, partnerId, type, status])
@@index(partnerId)