Skip to content

Commit 3ee8d19

Browse files
committed
Nick: min browser billing
1 parent 4078faa commit 3ee8d19

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/api/src/lib/browser-billing.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ export function calculateBrowserSessionCredits(
66
creditsPerHour = BROWSER_CREDITS_PER_HOUR,
77
): number {
88
const hours = durationMs / 3_600_000;
9-
return Math.max(2, Math.ceil(hours * creditsPerHour));
9+
const minCredits = Math.ceil(creditsPerHour / 60);
10+
return Math.max(minCredits, Math.ceil(hours * creditsPerHour));
1011
}

0 commit comments

Comments
 (0)