The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add comments
Steven Tey437acc6cbc96
diff --git a/apps/web/lib/partners/create-partner-commission.ts b/apps/web/lib/partners/create-partner-commission.tsindex 865870c977..5368ed31ca 100644--- a/apps/web/lib/partners/create-partner-commission.ts+++ b/apps/web/lib/partners/create-partner-commission.ts@@ -66,6 +66,8 @@ export const createPartnerCommission = async ({});if (firstCommission) {+ // for reward types with a max duration, we need to check if the first commission is within the max duration+ // if its beyond the max duration, we should not create a new commissionif (typeof reward.maxDuration === "number") {// One-time sale rewardif (reward.maxDuration === 0) {@@ -91,6 +93,7 @@ export const createPartnerCommission = async ({}}+ // if first commission is fraud or canceled, we should not create a new commissionif (firstCommission.status === "fraud" ||firstCommission.status === "canceled"