feat: 优化账户管理和订单功能
- 重置密码后自动跳转到登录页,登录页添加重置密码入口 - 移除默认账户相关逻辑和UI - 移除前端API Key自动获取提示文案(后端保留自动获取逻辑) - 修复SELL订单takerAmount计算精度问题,使用精确计算避免精度丢失 - 修复导入账户页面白屏问题(缺少Alert组件导入) - 持仓出售支持百分比模式,使用原始精度数据计算,支持小数百分比 - 优化订单金额计算逻辑,确保与SDK一致
This commit is contained in:
@@ -15,7 +15,6 @@ export interface Account {
|
||||
walletAddress: string
|
||||
proxyAddress: string // Polymarket 代理钱包地址
|
||||
accountName?: string
|
||||
isDefault: boolean
|
||||
isEnabled?: boolean // 是否启用
|
||||
apiKeyConfigured: boolean
|
||||
apiSecretConfigured: boolean
|
||||
@@ -43,7 +42,6 @@ export interface AccountImportRequest {
|
||||
privateKey: string
|
||||
walletAddress: string
|
||||
accountName?: string
|
||||
isDefault?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,7 +50,6 @@ export interface AccountImportRequest {
|
||||
export interface AccountUpdateRequest {
|
||||
accountId: number
|
||||
accountName?: string
|
||||
isDefault?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -287,7 +284,8 @@ export interface AccountPosition {
|
||||
marketIcon?: string // 市场图标 URL
|
||||
side: string // 结果名称(如 "YES", "NO", "Pakistan" 等)
|
||||
outcomeIndex?: number // 结果索引(0, 1, 2...),用于计算 tokenId
|
||||
quantity: string
|
||||
quantity: string // 显示用的数量(可能被截位)
|
||||
originalQuantity?: string // 原始数量(保留完整精度,用于100%出售)
|
||||
avgPrice: string
|
||||
currentPrice: string
|
||||
currentValue: string
|
||||
@@ -319,7 +317,8 @@ export interface PositionSellRequest {
|
||||
side: string // 结果名称(如 "YES", "NO", "Pakistan" 等)
|
||||
outcomeIndex?: number // 结果索引(0, 1, 2...),用于计算 tokenId(推荐提供)
|
||||
orderType: 'MARKET' | 'LIMIT'
|
||||
quantity: string
|
||||
quantity?: string // 卖出数量(可选,手动输入时使用)
|
||||
percent?: string // 卖出百分比(可选,BigDecimal字符串,支持小数,0-100之间,选择百分比按钮时使用)
|
||||
price?: string // 限价订单必需
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user