Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/api/auth/reset/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/coinpay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, "");
Expand Down
Loading