We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4edf1eb commit d4bc8e1Copy full SHA for d4bc8e1
apps/dashboard/src/@/actions/stripe-actions.ts
@@ -69,6 +69,6 @@ export async function getStripeBalance(customerId: string) {
69
if (customer.deleted) {
70
return 0;
71
}
72
- // Stripe returns a positive balance for credits, so we need to multiply by -1 to get the actual balance (as long as the balance is not 0)
73
- return customer.balance === 0 ? 0 : customer.balance * -1;
+ // Stripe returns a positive balance for credits, so we need to divide by -100 to get the actual balance (as long as the balance is not 0)
+ return customer.balance === 0 ? 0 : customer.balance / -100;
74
0 commit comments