The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update balance-available.ts
Kiran K06036e5c66bd
diff --git a/apps/web/app/(ee)/api/stripe/connect/webhook/balance-available.ts b/apps/web/app/(ee)/api/stripe/connect/webhook/balance-available.tsindex a2b831e0ae..1942e0faa8 100644--- a/apps/web/app/(ee)/api/stripe/connect/webhook/balance-available.ts+++ b/apps/web/app/(ee)/api/stripe/connect/webhook/balance-available.ts@@ -101,8 +101,14 @@ export async function balanceAvailable(event: Stripe.Event) {}if (availableBalance <= 0) {+ const adjustedBalanceInCents =+ currency === "usd"+ ? availableBalance+ : availableBalance *+ (ZERO_DECIMAL_CURRENCIES.includes(currency.toUpperCase()) ? 1 : 100);+console.log(- `The available balance (${currencyFormatter(convertedUsdAmount / 100, { maximumFractionDigits: 2 })}) for partner ${partner.email} (${stripeAccount}) is less than or equal to 0. Skipping...`,+ `The adjusted available balance (${currencyFormatter(adjustedBalanceInCents / 100, { maximumFractionDigits: 2 })}) for partner ${partner.email} (${stripeAccount}) is less than or equal to 0 after subtracting pending payouts. Skipping...`,);return;}