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.

do /100

Kiran K1e72306cbe24
diff --git a/apps/web/lib/actions/partners/create-manual-payout.ts b/apps/web/lib/actions/partners/create-manual-payout.ts
index de1ca91efa..85dc028213 100644
--- a/apps/web/lib/actions/partners/create-manual-payout.ts
+++ b/apps/web/lib/actions/partners/create-manual-payout.ts
@@ -117,8 +117,6 @@ export const createManualPayoutAction = authActionClient
throw new Error("Failed to create payout. Please try again.");
}
- console.info("Manual payout created", payout);
-
return payout;
});
diff --git a/apps/web/ui/partners/create-payout-sheet.tsx b/apps/web/ui/partners/create-payout-sheet.tsx
index f03fe68351..00368f20cf 100644
--- a/apps/web/ui/partners/create-payout-sheet.tsx
+++ b/apps/web/ui/partners/create-payout-sheet.tsx
@@ -224,11 +224,12 @@ function CreatePayoutSheetContent({ setIsOpen }: CreatePayoutSheetProps) {
if (payoutType === "custom") {
payoutAmount = amount;
} else if (isPercentageBased && salesAmount?.amount) {
- payoutAmount = calculateEarnings({
- program: program!,
- sales: quantity,
- saleAmount: salesAmount.amount,
- });
+ payoutAmount =
+ calculateEarnings({
+ program: program!,
+ sales: quantity,
+ saleAmount: salesAmount.amount,
+ }) / 100;
} else {
payoutAmount = quantity && amount ? quantity * amount : undefined;
}
@@ -287,7 +288,7 @@ function CreatePayoutSheetContent({ setIsOpen }: CreatePayoutSheetProps) {
Revenue: isValidatingSalesAmount ? (
<div className="h-4 w-12 animate-pulse rounded-md bg-neutral-200" />
) : salesAmount?.amount ? (
- currencyFormatter(salesAmount.amount, {
+ currencyFormatter(salesAmount.amount / 100, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})