feat: 钱包类型枚举与前端账号类型展示

后端:
- 新增 WalletType 枚举(MAGIC/SAFE),移除 safe/magic 字符串硬编码
- RelayClientService/BlockchainService/AccountService/OrderSigningService 使用枚举
- Builder Relayer API 类型使用常量 RELAYER_TYPE_PROXY/SAFE

前端:
- 账户列表、详情、导入 Modal 显示账号类型(Magic/Safe Tag)
- 导入账户 Modal 移除安全提示 Alert,移除 showAlert 与相关 i18n
- 移除无用 i18n key:securityTip、securityTipDesc、walletTypeMagic、walletTypeSafe、magicNotSupported
- 钱包类型 Tag 简化为仅显示 Magic 或 Safe

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
WrBug
2026-02-14 01:14:04 +08:00
co-authored by Cursor
parent fc6fa8b419
commit 3405a1cda3
13 changed files with 133 additions and 61 deletions
+1 -13
View File
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react'
import { Form, Input, Button, Radio, Space, Alert, Card, Spin, message } from 'antd'
import { Form, Input, Button, Radio, Space, Card, Spin, message, Alert } from 'antd'
import { CheckCircleOutlined, ExclamationCircleOutlined } from '@ant-design/icons'
import { useTranslation } from 'react-i18next'
import { useAccountStore } from '../store/accountStore'
@@ -22,7 +22,6 @@ interface AccountImportFormProps {
form: any
onSuccess?: (accountId: number) => void
onCancel?: () => void
showAlert?: boolean
showCancelButton?: boolean
}
@@ -30,7 +29,6 @@ const AccountImportForm: React.FC<AccountImportFormProps> = ({
form,
onSuccess,
onCancel,
showAlert = true,
showCancelButton = true
}) => {
const { t } = useTranslation()
@@ -266,16 +264,6 @@ const AccountImportForm: React.FC<AccountImportFormProps> = ({
return (
<>
{showAlert && (
<Alert
message={t('accountImport.securityTip')}
description={t('accountImport.securityTipDesc')}
type="warning"
showIcon
style={{ marginBottom: '24px' }}
/>
)}
<Form
form={form}
layout="vertical"