mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-14 16:26:57 +08:00
feat: add USDT warning for Aster exchange configuration
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: tinkle-community <tinklefund@gmail.com>
This commit is contained in:
@@ -1899,6 +1899,26 @@ function ExchangeConfigModal({
|
|||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* USDT 警告提示 */}
|
||||||
|
<div
|
||||||
|
className="p-4 rounded"
|
||||||
|
style={{
|
||||||
|
background: 'rgba(246, 70, 93, 0.1)',
|
||||||
|
border: '1px solid rgba(246, 70, 93, 0.3)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="text-sm font-semibold mb-2 flex items-center gap-2"
|
||||||
|
style={{ color: '#F6465D' }}
|
||||||
|
>
|
||||||
|
<AlertTriangle className="w-4 h-4" />
|
||||||
|
{t('securityWarning', language)}
|
||||||
|
</div>
|
||||||
|
<div className="text-xs" style={{ color: '#848E9C' }}>
|
||||||
|
{t('asterUsdtWarning', language)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -203,6 +203,8 @@ export const translations = {
|
|||||||
'API wallet address - Generate from Aster API Wallet page',
|
'API wallet address - Generate from Aster API Wallet page',
|
||||||
asterPrivateKeyDesc:
|
asterPrivateKeyDesc:
|
||||||
'API wallet private key - Only used locally for signing, never transmitted',
|
'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:
|
testnetDescription:
|
||||||
'Enable to connect to exchange test environment for simulated trading',
|
'Enable to connect to exchange test environment for simulated trading',
|
||||||
securityWarning: 'Security Warning',
|
securityWarning: 'Security Warning',
|
||||||
@@ -670,6 +672,8 @@ export const translations = {
|
|||||||
'API 钱包地址 - 从 Aster API 钱包页面生成',
|
'API 钱包地址 - 从 Aster API 钱包页面生成',
|
||||||
asterPrivateKeyDesc:
|
asterPrivateKeyDesc:
|
||||||
'API 钱包私钥 - 仅在本地用于签名,不会被传输',
|
'API 钱包私钥 - 仅在本地用于签名,不会被传输',
|
||||||
|
asterUsdtWarning:
|
||||||
|
'重要提示:Aster 仅统计 USDT 余额。请确保您使用 USDT 作为保证金币种,避免其他资产(BNB、ETH等)的价格波动导致盈亏统计错误',
|
||||||
testnetDescription: '启用后将连接到交易所测试环境,用于模拟交易',
|
testnetDescription: '启用后将连接到交易所测试环境,用于模拟交易',
|
||||||
securityWarning: '安全提示',
|
securityWarning: '安全提示',
|
||||||
saveConfiguration: '保存配置',
|
saveConfiguration: '保存配置',
|
||||||
|
|||||||
Reference in New Issue
Block a user