feat: 添加交易历史、错误提示和打包优化

1. 交易历史记录功能
   - 新增 useTransactionHistory hook 管理交易记录
   - 新增 TransactionHistory 组件显示历史
   - 交易记录保存到 localStorage

2. 错误处理和用户提示
   - 新增 Toast 通知组件
   - 交易提交/成功/失败时显示提示
   - 解析并显示友好的错误信息

3. 打包优化
   - 配置代码分割 (manualChunks)
   - 分离 react/web3/walletconnect/i18n
   - 提高 chunk 大小警告阈值

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-15 17:35:36 +00:00
parent 79fede5cb0
commit 553ff58c4d
12 changed files with 711 additions and 58 deletions

View File

@@ -88,6 +88,22 @@
"en": "English",
"zh": "Chinese"
},
"history": {
"title": "Transaction History",
"empty": "No transactions yet",
"clear": "Clear",
"viewMore": "View More"
},
"toast": {
"txSubmitted": "Transaction submitted",
"txSuccess": "Transaction successful",
"txFailed": "Transaction failed",
"copySuccess": "Copied to clipboard",
"walletError": "Wallet error",
"networkError": "Network error",
"insufficientBalance": "Insufficient balance",
"userRejected": "User rejected the transaction"
},
"test": {
"title": "Boundary Test",
"currentStatus": "Current Status",

View File

@@ -88,6 +88,22 @@
"en": "英文",
"zh": "中文"
},
"history": {
"title": "交易记录",
"empty": "暂无交易记录",
"clear": "清空",
"viewMore": "查看更多"
},
"toast": {
"txSubmitted": "交易已提交",
"txSuccess": "交易成功",
"txFailed": "交易失败",
"copySuccess": "已复制到剪贴板",
"walletError": "钱包错误",
"networkError": "网络错误",
"insufficientBalance": "余额不足",
"userRejected": "用户取消了交易"
},
"test": {
"title": "边界测试",
"currentStatus": "当前状态",