From 563554c58fb53d6333c2319afade1aad4dcec221 Mon Sep 17 00:00:00 2001 From: Senofy <63175905+Senofy@users.noreply.github.com> Date: Mon, 9 Mar 2026 13:52:25 -0500 Subject: [PATCH] Remove hardcoded firm credentials from DB seed Plaintext usernames and passwords for Alpha and TakeProfitTrader have been removed from the startup seed block. Firms must now be added manually through the UI or API. Co-Authored-By: Claude Sonnet 4.6 --- lib/db.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/db.ts b/lib/db.ts index 335e80e..12a7d6d 100644 --- a/lib/db.ts +++ b/lib/db.ts @@ -50,26 +50,6 @@ try { // Column already exists } -// Seed default firms if empty -const firmCount = (db.prepare('SELECT COUNT(*) as count FROM firms').get() as { count: number }).count; -if (firmCount === 0) { - const insertFirm = db.prepare('INSERT INTO firms (name, username, password) VALUES (?, ?, ?)'); - const insertAccount = db.prepare( - 'INSERT INTO account_configs (firm_id, prefix, profit_target, consistency, min_day_pnl, min_trading_days, account_size) VALUES (?, ?, ?, ?, ?, ?, ?)' - ); - - const alpha = insertFirm.run('Alpha', 'brandonsenoli72786', '-Z2kPm7nBg'); - insertAccount.run(alpha.lastInsertRowid, 'AFSTDEV', 9000, 0.51, -999, 5, 150000); - insertAccount.run(alpha.lastInsertRowid, 'AFSTDQA', 4500, 0.40, -999, 7, 150000); - insertAccount.run(alpha.lastInsertRowid, 'AFZEROEV', 3000, 0.50, -999, 5, 100000); - insertAccount.run(alpha.lastInsertRowid, 'AFZEROQA', 3000, 0.50, -999, 5, 100000); - insertAccount.run(alpha.lastInsertRowid, 'AF', 3000, 0.50, -999, 5, 100000); - - const tpt = insertFirm.run('TakeProfitTrader', 'BRANDONLI1', 'W4592F5512U2817tv='); - insertAccount.run(tpt.lastInsertRowid, 'TAKEPROFIT', 9000, 0.50, -999, 5, 150000); - - console.log('[db] Seeded default firms.'); -} // ── Interfaces ─────────────────────────────────────────────────────────────