We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1e2321 commit 6c195a4Copy full SHA for 6c195a4
1 file changed
apps/web/actions/developers/update-auto-topup.ts
@@ -35,10 +35,10 @@ export async function updateDeveloperAutoTopUp(data: {
35
) {
36
throw new Error("Threshold must be non-negative");
37
}
38
- if (
39
- data.amountCents !== undefined &&
40
- (data.amountCents <= 0 || data.amountCents > 100_000)
41
- ) {
+ if (data.amountCents !== undefined && data.amountCents <= 0) {
+ throw new Error("Top-up amount must be positive");
+ }
+ if (data.amountCents !== undefined && data.amountCents > 100_000) {
42
throw new Error("Top-up amount must be between $0.01 and $1,000.00");
43
44
0 commit comments