feat: crypto payment system with HD wallets, Freedom.st integration, and checkout UI

This commit is contained in:
2026-03-18 23:04:17 +04:00
parent bead49b870
commit c9130243e8
18 changed files with 943 additions and 35 deletions
+2 -1
View File
@@ -115,7 +115,7 @@ export const account = new Elysia({ prefix: "/account" })
.use(requireAuth)
.get("/settings", async ({ accountId }) => {
const [acc] = await sql`SELECT id, email_hash, plan, created_at FROM accounts WHERE id = ${accountId}`;
const [acc] = await sql`SELECT id, email_hash, plan, plan_expires_at, created_at FROM accounts WHERE id = ${accountId}`;
const keys = await sql`SELECT id, key, label, created_at, last_used_at FROM api_keys WHERE account_id = ${accountId} ORDER BY created_at DESC`;
const [{ count: monitorCount }] = await sql`SELECT COUNT(*)::int as count FROM monitors WHERE account_id = ${accountId}`;
const limits = getPlanLimits(acc.plan);
@@ -123,6 +123,7 @@ export const account = new Elysia({ prefix: "/account" })
account_id: acc.id,
has_email: !!acc.email_hash,
plan: acc.plan,
plan_expires_at: acc.plan_expires_at,
monitor_count: monitorCount,
limits,
created_at: acc.created_at,