feat: 账户设置后端 action、Safe 部署与设置引导弹窗复用
账户设置: - 后端: execute-setup-step API(步骤1 Safe 一键部署/步骤2 启用交易/步骤3 代币授权) - Safe 部署: Eip712Encoder SafeCreate/CreateProxy,RelayClientService.deploySafeViaBuilderRelayer - BuilderRelayerApi: SignatureParams 增加 paymentToken/payment/paymentReceiver,TransactionRequest.nonce 可选 - 导入成功有未完成步骤时先弹设置引导再关导入弹窗;设置弹窗复用 AccountSetupStatusBlock(embedded) - AccountSetupStatusBlock: 5s 轮询、embedded 模式、onAllCompleted、移除全部完成 Tag、授权信息始终展示且右对齐额度列 - 多语言: 步骤1/2/3 文案与 actionSuccess/actionFailed CryptoTail: - SpreadDirection/SpreadMode 枚举及 Converter,V38 迁移,策略列表与 api/types 调整 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -215,13 +215,28 @@ export const apiService = {
|
||||
/**
|
||||
* 导入账户
|
||||
*/
|
||||
import: (data: any) =>
|
||||
import: (data: any) =>
|
||||
apiClient.post<ApiResponse<any>>('/accounts/import', data),
|
||||
|
||||
/**
|
||||
* 检查账户设置状态
|
||||
*/
|
||||
checkSetupStatus: (accountId: number) =>
|
||||
apiClient.post<ApiResponse<any>>('/accounts/check-setup-status', { accountId }),
|
||||
|
||||
/**
|
||||
* 执行设置步骤(步骤1 返回跳转 URL,步骤2/3 由后端执行)
|
||||
*/
|
||||
executeSetupStep: (accountId: number, step: number) =>
|
||||
apiClient.post<ApiResponse<{ success: boolean; redirectUrl?: string; transactionHash?: string }>>(
|
||||
'/accounts/execute-setup-step',
|
||||
{ accountId, step }
|
||||
),
|
||||
|
||||
/**
|
||||
* 更新账户
|
||||
*/
|
||||
update: (data: any) =>
|
||||
update: (data: any) =>
|
||||
apiClient.post<ApiResponse<any>>('/accounts/update', data),
|
||||
|
||||
/**
|
||||
@@ -447,8 +462,9 @@ export const apiService = {
|
||||
maxPrice?: string
|
||||
amountMode: string
|
||||
amountValue: string
|
||||
minSpreadMode?: string
|
||||
minSpreadValue?: string | null
|
||||
spreadMode?: string
|
||||
spreadValue?: string | null
|
||||
spreadDirection?: string
|
||||
enabled?: boolean
|
||||
}) =>
|
||||
apiClient.post<ApiResponse<import('../types').CryptoTailStrategyDto>>('/crypto-tail-strategy/create', data),
|
||||
@@ -461,8 +477,9 @@ export const apiService = {
|
||||
maxPrice?: string
|
||||
amountMode?: string
|
||||
amountValue?: string
|
||||
minSpreadMode?: string
|
||||
minSpreadValue?: string | null
|
||||
spreadMode?: string
|
||||
spreadValue?: string | null
|
||||
spreadDirection?: string
|
||||
enabled?: boolean
|
||||
}) =>
|
||||
apiClient.post<ApiResponse<import('../types').CryptoTailStrategyDto>>('/crypto-tail-strategy/update', data),
|
||||
|
||||
Reference in New Issue
Block a user