k 752652f463 fix(safety): force Auto-Trade OFF on paper→live promotion
Money-safety bug: subscribe() changed paper_mode on a paper→live promotion
but left auto_trade untouched. A user could flip Auto-Trade ON while in paper
mode (harmless — SystemControl only checks 'subscribed', not paper), then
promote to live and add an API key — at which point the next high-confidence
Trump signal opens a REAL position, carried over from a switch they flipped
when it cost nothing.

Now: when paper_mode transitions True→False AND auto_trade is on, force
auto_trade=False. The user must re-enable it explicitly while live (a signed,
intentional action). Risk-raising transition resets the dangerous switch —
standard financial-product safety. Frontend handleUpgradeToLive copy updated
to say Auto-Trade is turned off on the switch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 01:03:02 +08:00
2026-04-20 23:05:59 +08:00
2026-04-20 23:05:59 +08:00
2026-04-21 19:33:24 +08:00
2026-04-21 19:33:24 +08:00

  1. 填 backend .env(生产值):

POSTGRES_PASSWORD=强密码 FRONTEND_URL=https://你的前端域名 ENCRYPTION_KEY=之前生成的那个 AI_API_KEY=sk-... ENVIRONMENT=production 2. 改前端 .env.local

NEXT_PUBLIC_API_URL=https://api.你的域名.com NEXT_PUBLIC_WS_URL=wss://api.你的域名.com 启动:

cd backend docker compose up -d

S
Description
No description provided
Readme 718 KiB
Languages
Python 99.6%
Shell 0.3%
Dockerfile 0.1%