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.

fix bounty name generation + remove variant from campaign broadcast

Steven Teyecfd63e96ff8
diff --git a/apps/web/app/(ee)/api/cron/campaigns/broadcast/route.ts b/apps/web/app/(ee)/api/cron/campaigns/broadcast/route.ts
index 0b8fa54ddb..9121824029 100644
--- a/apps/web/app/(ee)/api/cron/campaigns/broadcast/route.ts
+++ b/apps/web/app/(ee)/api/cron/campaigns/broadcast/route.ts
@@ -229,7 +229,6 @@ export async function POST(req: Request) {
const { data, error } = await sendBatchEmail(
partnerUsersChunk.map((partnerUser) => ({
- variant: "marketing",
from: `${program.name} <${campaign.from}>`,
to: partnerUser.email!,
subject: campaign.subject,
diff --git a/apps/web/lib/api/bounties/generate-performance-bounty-name.ts b/apps/web/lib/api/bounties/generate-performance-bounty-name.ts
index 35ddaac95a..9e011ef245 100644
--- a/apps/web/lib/api/bounties/generate-performance-bounty-name.ts
+++ b/apps/web/lib/api/bounties/generate-performance-bounty-name.ts
@@ -13,8 +13,9 @@ export const generatePerformanceBountyName = ({
const isCurrency = isCurrencyAttribute(condition.attribute);
const attributeLabel =
PERFORMANCE_BOUNTY_SCOPE_ATTRIBUTES[condition.attribute];
+ // Format the value to be in cents if it's a currency attribute
const valueFormatted = isCurrency
- ? `${currencyFormatter(condition.value, { trailingZeroDisplay: "stripIfInteger" })} in`
+ ? `${currencyFormatter(condition.value * 100, { trailingZeroDisplay: "stripIfInteger" })} in`
: `${nFormatter(condition.value, { full: true })}`;
return `Earn ${currencyFormatter(rewardAmount, { trailingZeroDisplay: "stripIfInteger" })} after generating ${valueFormatted} ${attributeLabel.toLowerCase()}`;