From df6f775f3c677857bb6ecde1d17a96de74fd8463 Mon Sep 17 00:00:00 2001 From: CoderMageFox Date: Wed, 5 Nov 2025 13:15:49 +0800 Subject: [PATCH] feat: add USDT warning for Aster exchange configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added warning message to inform users that Aster only tracks USDT balance, preventing P&L calculation errors from asset price fluctuations. Why this is important: - Aster trader only tracks USDT balance (aster_trader.go:453) - If users use BNB/ETH as margin, price fluctuations will cause: * Initial balance becomes inaccurate * P&L statistics will be wrong * Example: 10 BNB @ $100 = $1000, if BNB drops to $90, real equity is $900 but system still shows $1000 Changes: - Added asterUsdtWarning translation in both EN and ZH - Added red warning box below Aster private key field - Clear message: "Please use USDT as margin currency" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- web/src/components/AITradersPage.tsx | 20 ++++++++++++++++++++ web/src/i18n/translations.ts | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/web/src/components/AITradersPage.tsx b/web/src/components/AITradersPage.tsx index f3d4353e..03912051 100644 --- a/web/src/components/AITradersPage.tsx +++ b/web/src/components/AITradersPage.tsx @@ -1899,6 +1899,26 @@ function ExchangeConfigModal({ required /> + + {/* USDT 警告提示 */} +
+
+ + {t('securityWarning', language)} +
+
+ {t('asterUsdtWarning', language)} +
+
)} diff --git a/web/src/i18n/translations.ts b/web/src/i18n/translations.ts index 5322cd72..25eb75d5 100644 --- a/web/src/i18n/translations.ts +++ b/web/src/i18n/translations.ts @@ -203,6 +203,8 @@ export const translations = { 'API wallet address - Generate from Aster API Wallet page', asterPrivateKeyDesc: 'API wallet private key - Only used locally for signing, never transmitted', + asterUsdtWarning: + 'Important: Aster only tracks USDT balance. Please ensure you use USDT as margin currency to avoid P&L calculation errors caused by price fluctuations of other assets (BNB, ETH, etc.)', testnetDescription: 'Enable to connect to exchange test environment for simulated trading', securityWarning: 'Security Warning', @@ -670,6 +672,8 @@ export const translations = { 'API 钱包地址 - 从 Aster API 钱包页面生成', asterPrivateKeyDesc: 'API 钱包私钥 - 仅在本地用于签名,不会被传输', + asterUsdtWarning: + '重要提示:Aster 仅统计 USDT 余额。请确保您使用 USDT 作为保证金币种,避免其他资产(BNB、ETH等)的价格波动导致盈亏统计错误', testnetDescription: '启用后将连接到交易所测试环境,用于模拟交易', securityWarning: '安全提示', saveConfiguration: '保存配置',