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 trace_id

Steven Tey592084a4b451
diff --git a/apps/web/app/(ee)/api/stripe/connect/webhook/payout-paid.ts b/apps/web/app/(ee)/api/stripe/connect/webhook/payout-paid.ts
index cd84a17ea2..5b08dcec9c 100644
--- a/apps/web/app/(ee)/api/stripe/connect/webhook/payout-paid.ts
+++ b/apps/web/app/(ee)/api/stripe/connect/webhook/payout-paid.ts
@@ -50,7 +50,7 @@ export async function payoutPaid(event: Stripe.Event) {
react: PartnerPayoutWithdrawalCompleted({
email: partner.email,
amount: stripePayout.amount,
- traceId: stripePayout.id,
+ traceId: stripePayout.trace_id as string | null,
}),
});
diff --git a/packages/email/src/templates/partner-payout-withdrawal-completed.tsx b/packages/email/src/templates/partner-payout-withdrawal-completed.tsx
index 7602e2129f..9189f21498 100644
--- a/packages/email/src/templates/partner-payout-withdrawal-completed.tsx
+++ b/packages/email/src/templates/partner-payout-withdrawal-completed.tsx
@@ -22,7 +22,7 @@ export default function PartnerPayoutWithdrawalCompleted({
}: {
email: string;
amount: number;
- traceId?: string;
+ traceId: string | null;
}) {
const amountInDollars = currencyFormatter(amount / 100, {
minimumFractionDigits: 2,
@@ -74,10 +74,20 @@ export default function PartnerPayoutWithdrawalCompleted({
<span className="font-semibold text-neutral-800">
{fiveBusinessDaysFromNow}
</span>{" "}
- and then contact your bank using the trace ID{" "}
- <span className="font-semibold text-neutral-800">{traceId}</span>.
+ and then contact your bank
+ {traceId
+ ? ` using the following trace ID (reference number):`
+ : "."}
</Text>
+ {traceId && (
+ <Text className="text-sm leading-6 text-neutral-600">
+ <span className="font-semibold text-neutral-800">
+ {traceId}
+ </span>
+ </Text>
+ )}
+
<Text className="text-sm leading-6 text-neutral-600">
If you still have any questions, contact{" "}
<Link