diff --git a/app/api/auth/reset/route.ts b/app/api/auth/reset/route.ts index 7c909bf..72b7782 100644 --- a/app/api/auth/reset/route.ts +++ b/app/api/auth/reset/route.ts @@ -21,7 +21,7 @@ export async function POST(req: NextRequest) { const account = email ? await getAccountByEmail(email) : null; if (account) { const token = randomBytes(24).toString("base64url"); - const expires = new Date(Date.now() + 60 * 60 * 1000).toISOString(); // 1 hour + const expires = new Date(Date.now() + 60 * 60 * 1000).toISOString().replace('T', ' ').replace(/\.\d+Z$/, ''); await setResetToken(email, token, expires); const link = `${appBaseUrl()}/reset?token=${encodeURIComponent(token)}`; if (isEmailConfigured()) { diff --git a/lib/coinpay.ts b/lib/coinpay.ts index 94caee9..693c1e6 100644 --- a/lib/coinpay.ts +++ b/lib/coinpay.ts @@ -38,7 +38,7 @@ const SETUP_AMOUNT_RE = /^(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d{1,2})?$/; export function setupAmountUsd(value: unknown = SETUP_FEE_USD): number { if (typeof value === "number") { if (!Number.isFinite(value) || value <= 0) throw new Error("setup payment amount must be positive"); - return Math.round(value * 100) / 100; + return Math.floor(value * 100) / 100; } const text = String(value ?? "").trim().replace(/\s+/g, "");