diff --git a/backend/src/main/kotlin/com/wrbug/polymarketbot/controller/cryptotail/CryptoTailStrategyController.kt b/backend/src/main/kotlin/com/wrbug/polymarketbot/controller/cryptotail/CryptoTailStrategyController.kt index 87ea5b5..4bfc122 100644 --- a/backend/src/main/kotlin/com/wrbug/polymarketbot/controller/cryptotail/CryptoTailStrategyController.kt +++ b/backend/src/main/kotlin/com/wrbug/polymarketbot/controller/cryptotail/CryptoTailStrategyController.kt @@ -267,7 +267,7 @@ class CryptoTailStrategyController( "当前周期已下单" -> ErrorCode.PARAM_ERROR "价格必须在 0~1 之间" -> ErrorCode.PARAM_ERROR "数量不能少于 1" -> ErrorCode.PARAM_ERROR - "总金额不能少于 1 USDC" -> ErrorCode.PARAM_ERROR + "总金额不能少于 $1" -> ErrorCode.PARAM_ERROR "总金额超过策略配置的投入金额" -> ErrorCode.PARAM_ERROR else -> ErrorCode.SERVER_ERROR } diff --git a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/cryptotail/CryptoTailStrategyExecutionService.kt b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/cryptotail/CryptoTailStrategyExecutionService.kt index 07a6c4d..09414de 100644 --- a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/cryptotail/CryptoTailStrategyExecutionService.kt +++ b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/cryptotail/CryptoTailStrategyExecutionService.kt @@ -702,7 +702,7 @@ class CryptoTailStrategyExecutionService( val amountUsdc = priceRounded.multi(size).setScale(2, RoundingMode.HALF_UP) if (amountUsdc < BigDecimal.ONE) { - return Result.failure(IllegalArgumentException("总金额不能少于 1 USDC")) + return Result.failure(IllegalArgumentException("总金额不能少于 \$1")) } val mutex = getTriggerMutex(strategy.id!!, request.periodStartUnix) diff --git a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/NotificationTemplateService.kt b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/NotificationTemplateService.kt index 28f95f1..6c43b0c 100644 --- a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/NotificationTemplateService.kt +++ b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/NotificationTemplateService.kt @@ -169,9 +169,9 @@ class NotificationTemplateService( • 方向: {{side}} • 价格: {{price}} • 数量: {{quantity}} shares -• 金额: {{amount}} USDC +• 金额: ${'$'}{{amount}} • 账户: {{account_name}} -• 可用余额: {{available_balance}} USDC +• 可用余额: ${'$'}{{available_balance}} ⏰ 时间: {{time}} """.trimIndent(), @@ -184,7 +184,7 @@ class NotificationTemplateService( • 方向: {{side}} • 价格: {{price}} • 数量: {{quantity}} shares -• 金额: {{amount}} USDC +• 金额: ${'$'}{{amount}} • 账户: {{account_name}} ⚠️ 错误信息: @@ -201,7 +201,7 @@ class NotificationTemplateService( • 方向: {{side}} • 价格: {{price}} • 数量: {{quantity}} shares -• 金额: {{amount}} USDC +• 金额: ${'$'}{{amount}} • 账户: {{account_name}} ⚠️ 过滤类型: {{filter_type}} @@ -222,7 +222,7 @@ class NotificationTemplateService( • 方向: {{side}} • 价格: {{price}} • 数量: {{quantity}} shares -• 金额: {{amount}} USDC +• 金额: ${'$'}{{amount}} • 账户: {{account_name}} ⏰ 时间: {{time}} @@ -233,8 +233,8 @@ class NotificationTemplateService( 📊 赎回信息: • 账户: {{account_name}} • 交易哈希: {{transaction_hash}} -• 赎回总价值: {{total_value}} USDC -• 可用余额: {{available_balance}} USDC +• 赎回总价值: ${'$'}{{total_value}} +• 可用余额: ${'$'}{{available_balance}} ⏰ 时间: {{time}} """.trimIndent(), @@ -246,7 +246,7 @@ class NotificationTemplateService( • 账户: {{account_name}} • 交易哈希: {{transaction_hash}} -• 可用余额: {{available_balance}} USDC +• 可用余额: ${'$'}{{available_balance}} ⏰ 时间: {{time}} """.trimIndent() diff --git a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/TelegramNotificationService.kt b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/TelegramNotificationService.kt index c473a88..64bd282 100644 --- a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/TelegramNotificationService.kt +++ b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/system/TelegramNotificationService.kt @@ -691,7 +691,7 @@ class TelegramNotificationService( • $sideLabel: $sideDisplay • $priceLabel: $priceDisplay • $quantityLabel: $sizeDisplay shares -• $amountLabel: $amountDisplay USDC +• $amountLabel: ${'$'}$amountDisplay • $accountLabel: $escapedAccountInfo ⚠️ $filterTypeLabel: $filterTypeDisplay @@ -1169,9 +1169,9 @@ class TelegramNotificationService( } else { balanceDecimal.stripTrailingZeros() } - "\n• $availableBalanceLabel: ${formatted.toPlainString()} USDC" + "\n• $availableBalanceLabel: ${'$'}${formatted.toPlainString()}" } catch (e: Exception) { - "\n• $availableBalanceLabel: $availableBalance USDC" + "\n• $availableBalanceLabel: ${'$'}$availableBalance" } } else { "" @@ -1185,7 +1185,7 @@ class TelegramNotificationService( • $sideLabel: $sideDisplay • $priceLabel: $priceDisplay • $quantityLabel: $sizeDisplay shares -• $amountLabel: $amountDisplay USDC +• $amountLabel: ${'$'}$amountDisplay • $accountLabel: $escapedAccountInfo$escapedCopyTradingInfo$availableBalanceDisplay ⏰ $timeLabel: $time""" @@ -1264,7 +1264,7 @@ class TelegramNotificationService( • $sideLabel: $sideDisplay • $priceLabel: $priceDisplay • $quantityLabel: $sizeDisplay shares -• $amountLabel: $amountDisplay USDC +• $amountLabel: ${'$'}$amountDisplay • $accountLabel: $escapedAccountInfo ⏰ $timeLabel: $time""" @@ -1381,7 +1381,7 @@ class TelegramNotificationService( • $sideLabel: $sideDisplay • $priceLabel: $priceDisplay • $quantityLabel: $sizeDisplay shares -• $amountLabel: $amountDisplay USDC +• $amountLabel: ${'$'}$amountDisplay • $accountLabel: $escapedAccountInfo ⚠️ $errorInfo: @@ -1515,7 +1515,7 @@ class TelegramNotificationService( } catch (e: Exception) { position.value } - " • ${position.marketId.substring(0, 8)}... (${position.side}): $quantityDisplay shares = $valueDisplay USDC" + " • ${position.marketId.substring(0, 8)}... (${position.side}): $quantityDisplay shares = ${'$'}$valueDisplay" } // 格式化可用余额 @@ -1527,9 +1527,9 @@ class TelegramNotificationService( } else { balanceDecimal.stripTrailingZeros() } - "\n• $availableBalanceLabel: ${formatted.toPlainString()} USDC" + "\n• $availableBalanceLabel: ${'$'}${formatted.toPlainString()}" } catch (e: Exception) { - "\n• $availableBalanceLabel: $availableBalance USDC" + "\n• $availableBalanceLabel: ${'$'}$availableBalance" } } else { "" @@ -1540,7 +1540,7 @@ class TelegramNotificationService( 📊 $redeemInfo: • $accountLabel: $escapedAccountInfo • $transactionHashLabel: $escapedTxHash -• $totalValueLabel: $totalValueDisplay USDC$availableBalanceDisplay +• $totalValueLabel: ${'$'}$totalValueDisplay$availableBalanceDisplay 📦 $positionsLabel: $positionsText @@ -1642,9 +1642,9 @@ $positionsText } else { balanceDecimal.stripTrailingZeros() } - "\n• $availableBalanceLabel: ${formatted.toPlainString()} USDC" + "\n• $availableBalanceLabel: ${'$'}${formatted.toPlainString()}" } catch (e: Exception) { - "\n• $availableBalanceLabel: $availableBalance USDC" + "\n• $availableBalanceLabel: ${'$'}$availableBalance" } } else { "" diff --git a/frontend/src/components/AccountImportForm.tsx b/frontend/src/components/AccountImportForm.tsx index 265283a..464f8ad 100644 --- a/frontend/src/components/AccountImportForm.tsx +++ b/frontend/src/components/AccountImportForm.tsx @@ -525,7 +525,7 @@ const AccountImportForm: React.FC = ({ {!option.error && ( - {formatUSDC(option.totalBalance)} USDC + ${formatUSDC(option.totalBalance)} )} diff --git a/frontend/src/components/AccountSetupStatusBlock.tsx b/frontend/src/components/AccountSetupStatusBlock.tsx index 49b92dd..67f1315 100644 --- a/frontend/src/components/AccountSetupStatusBlock.tsx +++ b/frontend/src/components/AccountSetupStatusBlock.tsx @@ -247,7 +247,7 @@ const AccountSetupStatusBlock: React.FC = ({ const displayText = isUnlimited ? t('accountSetup.approvalDetails.unlimited') : isApproved - ? `${parseFloat(allowance).toFixed(2)} USDC` + ? `$${parseFloat(allowance).toFixed(2)}` : t('accountSetup.approvalDetails.notApproved') return (
{ ) : balance ? ( - {formatUSDC(balance)} USDC + ${formatUSDC(balance)} ) : ( - @@ -274,7 +274,7 @@ const AccountDetail: React.FC = () => { fontWeight: 'bold', color: account.totalPnl.startsWith('-') ? '#ff4d4f' : '#52c41a' }}> - {formatUSDC(account.totalPnl)} USDC + ${formatUSDC(account.totalPnl)} )} diff --git a/frontend/src/pages/BacktestChart.tsx b/frontend/src/pages/BacktestChart.tsx index 7d53a48..e7c493a 100644 --- a/frontend/src/pages/BacktestChart.tsx +++ b/frontend/src/pages/BacktestChart.tsx @@ -75,9 +75,9 @@ const BacktestChart: React.FC = ({ trades }) => { return `
${t('backtest.tradeTime')}: ${param.name}
-
${t('backtest.balanceAfter')}: ${value} USDC
+
${t('backtest.balanceAfter')}: $${value}
- ${t('backtest.profitLoss')}: ${diff} USDC (${diffPercent}%) + ${t('backtest.profitLoss')}: $${diff} (${diffPercent}%)
` @@ -121,7 +121,7 @@ const BacktestChart: React.FC = ({ trades }) => { }, yAxis: { type: 'value', - name: 'USDC', + name: '$', nameLocation: 'end', nameGap: 10, axisLabel: { diff --git a/frontend/src/pages/BacktestDetail.tsx b/frontend/src/pages/BacktestDetail.tsx index 572aebf..8584999 100644 --- a/frontend/src/pages/BacktestDetail.tsx +++ b/frontend/src/pages/BacktestDetail.tsx @@ -279,14 +279,14 @@ const BacktestDetail: React.FC = () => { render: (value: string) => parseFloat(value).toFixed(4) }, { - title: t('backtest.amount') + ' (USDC)', + title: t('backtest.amount') + ' ($)', dataIndex: 'amount', key: 'amount', width: 120, render: (value: string) => formatUSDC(value) }, { - title: t('backtest.balanceAfter') + ' (USDC)', + title: t('backtest.balanceAfter') + ' ($)', dataIndex: 'balanceAfter', key: 'balanceAfter', width: 120, @@ -346,14 +346,14 @@ const BacktestDetail: React.FC = () => { {task.leaderName || task.leaderAddress} - {formatUSDC(task.initialBalance)} USDC + ${formatUSDC(task.initialBalance)} - {task.finalBalance ? formatUSDC(task.finalBalance) + ' USDC' : '-'} + {task.finalBalance ? '$' + formatUSDC(task.finalBalance) : '-'} = 0 ? '#52c41a' : '#ff4d4f' }}> - {task.profitAmount ? formatUSDC(task.profitAmount) + ' USDC' : '-'} + {task.profitAmount ? '$' + formatUSDC(task.profitAmount) : '-'} diff --git a/frontend/src/pages/BacktestList.tsx b/frontend/src/pages/BacktestList.tsx index 4dbb142..6af99c4 100644 --- a/frontend/src/pages/BacktestList.tsx +++ b/frontend/src/pages/BacktestList.tsx @@ -461,14 +461,14 @@ const BacktestList: React.FC = () => { render: (value: string) => parseFloat(value).toFixed(4) }, { - title: t('backtest.amount') + ' (USDC)', + title: t('backtest.amount') + ' ($)', dataIndex: 'amount', key: 'amount', width: 120, render: (value: string) => formatUSDC(value) }, { - title: t('backtest.balanceAfter') + ' (USDC)', + title: t('backtest.balanceAfter') + ' ($)', dataIndex: 'balanceAfter', key: 'balanceAfter', width: 120, @@ -815,7 +815,7 @@ const BacktestList: React.FC = () => {
{t('backtest.profitAmount')}
{task.profitAmount != null ? ( -
= 0 ? '#52c41a' : '#ff4d4f' }}>{formatUSDC(task.profitAmount)} USDC
+
= 0 ? '#52c41a' : '#ff4d4f' }}>${formatUSDC(task.profitAmount)}
) : (
-
)} @@ -997,7 +997,7 @@ const BacktestList: React.FC = () => { { {copyMode === 'FIXED' && ( { @@ -1110,7 +1110,7 @@ const BacktestList: React.FC = () => { @@ -1122,7 +1122,7 @@ const BacktestList: React.FC = () => { @@ -1141,7 +1141,7 @@ const BacktestList: React.FC = () => { { {detailTask.leaderName || `Leader ${detailTask.leaderId}`} - {formatUSDC(detailTask.initialBalance)} USDC + ${formatUSDC(detailTask.initialBalance)} - {detailTask.finalBalance ? formatUSDC(detailTask.finalBalance) + ' USDC' : '-'} + {detailTask.finalBalance ? '$' + formatUSDC(detailTask.finalBalance) : '-'} = 0 ? '#52c41a' : '#ff4d4f' }}> - {detailTask.profitAmount ? formatUSDC(detailTask.profitAmount) + ' USDC' : '-'} + {detailTask.profitAmount ? '$' + formatUSDC(detailTask.profitAmount) : '-'} @@ -1439,17 +1439,17 @@ const BacktestList: React.FC = () => { {detailConfig.copyMode === 'RATIO' ? `${t('backtest.copyModeRatio')} ${parseFloat(detailConfig.copyRatio) * 100}%` - : `${t('backtest.copyModeFixed')} ${formatUSDC(detailConfig.fixedAmount)} USDC` + : `${t('backtest.copyModeFixed')} $${formatUSDC(detailConfig.fixedAmount)}` } - {formatUSDC(detailConfig.maxOrderSize)} USDC + {'$' + formatUSDC(detailConfig.maxOrderSize)} - {formatUSDC(detailConfig.minOrderSize)} USDC + {'$' + formatUSDC(detailConfig.minOrderSize)} - {formatUSDC(detailConfig.maxDailyLoss)} USDC + {'$' + formatUSDC(detailConfig.maxDailyLoss)} {detailConfig.maxDailyOrders} @@ -1471,7 +1471,7 @@ const BacktestList: React.FC = () => { )} {detailConfig.maxPositionValue && ( - {formatUSDC(detailConfig.maxPositionValue)} USDC + {'$' + formatUSDC(detailConfig.maxPositionValue)} )} {(detailConfig.minPrice || detailConfig.maxPrice) && ( diff --git a/frontend/src/pages/CopyTradingBuyOrders.tsx b/frontend/src/pages/CopyTradingBuyOrders.tsx index fb51a83..c162d97 100644 --- a/frontend/src/pages/CopyTradingBuyOrders.tsx +++ b/frontend/src/pages/CopyTradingBuyOrders.tsx @@ -150,7 +150,7 @@ const CopyTradingBuyOrdersPage: React.FC = () => { const amount = (parseFloat(record.quantity) * parseFloat(record.price)).toString() return ( - {isMobile ? formatUSDC(amount) : `${formatUSDC(amount)} USDC`} + {isMobile ? formatUSDC(amount) : `$${formatUSDC(amount)}`} ) } @@ -305,7 +305,7 @@ const CopyTradingBuyOrdersPage: React.FC = () => { 数量: {formatUSDC(order.quantity)} | 价格: {formatUSDC(order.price)}
- 金额: {formatUSDC(amount)} USDC + 金额: ${formatUSDC(amount)}
diff --git a/frontend/src/pages/CopyTradingList.tsx b/frontend/src/pages/CopyTradingList.tsx index 5e204f8..e8a041d 100644 --- a/frontend/src/pages/CopyTradingList.tsx +++ b/frontend/src/pages/CopyTradingList.tsx @@ -279,7 +279,7 @@ const CopyTradingList: React.FC = () => { fontSize: isMobile ? 12 : 14 }}> {getPnlIcon(stats.totalPnl)} - {isMobile ? formatUSDC(stats.totalPnl) : `${formatUSDC(stats.totalPnl)} USDC`} + {isMobile ? formatUSDC(stats.totalPnl) : `$${formatUSDC(stats.totalPnl)}`} {!isMobile && (
{
{record.copyMode === 'RATIO' ? `${t('copyTradingList.ratioMode') || '比例'} ${(parseFloat(record.copyRatio || '0') * 100).toFixed(0).replace(/\.0+$/, '')}%` - : `${t('copyTradingList.fixedAmountMode') || '固定'} ${formatUSDC(record.fixedAmount || '0')} USDC` + : `${t('copyTradingList.fixedAmountMode') || '固定'} $${formatUSDC(record.fixedAmount || '0')}` }
@@ -549,7 +549,7 @@ const CopyTradingList: React.FC = () => { gap: '4px' }}> {getPnlIcon(stats.totalPnl)} - {formatUSDC(stats.totalPnl)} USDC + ${formatUSDC(stats.totalPnl)} ) : loadingStatistics.has(record.id) ? ( diff --git a/frontend/src/pages/CopyTradingMatchedOrders.tsx b/frontend/src/pages/CopyTradingMatchedOrders.tsx index 77c27ce..812aed1 100644 --- a/frontend/src/pages/CopyTradingMatchedOrders.tsx +++ b/frontend/src/pages/CopyTradingMatchedOrders.tsx @@ -130,7 +130,7 @@ const CopyTradingMatchedOrdersPage: React.FC = () => { fontWeight: 500, fontSize: isMobile ? 12 : 14 }}> - {isMobile ? formatUSDC(value) : `${formatUSDC(value)} USDC`} + {isMobile ? formatUSDC(value) : `$${formatUSDC(value)}`} ) }, @@ -262,7 +262,7 @@ const CopyTradingMatchedOrdersPage: React.FC = () => { fontWeight: 'bold', color: getPnlColor(order.realizedPnl) }}> - {formatUSDC(order.realizedPnl)} USDC + ${formatUSDC(order.realizedPnl)} diff --git a/frontend/src/pages/CopyTradingOrders/AddModal.tsx b/frontend/src/pages/CopyTradingOrders/AddModal.tsx index 78b3b89..11c8ba2 100644 --- a/frontend/src/pages/CopyTradingOrders/AddModal.tsx +++ b/frontend/src/pages/CopyTradingOrders/AddModal.tsx @@ -518,7 +518,7 @@ const AddModal: React.FC = ({ value={parseFloat(leaderAssetInfo.total)} precision={4} valueStyle={{ color: '#52c41a', fontWeight: 'bold', fontSize: '16px' }} - suffix="USDC" + prefix="$" formatter={(value) => formatUSDC(value?.toString() || '0')} /> @@ -528,7 +528,7 @@ const AddModal: React.FC = ({ value={parseFloat(leaderAssetInfo.available)} precision={4} valueStyle={{ color: '#1890ff', fontSize: '14px' }} - suffix="USDC" + prefix="$" formatter={(value) => formatUSDC(value?.toString() || '0')} /> @@ -538,7 +538,7 @@ const AddModal: React.FC = ({ value={parseFloat(leaderAssetInfo.position)} precision={4} valueStyle={{ color: '#722ed1', fontSize: '14px' }} - suffix="USDC" + prefix="$" formatter={(value) => formatUSDC(value?.toString() || '0')} /> @@ -606,7 +606,7 @@ const AddModal: React.FC = ({ {copyMode === 'FIXED' && ( = ({ {copyMode === 'RATIO' && ( <> @@ -665,7 +665,7 @@ const AddModal: React.FC = ({ = 1'} rules={[ @@ -700,7 +700,7 @@ const AddModal: React.FC = ({ )} @@ -709,7 +709,7 @@ const AddModal: React.FC = ({ step={0.0001} precision={4} style={{ width: '100%' }} - placeholder={t('copyTradingAdd.maxDailyLossPlaceholder') || '默认 10000 USDC(可选)'} + placeholder={t('copyTradingAdd.maxDailyLossPlaceholder') || '默认 10000 $(可选)'} formatter={(value) => { if (!value && value !== 0) return '' const num = parseFloat(value.toString()) @@ -767,7 +767,7 @@ const AddModal: React.FC = ({ @@ -853,7 +853,7 @@ const AddModal: React.FC = ({ {t('copyTradingAdd.positionLimitFilter') || '最大仓位限制'} @@ -1082,7 +1082,7 @@ const AddModal: React.FC = ({ {record.copyMode === 'RATIO' ? `${t('copyTradingAdd.ratioMode') || '比例'} ${record.copyRatio}x` - : `${t('copyTradingAdd.fixedAmountMode') || '固定'} ${formatUSDC(record.fixedAmount || '0')} USDC` + : `${t('copyTradingAdd.fixedAmountMode') || '固定'} $${formatUSDC(record.fixedAmount || '0')}` } ) diff --git a/frontend/src/pages/CopyTradingOrders/BuyOrdersTab.tsx b/frontend/src/pages/CopyTradingOrders/BuyOrdersTab.tsx index a171506..ffbf626 100644 --- a/frontend/src/pages/CopyTradingOrders/BuyOrdersTab.tsx +++ b/frontend/src/pages/CopyTradingOrders/BuyOrdersTab.tsx @@ -261,7 +261,7 @@ const BuyOrdersTab: React.FC = ({ copyTradingId, active = fal const amount = (parseFloat(record.quantity) * parseFloat(record.price)).toString() return ( - {isMobile ? formatUSDC(amount) : `${formatUSDC(amount)} USDC`} + {isMobile ? formatUSDC(amount) : `$${formatUSDC(amount)}`} ) } @@ -384,7 +384,7 @@ const BuyOrdersTab: React.FC = ({ copyTradingId, active = fal
{t('copyTradingOrders.orderCount') || '订单数'}: {group.stats.count} - {t('copyTradingOrders.totalAmount') || '总金额'}: {formatUSDC(group.stats.totalAmount)} USDC + {t('copyTradingOrders.totalAmount') || '总金额'}: ${formatUSDC(group.stats.totalAmount)} {t('copyTradingOrders.statusBreakdown') || '状态'}: {group.stats.fullyMatchedCount > 0 && ` ${t('copyTradingOrders.allFullySold') || '全部卖出'} ${group.stats.fullyMatchedCount}`} @@ -460,7 +460,7 @@ const BuyOrdersTab: React.FC = ({ copyTradingId, active = fal
{t('copyTradingOrders.quantity') || '数量'}: {formatUSDC(order.quantity)} | {t('copyTradingOrders.price') || '价格'}: {formatUSDC(order.price)}
-
{t('copyTradingOrders.amount') || '金额'}: {formatUSDC(amount)} USDC
+
{t('copyTradingOrders.amount') || '金额'}: ${formatUSDC(amount)}
{t('copyTradingOrders.matched') || '已匹配'}: {formatUSDC(order.matchedQuantity)} | {t('copyTradingOrders.remaining') || '剩余'}: {formatUSDC(order.remainingQuantity)}
{formattedDate}
@@ -557,7 +557,7 @@ const BuyOrdersTab: React.FC = ({ copyTradingId, active = fal {t('copyTradingOrders.quantity') || '数量'}: {formatUSDC(order.quantity)} | {t('copyTradingOrders.price') || '价格'}: {formatUSDC(order.price)}
- {t('copyTradingOrders.amount') || '金额'}: {formatUSDC(amount)} USDC + {t('copyTradingOrders.amount') || '金额'}: ${formatUSDC(amount)}
diff --git a/frontend/src/pages/CopyTradingOrders/EditModal.tsx b/frontend/src/pages/CopyTradingOrders/EditModal.tsx index c94f021..ea66a39 100644 --- a/frontend/src/pages/CopyTradingOrders/EditModal.tsx +++ b/frontend/src/pages/CopyTradingOrders/EditModal.tsx @@ -356,7 +356,7 @@ const EditModal: React.FC = ({ value={parseFloat(leaderAssetInfo.total)} precision={4} valueStyle={{ color: '#52c41a', fontWeight: 'bold', fontSize: '16px' }} - suffix="USDC" + prefix="$" formatter={(value) => formatUSDC(value?.toString() || '0')} /> @@ -366,7 +366,7 @@ const EditModal: React.FC = ({ value={parseFloat(leaderAssetInfo.available)} precision={4} valueStyle={{ color: '#1890ff', fontSize: '14px' }} - suffix="USDC" + prefix="$" formatter={(value) => formatUSDC(value?.toString() || '0')} /> @@ -376,7 +376,7 @@ const EditModal: React.FC = ({ value={parseFloat(leaderAssetInfo.position)} precision={4} valueStyle={{ color: '#722ed1', fontSize: '14px' }} - suffix="USDC" + prefix="$" formatter={(value) => formatUSDC(value?.toString() || '0')} /> @@ -456,7 +456,7 @@ const EditModal: React.FC = ({ {copyMode === 'FIXED' && ( = ({ {copyMode === 'RATIO' && ( <> @@ -515,7 +515,7 @@ const EditModal: React.FC = ({ = 1'} rules={[ @@ -550,7 +550,7 @@ const EditModal: React.FC = ({ )} @@ -559,7 +559,7 @@ const EditModal: React.FC = ({ step={0.0001} precision={4} style={{ width: '100%' }} - placeholder={t('copyTradingEdit.maxDailyLossPlaceholder') || '默认 10000 USDC(可选)'} + placeholder={t('copyTradingEdit.maxDailyLossPlaceholder') || '默认 10000 $(可选)'} formatter={(value) => { if (!value && value !== 0) return '' const num = parseFloat(value.toString()) @@ -617,7 +617,7 @@ const EditModal: React.FC = ({ @@ -703,7 +703,7 @@ const EditModal: React.FC = ({ {t('copyTradingEdit.positionLimitFilter') || '最大仓位限制'} diff --git a/frontend/src/pages/CopyTradingOrders/MatchedOrdersTab.tsx b/frontend/src/pages/CopyTradingOrders/MatchedOrdersTab.tsx index 787f9d1..b55259b 100644 --- a/frontend/src/pages/CopyTradingOrders/MatchedOrdersTab.tsx +++ b/frontend/src/pages/CopyTradingOrders/MatchedOrdersTab.tsx @@ -228,7 +228,7 @@ const MatchedOrdersTab: React.FC = ({ copyTradingId, acti fontWeight: 500, fontSize: isMobile ? 12 : 14 }}> - {isMobile ? formatUSDC(value) : `${formatUSDC(value)} USDC`} + {isMobile ? formatUSDC(value) : `$${formatUSDC(value)}`} ) }, @@ -408,7 +408,7 @@ const MatchedOrdersTab: React.FC = ({ copyTradingId, acti fontWeight: 'bold', color: getPnlColor(order.realizedPnl) }}> - {formatUSDC(order.realizedPnl)} USDC + ${formatUSDC(order.realizedPnl)} diff --git a/frontend/src/pages/CopyTradingOrders/SellOrdersTab.tsx b/frontend/src/pages/CopyTradingOrders/SellOrdersTab.tsx index 4645a8b..d507dd8 100644 --- a/frontend/src/pages/CopyTradingOrders/SellOrdersTab.tsx +++ b/frontend/src/pages/CopyTradingOrders/SellOrdersTab.tsx @@ -258,7 +258,7 @@ const SellOrdersTab: React.FC = ({ copyTradingId, active = f const amount = (parseFloat(record.quantity) * parseFloat(record.price)).toString() return ( - {isMobile ? formatUSDC(amount) : `${formatUSDC(amount)} USDC`} + {isMobile ? formatUSDC(amount) : `$${formatUSDC(amount)}`} ) } @@ -274,7 +274,7 @@ const SellOrdersTab: React.FC = ({ copyTradingId, active = f fontWeight: 500, fontSize: isMobile ? 12 : 14 }}> - {isMobile ? formatUSDC(value) : `${formatUSDC(value)} USDC`} + {isMobile ? formatUSDC(value) : `$${formatUSDC(value)}`} ) }, @@ -362,10 +362,10 @@ const SellOrdersTab: React.FC = ({ copyTradingId, active = f
{t('copyTradingOrders.orderCount') || '订单数'}: {group.stats.count} - {t('copyTradingOrders.totalAmount') || '总金额'}: {formatUSDC(group.stats.totalAmount)} USDC + {t('copyTradingOrders.totalAmount') || '总金额'}: ${formatUSDC(group.stats.totalAmount)} {group.stats.totalPnl && ( - {t('copyTradingOrders.totalPnl') || '总盈亏'}: {formatUSDC(group.stats.totalPnl)} USDC + {t('copyTradingOrders.totalPnl') || '总盈亏'}: ${formatUSDC(group.stats.totalPnl)} )}
@@ -434,9 +434,9 @@ const SellOrdersTab: React.FC = ({ copyTradingId, active = f
{t('copyTradingOrders.quantity') || '数量'}: {formatUSDC(order.quantity)} | {t('copyTradingOrders.price') || '价格'}: {formatUSDC(order.price)}
-
{t('copyTradingOrders.amount') || '金额'}: {formatUSDC(amount)} USDC
+
{t('copyTradingOrders.amount') || '金额'}: ${formatUSDC(amount)}
- {t('copyTradingOrders.realizedPnl') || '已实现盈亏'}: {formatUSDC(order.realizedPnl)} USDC + {t('copyTradingOrders.realizedPnl') || '已实现盈亏'}: ${formatUSDC(order.realizedPnl)}
{formattedDate}
@@ -530,7 +530,7 @@ const SellOrdersTab: React.FC = ({ copyTradingId, active = f {t('copyTradingOrders.quantity') || '数量'}: {formatUSDC(order.quantity)} | {t('copyTradingOrders.price') || '价格'}: {formatUSDC(order.price)}
- {t('copyTradingOrders.amount') || '金额'}: {formatUSDC(amount)} USDC + {t('copyTradingOrders.amount') || '金额'}: ${formatUSDC(amount)}
@@ -541,7 +541,7 @@ const SellOrdersTab: React.FC = ({ copyTradingId, active = f fontWeight: 'bold', color: getPnlColor(order.realizedPnl) }}> - {formatUSDC(order.realizedPnl)} USDC + ${formatUSDC(order.realizedPnl)} diff --git a/frontend/src/pages/CopyTradingOrders/StatisticsModal.tsx b/frontend/src/pages/CopyTradingOrders/StatisticsModal.tsx index cf838f3..ed4ac2a 100644 --- a/frontend/src/pages/CopyTradingOrders/StatisticsModal.tsx +++ b/frontend/src/pages/CopyTradingOrders/StatisticsModal.tsx @@ -104,7 +104,7 @@ const StatisticsModal: React.FC = ({
- {formatUSDC(statistics.totalBuyAmount)} USDC + ${formatUSDC(statistics.totalBuyAmount)}
@@ -113,7 +113,7 @@ const StatisticsModal: React.FC = ({
- {formatUSDC(statistics.totalSellAmount)} USDC + ${formatUSDC(statistics.totalSellAmount)}
@@ -122,7 +122,7 @@ const StatisticsModal: React.FC = ({
{getPnlIcon(statistics.totalPnl)} - {formatUSDC(statistics.totalPnl)} USDC + ${formatUSDC(statistics.totalPnl)}
@@ -131,7 +131,7 @@ const StatisticsModal: React.FC = ({
{getPnlIcon(statistics.totalRealizedPnl)} - {formatUSDC(statistics.totalRealizedPnl)} USDC + ${formatUSDC(statistics.totalRealizedPnl)}
@@ -140,7 +140,7 @@ const StatisticsModal: React.FC = ({
{getPnlIcon(statistics.totalUnrealizedPnl)} - {formatUSDC(statistics.totalUnrealizedPnl)} USDC + ${formatUSDC(statistics.totalUnrealizedPnl)}
@@ -165,43 +165,38 @@ const StatisticsModal: React.FC = ({ } + prefix={<> $} /> } + prefix={<> $} /> {getPnlIcon(statistics.totalPnl)} $} /> {getPnlIcon(statistics.totalRealizedPnl)} $} /> {getPnlIcon(statistics.totalUnrealizedPnl)} $} /> diff --git a/frontend/src/pages/CopyTradingSellOrders.tsx b/frontend/src/pages/CopyTradingSellOrders.tsx index fbe8f76..35e8a4d 100644 --- a/frontend/src/pages/CopyTradingSellOrders.tsx +++ b/frontend/src/pages/CopyTradingSellOrders.tsx @@ -145,7 +145,7 @@ const CopyTradingSellOrdersPage: React.FC = () => { const amount = (parseFloat(record.quantity) * parseFloat(record.price)).toString() return ( - {isMobile ? formatUSDC(amount) : `${formatUSDC(amount)} USDC`} + {isMobile ? formatUSDC(amount) : `$${formatUSDC(amount)}`} ) } @@ -161,7 +161,7 @@ const CopyTradingSellOrdersPage: React.FC = () => { fontWeight: 500, fontSize: isMobile ? 12 : 14 }}> - {isMobile ? formatUSDC(value) : `${formatUSDC(value)} USDC`} + {isMobile ? formatUSDC(value) : `$${formatUSDC(value)}`} ) }, @@ -277,7 +277,7 @@ const CopyTradingSellOrdersPage: React.FC = () => { 数量: {formatUSDC(order.quantity)} | 价格: {formatUSDC(order.price)}
- 金额: {formatUSDC(amount)} USDC + 金额: ${formatUSDC(amount)}
@@ -289,7 +289,7 @@ const CopyTradingSellOrdersPage: React.FC = () => { fontWeight: 'bold', color: getPnlColor(order.realizedPnl) }}> - {formatUSDC(order.realizedPnl)} USDC + ${formatUSDC(order.realizedPnl)} diff --git a/frontend/src/pages/CopyTradingStatistics.tsx b/frontend/src/pages/CopyTradingStatistics.tsx index 7f639e8..01222af 100644 --- a/frontend/src/pages/CopyTradingStatistics.tsx +++ b/frontend/src/pages/CopyTradingStatistics.tsx @@ -145,7 +145,7 @@ const CopyTradingStatisticsPage: React.FC = () => { @@ -179,7 +179,7 @@ const CopyTradingStatisticsPage: React.FC = () => { @@ -220,8 +220,7 @@ const CopyTradingStatisticsPage: React.FC = () => { title="总已实现盈亏" value={formatUSDC(statistics.totalRealizedPnl)} valueStyle={{ color: getPnlColor(statistics.totalRealizedPnl) }} - prefix={getPnlIcon(statistics.totalRealizedPnl)} - suffix="USDC" + prefix={<>{getPnlIcon(statistics.totalRealizedPnl)} $} /> @@ -229,8 +228,7 @@ const CopyTradingStatisticsPage: React.FC = () => { title="总未实现盈亏" value={formatUSDC(statistics.totalUnrealizedPnl)} valueStyle={{ color: getPnlColor(statistics.totalUnrealizedPnl) }} - prefix={getPnlIcon(statistics.totalUnrealizedPnl)} - suffix="USDC" + prefix={<>{getPnlIcon(statistics.totalUnrealizedPnl)} $} /> @@ -238,8 +236,7 @@ const CopyTradingStatisticsPage: React.FC = () => { title="总盈亏" value={formatUSDC(statistics.totalPnl)} valueStyle={{ color: getPnlColor(statistics.totalPnl) }} - prefix={getPnlIcon(statistics.totalPnl)} - suffix="USDC" + prefix={<>{getPnlIcon(statistics.totalPnl)} $} /> diff --git a/frontend/src/pages/CryptoTailMonitor.tsx b/frontend/src/pages/CryptoTailMonitor.tsx index 4ddacfd..c40fafd 100644 --- a/frontend/src/pages/CryptoTailMonitor.tsx +++ b/frontend/src/pages/CryptoTailMonitor.tsx @@ -493,7 +493,7 @@ const CryptoTailMonitor: React.FC = () => { } else { timeStr = '--' } - return `${timeStr}   ${Number(val).toFixed(2)} USDC` + return `${timeStr}   $${Number(val).toFixed(2)}` } }, legend: { diff --git a/frontend/src/pages/CryptoTailPnlCurveModal.tsx b/frontend/src/pages/CryptoTailPnlCurveModal.tsx index 7732906..ad71f8f 100644 --- a/frontend/src/pages/CryptoTailPnlCurveModal.tsx +++ b/frontend/src/pages/CryptoTailPnlCurveModal.tsx @@ -45,12 +45,12 @@ const CryptoTailPnlCurveModal: React.FC = (props) if (!v) return '' const d = data.curveData.find((p) => p.timestamp === v[0]) if (!d) return '' - return dayjs(v[0]).format('YYYY-MM-DD HH:mm') + '
' + t('cryptoTailStrategy.pnlCurve.totalPnl') + ': ' + formatUSDC(d.cumulativePnl) + ' USDC' + return dayjs(v[0]).format('YYYY-MM-DD HH:mm') + '
' + t('cryptoTailStrategy.pnlCurve.totalPnl') + ': $' + formatUSDC(d.cumulativePnl) } }, grid: { left: '3%', right: '4%', bottom: '3%', top: '10%', containLabel: true }, xAxis: { type: 'time' }, - yAxis: { type: 'value', axisLabel: { formatter: (val: number) => String(val) + ' USDC' } }, + yAxis: { type: 'value', axisLabel: { formatter: (val: number) => '$' + String(val) } }, series: [{ name: t('cryptoTailStrategy.pnlCurve.totalPnl'), type: 'line', @@ -108,7 +108,7 @@ const CryptoTailPnlCurveModal: React.FC = (props) @@ -125,7 +125,7 @@ const CryptoTailPnlCurveModal: React.FC = (props) diff --git a/frontend/src/pages/CryptoTailStrategyList.tsx b/frontend/src/pages/CryptoTailStrategyList.tsx index 1e37699..eb7de70 100644 --- a/frontend/src/pages/CryptoTailStrategyList.tsx +++ b/frontend/src/pages/CryptoTailStrategyList.tsx @@ -773,7 +773,7 @@ const CryptoTailStrategyList: React.FC = () => {
{t('cryptoTailStrategy.list.totalRealizedPnl')}
{item.totalRealizedPnl != null ? ( -
{formatUSDC(item.totalRealizedPnl)} USDC
+
${formatUSDC(item.totalRealizedPnl)}
) : (
-
)} @@ -966,7 +966,7 @@ const CryptoTailStrategyList: React.FC = () => { ) : ( - + ) } @@ -1111,7 +1111,7 @@ const CryptoTailStrategyList: React.FC = () => { dataIndex: 'amountUsdc', key: 'amountUsdc', width: 110, - render: (v: string) => `${formatUSDC(v)} USDC` + render: (v: string) => `$${formatUSDC(v)}` }, { title: t('cryptoTailStrategy.triggerRecords.realizedPnl'), @@ -1186,7 +1186,7 @@ const CryptoTailStrategyList: React.FC = () => { dataIndex: 'amountUsdc', key: 'amountUsdc', width: 110, - render: (v: string) => `${formatUSDC(v)} USDC` + render: (v: string) => `$${formatUSDC(v)}` }, { title: t('cryptoTailStrategy.triggerRecords.failReason'), diff --git a/frontend/src/pages/LeaderList.tsx b/frontend/src/pages/LeaderList.tsx index 65a77ee..3b7260f 100644 --- a/frontend/src/pages/LeaderList.tsx +++ b/frontend/src/pages/LeaderList.tsx @@ -254,7 +254,7 @@ const LeaderList: React.FC = () => { return ( - {balance.available === '-' ? '-' : `${formatUSDC(balance.available)} USDC`} + {balance.available === '-' ? '-' : `$${formatUSDC(balance.available)}`} {t('leaderDetail.positionBalance')}: {formatUSDC(balance.position)} @@ -488,7 +488,7 @@ const LeaderList: React.FC = () => { {t('leaderDetail.availableBalance')}
- {balance?.available && balance.available !== '-' ? `${formatUSDC(balance.available)} USDC` : '- USDC'} + {balance?.available && balance.available !== '-' ? `$${formatUSDC(balance.available)}` : '-'}
@@ -700,7 +700,7 @@ const LeaderList: React.FC = () => { value={parseFloat(detailBalance.availableBalance)} precision={4} valueStyle={{ color: '#1890ff' }} - suffix="USDC" + prefix="$" formatter={(value) => formatUSDC(value?.toString() || '0')} /> @@ -712,7 +712,7 @@ const LeaderList: React.FC = () => { value={parseFloat(detailBalance.positionBalance)} precision={4} valueStyle={{ color: '#722ed1' }} - suffix="USDC" + prefix="$" formatter={(value) => formatUSDC(value?.toString() || '0')} /> @@ -724,7 +724,7 @@ const LeaderList: React.FC = () => { value={parseFloat(detailBalance.totalBalance)} precision={4} valueStyle={{ color: '#52c41a', fontWeight: 'bold' }} - suffix="USDC" + prefix="$" formatter={(value) => formatUSDC(value?.toString() || '0')} /> diff --git a/frontend/src/pages/OrderList.tsx b/frontend/src/pages/OrderList.tsx index 1630f0e..e2648e0 100644 --- a/frontend/src/pages/OrderList.tsx +++ b/frontend/src/pages/OrderList.tsx @@ -118,7 +118,7 @@ const OrderList: React.FC = () => { key: 'pnl', render: (pnl: string | undefined) => pnl ? ( - {formatUSDC(pnl)} USDC + ${formatUSDC(pnl)} ) : '-' }, diff --git a/frontend/src/pages/PositionList.tsx b/frontend/src/pages/PositionList.tsx index 4b1660e..60fcb81 100644 --- a/frontend/src/pages/PositionList.tsx +++ b/frontend/src/pages/PositionList.tsx @@ -695,7 +695,7 @@ const PositionList: React.FC = () => { fontWeight: '500', color: isProfit ? '#52c41a' : '#f5222d' }}> - {pnlNum >= 0 ? '+' : ''}{formatUSDC(position.pnl)} USDC + {pnlNum >= 0 ? '+' : ''}${formatUSDC(position.pnl)}
)} @@ -718,7 +718,7 @@ const PositionList: React.FC = () => {
开仓价值 - {formatUSDC(position.initialValue)} USDC + ${formatUSDC(position.initialValue)}
{positionFilter === 'current' && position.currentPrice && ( @@ -732,7 +732,7 @@ const PositionList: React.FC = () => {
当前价值 - {formatUSDC(position.currentValue)} USDC + ${formatUSDC(position.currentValue)}
@@ -775,7 +775,7 @@ const PositionList: React.FC = () => { fontWeight: 'bold', color: isProfit ? '#52c41a' : '#f5222d' }}> - {pnlNum >= 0 ? '+' : ''}{formatUSDC(position.pnl)} USDC + {pnlNum >= 0 ? '+' : ''}${formatUSDC(position.pnl)}
@@ -802,7 +802,7 @@ const PositionList: React.FC = () => { color: parseFloat(position.realizedPnl) >= 0 ? '#52c41a' : '#f5222d', fontWeight: '500' }}> - {parseFloat(position.realizedPnl) >= 0 ? '+' : ''}{formatUSDC(position.realizedPnl)} USDC + {parseFloat(position.realizedPnl) >= 0 ? '+' : ''}${formatUSDC(position.realizedPnl)}
)} @@ -951,7 +951,7 @@ const PositionList: React.FC = () => { dataIndex: 'initialValue', key: 'initialValue', render: (value: string) => ( - {formatUSDC(value)} USDC + ${formatUSDC(value)} ), align: 'right' as const, width: 110 @@ -971,7 +971,7 @@ const PositionList: React.FC = () => { return (
- {formatUSDC(record.currentValue)} USDC + ${formatUSDC(record.currentValue)}
{ borderColor: '#52c41a' }} > - 赎回 ({redeemableSummary.totalCount}个, {formatUSDC(redeemableSummary.totalValue)} USDC) + 赎回 ({redeemableSummary.totalCount}个, ${formatUSDC(redeemableSummary.totalValue)}) )}
@@ -1238,13 +1238,13 @@ const PositionList: React.FC = () => { 开仓价值合计:{' '} - {formatUSDC(positionTotals.totalInitialValue.toString())} USDC + ${formatUSDC(positionTotals.totalInitialValue.toString())} 当前价值合计:{' '} - {formatUSDC(positionTotals.totalCurrentValue.toString())} USDC + ${formatUSDC(positionTotals.totalCurrentValue.toString())} @@ -1256,7 +1256,7 @@ const PositionList: React.FC = () => { }} > {positionTotals.totalPnl >= 0 ? '+' : ''} - {formatUSDC(positionTotals.totalPnl.toString())} USDC + ${formatUSDC(positionTotals.totalPnl.toString())} @@ -1268,7 +1268,7 @@ const PositionList: React.FC = () => { }} > {positionTotals.totalRealizedPnl >= 0 ? '+' : ''} - {formatUSDC(positionTotals.totalRealizedPnl.toString())} USDC + ${formatUSDC(positionTotals.totalRealizedPnl.toString())}
@@ -1532,7 +1532,7 @@ const PositionList: React.FC = () => { color: currentPnl.pnl >= 0 ? '#52c41a' : '#f5222d', marginBottom: '4px' }}> - {currentPnl.pnl >= 0 ? '+' : ''}{formatUSDC(currentPnl.pnl)} USDC + {currentPnl.pnl >= 0 ? '+' : ''}${formatUSDC(currentPnl.pnl)}
{ - {formatUSDC(redeemableSummary.totalValue)} USDC + ${formatUSDC(redeemableSummary.totalValue)} @@ -1625,7 +1625,7 @@ const PositionList: React.FC = () => { width: 120 }, { - title: '价值 (USDC)', + title: '价值 ($)', dataIndex: 'value', key: 'value', align: 'right' as const, diff --git a/frontend/src/pages/Statistics.tsx b/frontend/src/pages/Statistics.tsx index 8736f7c..bfbe2ed 100644 --- a/frontend/src/pages/Statistics.tsx +++ b/frontend/src/pages/Statistics.tsx @@ -101,9 +101,8 @@ const Statistics: React.FC = () => { = 0 ? : } + prefix={<>{stats?.totalPnl && parseFloat(stats.totalPnl) >= 0 ? : } $} valueStyle={{ color: stats?.totalPnl && parseFloat(stats.totalPnl || '0') >= 0 ? '#3f8600' : '#cf1322' }} - suffix="USDC" loading={loading} /> @@ -124,9 +123,8 @@ const Statistics: React.FC = () => { = 0 ? : } + prefix={<>{stats?.avgPnl && parseFloat(stats.avgPnl || '0') >= 0 ? : } $} valueStyle={{ color: stats?.avgPnl && parseFloat(stats.avgPnl || '0') >= 0 ? '#3f8600' : '#cf1322' }} - suffix="USDC" loading={loading} /> @@ -136,9 +134,8 @@ const Statistics: React.FC = () => { } + prefix={<> $} valueStyle={{ color: '#3f8600' }} - suffix="USDC" loading={loading} /> @@ -148,9 +145,8 @@ const Statistics: React.FC = () => { } + prefix={<> $} valueStyle={{ color: '#cf1322' }} - suffix="USDC" loading={loading} /> diff --git a/frontend/src/pages/TemplateAdd.tsx b/frontend/src/pages/TemplateAdd.tsx index af7f84d..e2aa4b8 100644 --- a/frontend/src/pages/TemplateAdd.tsx +++ b/frontend/src/pages/TemplateAdd.tsx @@ -154,7 +154,7 @@ const TemplateAdd: React.FC = () => { {copyMode === 'FIXED' && ( { {copyMode === 'RATIO' && ( <> { = 1 USDC。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。'} + tooltip={t('templateAdd.minOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最小金额下限,用于过滤掉金额过小的订单,避免频繁小额交易。如果填写,必须 >= $1。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。'} rules={[ { validator: (_, value) => { @@ -282,7 +282,7 @@ const TemplateAdd: React.FC = () => { diff --git a/frontend/src/pages/TemplateEdit.tsx b/frontend/src/pages/TemplateEdit.tsx index cf18826..9bf72f1 100644 --- a/frontend/src/pages/TemplateEdit.tsx +++ b/frontend/src/pages/TemplateEdit.tsx @@ -189,9 +189,9 @@ const TemplateEdit: React.FC = () => { {copyMode === 'FIXED' && ( = 1 USDC。例如:设置为 10,则无论 Leader 买入多少,跟单金额始终为 10 USDC。'} + tooltip={t('templateEdit.fixedAmountTooltip') || '固定金额模式下,每次跟单的固定金额,不随 Leader 订单大小变化。必须 >= $1。例如:设置为 10,则无论 Leader 买入多少,跟单金额始终为 $10。'} rules={[ { required: true, message: t('templateEdit.fixedAmountRequired') || '请输入固定跟单金额' }, { @@ -229,9 +229,9 @@ const TemplateEdit: React.FC = () => { {copyMode === 'RATIO' && ( <> { = 1 USDC。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。'} + tooltip={t('templateEdit.minOrderSizeTooltip') || '比例模式下,限制单笔跟单订单的最小金额下限,用于过滤掉金额过小的订单,避免频繁小额交易。如果填写,必须 >= $1。例如:设置为 10,如果计算出的跟单金额小于 10,则跳过该订单。'} rules={[ { validator: (_, value) => { @@ -318,7 +318,7 @@ const TemplateEdit: React.FC = () => { diff --git a/frontend/src/pages/TemplateList.tsx b/frontend/src/pages/TemplateList.tsx index 6a3dfce..618f265 100644 --- a/frontend/src/pages/TemplateList.tsx +++ b/frontend/src/pages/TemplateList.tsx @@ -176,7 +176,7 @@ const TemplateList: React.FC = () => { if (record.copyMode === 'RATIO') { return `${t('templateList.ratio') || '比例'} ${record.copyRatio}x` } else if (record.copyMode === 'FIXED' && record.fixedAmount) { - return `${t('templateList.fixedAmount') || '固定'} ${formatUSDC(record.fixedAmount)} USDC` + return `$${formatUSDC(record.fixedAmount)}` } return '-' } @@ -350,7 +350,7 @@ const TemplateList: React.FC = () => {
{template.copyMode === 'RATIO' ? `${t('templateList.ratioMode') || '比例模式'} ${(parseFloat(template.copyRatio || '0') * 100).toFixed(0).replace(/\.0+$/, '')}%` - : `${t('templateList.fixedAmountMode') || '固定金额'} ${formatUSDC(template.fixedAmount || '0')} USDC` + : `$${formatUSDC(template.fixedAmount || '0')}` }
@@ -396,11 +396,11 @@ const TemplateList: React.FC = () => { }}> {t('templateList.amountLimit') || '金额限制'}: {template.maxOrderSize && ( - {t('templateList.max') || '最大'} {formatUSDC(template.maxOrderSize)} USDC + {t('templateList.max') || '最大'} ${formatUSDC(template.maxOrderSize)} )} {template.maxOrderSize && template.minOrderSize && | } {template.minOrderSize && ( - {t('templateList.min') || '最小'} {formatUSDC(template.minOrderSize)} USDC + {t('templateList.min') || '最小'} ${formatUSDC(template.minOrderSize)} )} {!template.maxOrderSize && !template.minOrderSize && {t('templateList.notSet') || '未设置'}} @@ -551,7 +551,7 @@ const TemplateList: React.FC = () => { {copyMode === 'FIXED' && ( { {copyMode === 'RATIO' && ( <> { { @@ -698,7 +698,7 @@ const TemplateList: React.FC = () => { 过滤条件(可选)