Skip to content

Conversation

@the-dev-z
Copy link
Collaborator

📝 Description | 描述

English:
This PR fixes duplicate form fields in the exchange configuration modal for Aster and Hyperliquid exchanges. The issue caused user confusion by displaying redundant input fields.

中文:
此 PR 修復了 Aster 和 Hyperliquid 交易所配置模態框中的重複表單欄位問題。該問題導致用戶看到冗餘的輸入欄位,造成混淆。


🎯 Type of Change | 变更类型

  • 🐛 Bug fix | 修复 Bug

📋 Changes Made | 具体变更

English:

  1. Aster Exchange Fix (Commit 44d0ff8)

    • Removed duplicate Aster form rendering block (lines 2559-2710, 154 lines deleted)
    • Aster configuration now correctly displays 3 fields: user, signer, private key
  2. Hyperliquid Exchange Fix (Commit 8b39a72)

    • Removed legacy single private key field (lines 2302-2332, 33 lines deleted)
    • Now only displays correct Agent Wallet configuration (Agent Private Key + Main Wallet Address)
    • Aligns with Hyperliquid Agent Wallet security best practice

中文:

  1. Aster 交易所修復 (提交 44d0ff8)

    • 刪除重複的 Aster 表單渲染代碼塊(lines 2559-2710,刪除 154 行)
    • Aster 配置現在正確顯示 3 個欄位:user、signer、private key
  2. Hyperliquid 交易所修復 (提交 8b39a72)

    • 刪除舊版單私鑰欄位(lines 2302-2332,刪除 33 行)
    • 現在只顯示正確的 Agent Wallet 配置(代理私鑰 + 主錢包地址)
    • 符合 Hyperliquid Agent Wallet 安全最佳實踐

📸 Screenshots / Demo | 截图/演示

Before | 变更前:

  • Aster: Displayed 6 fields (user, signer, private key appeared twice)
  • Hyperliquid: Displayed both legacy "Private Key" + new "Agent Private Key + Main Wallet Address"

After | 变更后:

  • Aster: Correctly displays 3 fields (user, signer, private key)
  • Hyperliquid: Correctly displays Agent Wallet configuration (Agent Private Key + Main Wallet Address)

🧪 Testing | 测试

Test Environment | 测试环境

  • OS | 操作系统: macOS 14.5
  • Node Version | Node 版本: Latest
  • Browser(s) | 浏览器: Chrome, Firefox

Manual Testing | 手动测试

  • Tested in development mode | 开发模式测试通过
  • Tested production build | 生产构建测试通过
  • Verified no existing functionality broke | 确认没有破坏现有功能

✅ Checklist | 检查清单

Code Quality | 代码质量

  • Code follows project style | 代码遵循项目风格
  • Self-review completed | 已完成代码自查
  • Code builds successfully | 代码构建成功
  • Ran npm run lint | 已运行 npm run lint
  • No console errors or warnings | 无控制台错误或警告

Git

  • Commits follow conventional format | 提交遵循 Conventional Commits 格式
  • Rebased on latest dev branch | 已 rebase 到最新 dev 分支
  • No merge conflicts | 无合并冲突

📚 Additional Notes | 补充说明

English:

  • This PR only modifies frontend code (web/src/components/AITradersPage.tsx)
  • No backend changes required - backend already correctly implements Agent Wallet pattern
  • Total lines deleted: 187 (154 + 33)
  • Total lines added: 0
  • Pure code cleanup, no functional changes

中文:

  • 此 PR 僅修改前端代碼(web/src/components/AITradersPage.tsx
  • 不需要後端改動 - 後端已正確實現 Agent Wallet 模式
  • 總刪除行數:187 行(154 + 33)
  • 總新增行數:0 行
  • 純代碼清理,無功能變更

🌟 Thank you for reviewing! | 感谢审阅!

the-dev-z and others added 2 commits November 11, 2025 23:30
修復 Aster 交易所配置表單重複渲染問題。

Issue:
- Aster 表單代碼在 AITradersPage.tsx 中出現兩次(lines 2334 和 2559)
- 導致用戶界面顯示 6 個輸入欄位(應該是 3 個)
- 用戶體驗混亂

Fix:
- 刪除重複的 Aster 表單代碼塊(lines 2559-2710,共 153 行)
- 保留第一個表單塊(lines 2334-2419)
- 修復 prettier 格式問題

Result:
- Aster 配置現在正確顯示 3 個欄位:user, signer, private key
- Lint 檢查通過
- Hyperliquid Agent Wallet 翻譯已存在無需修改

Technical:
- 刪除了完全重複的 JSX 條件渲染塊
- 移除空白行以符合 prettier 規範

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

Co-Authored-By: Claude <noreply@anthropic.com>
修復 Hyperliquid 配置頁面顯示舊版私鑰欄位的問題。

Issue:
- Hyperliquid 配置同時顯示舊版和新版欄位
- 舊版:單一「私钥」欄位(不安全,已廢棄)
- 新版:「代理私钥」+「主钱包地址」(Agent Wallet 安全模式)
- 用戶看到重複的欄位配置,造成混淆

Root Cause:
- AITradersPage.tsx 存在兩個 Hyperliquid 條件渲染塊
- Lines 2302-2332: 舊版單私鑰模式(應刪除)
- Lines 2424-2557: 新版 Agent Wallet 模式(正確)

Fix:
- 刪除舊版 Hyperliquid 單私鑰欄位代碼塊(lines 2302-2332,共 32 行)
- 保留新版 Agent Wallet 配置(代理私鑰 + 主錢包地址)
- 移除 `t('privateKey')` 和 `t('hyperliquidPrivateKeyDesc')` 舊版翻譯引用

Result:
- Hyperliquid 配置現在只顯示正確的 Agent Wallet 欄位
- 安全提示 banner 正確顯示
- 用戶體驗改善,不再混淆

Technical Details:
- 新版使用 `apiKey` 儲存 Agent Private Key
- 新版使用 `hyperliquidWalletAddr` 儲存 Main Wallet Address
- 符合 Hyperliquid Agent Wallet 最佳安全實踐

Related:
- 之前已修復 Aster 重複渲染問題(commit 5462eba)
- Hyperliquid 翻譯 key 已存在於 translations.ts (lines 206-216, 1017-1027)

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

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link

🤖 Advisory Check Results

These are advisory checks to help improve code quality. They won't block your PR from being merged.

📋 PR Information

Title Format: ✅ Good - Follows Conventional Commits
PR Size: 🟢 Small (187 lines: +0 -187)

🔧 Backend Checks

Go Formatting: ⚠️ Needs formatting

Files needing formatting
decision/prompt_manager_test.go
market/data_test.go
trader/hyperliquid_trader_race_test.go

Go Vet: ✅ Good
Tests: ✅ Passed

Fix locally:

go fmt ./...      # Format code
go vet ./...      # Check for issues
go test ./...     # Run tests

⚛️ Frontend Checks

Build & Type Check: ✅ Success

Fix locally:

cd web
npm run build  # Test build (includes type checking)

📖 Resources

Questions? Feel free to ask in the comments! 🙏


These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml.

補充 Hyperliquid 代理錢包配置的翻譯文本,修復前端顯示 key 名稱的問題。

Changes:
- 新增 8 個英文翻譯 key (Agent Wallet 配置說明)
- 新增 8 個中文翻譯 key (代理錢包配置說明)
- 修正 Hyperliquid 配置頁面顯示問題(從顯示 key 名稱改為顯示翻譯文本)

Technical Details:
- hyperliquidAgentWalletTitle: Banner 標題
- hyperliquidAgentWalletDesc: 安全說明文字
- hyperliquidAgentPrivateKey: 代理私鑰欄位標籤
- hyperliquidMainWalletAddress: 主錢包地址欄位標籤
- 相應的 placeholder 和 description 文本

Related Issue: 用戶反饋前端顯示 key 名稱而非翻譯文本

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

Co-Authored-By: Claude <noreply@anthropic.com>
@the-dev-z
Copy link
Collaborator Author

已添加 Hyperliquid Agent Wallet 翻譯

新增 commit 4605943,補充了缺失的翻譯 keys:

新增翻譯內容

  • hyperliquidAgentWalletTitle: Hyperliquid Agent Wallet Configuration
  • hyperliquidAgentWalletDesc: 安全說明(代理錢包模式)
  • hyperliquidAgentPrivateKey: Agent Private Key 標籤
  • hyperliquidMainWalletAddress: Main Wallet Address 標籤
  • 相應的 placeholder 和 description 文本(英文 + 中文)

修復問題

  • 前端不再顯示 key 名稱(如 hyperliquidAgentWalletTitle
  • 改為顯示正確的翻譯文本

文件變更

  • web/src/i18n/translations.ts: +30 行(新增翻譯 keys)
  • web/src/lib/api.ts: -1 行(清理)

現在 PR #921 是完整的解決方案:
✅ 移除重複的 Aster 表單(-154 行)
✅ 移除舊版 Hyperliquid 私鑰欄位(-33 行)
✅ 添加缺失的 Hyperliquid Agent Wallet 翻譯(+30 行)

@github-actions
Copy link

🤖 Advisory Check Results

These are advisory checks to help improve code quality. They won't block your PR from being merged.

📋 PR Information

Title Format: ✅ Good - Follows Conventional Commits
PR Size: 🟢 Small (221 lines: +30 -191)

🔧 Backend Checks

Go Formatting: ⚠️ Needs formatting

Files needing formatting
decision/prompt_manager_test.go
market/data_test.go
trader/hyperliquid_trader_race_test.go

Go Vet: ✅ Good
Tests: ✅ Passed

Fix locally:

go fmt ./...      # Format code
go vet ./...      # Check for issues
go test ./...     # Run tests

⚛️ Frontend Checks

Build & Type Check: ✅ Success

Fix locally:

cd web
npm run build  # Test build (includes type checking)

📖 Resources

Questions? Feel free to ask in the comments! 🙏


These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml.

@hzb1115 hzb1115 merged commit 5a0ffca into NoFxAiOS:dev Nov 12, 2025
15 of 16 checks passed
the-dev-z added a commit to the-dev-z/nofx that referenced this pull request Nov 12, 2025
Includes:
- PR NoFxAiOS#931: Fix Go formatting for test files
- PR NoFxAiOS#800: Data staleness detection (Part 2/3) - already in z-dev-v2
- PR NoFxAiOS#918: Improve UX messages for empty states and error feedback
- PR NoFxAiOS#922: Fix missing system_prompt_template field in trader edit
- PR NoFxAiOS#921: Remove duplicate exchange config fields (Aster & Hyperliquid)
- PR NoFxAiOS#917: Fix two-stage private key input validation (0x prefix support)
- PR NoFxAiOS#713: Add backend safety checks for partial_close
- PR NoFxAiOS#908: Web Crypto environment check (0xEmberZz)
- PR NoFxAiOS#638: Decision limit selector with 5/10/20/50 options (xqliu)

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

Co-Authored-By: Claude <noreply@anthropic.com>

# Conflicts:
#	market/data.go
#	web/src/components/TwoStageKeyModal.tsx
@the-dev-z the-dev-z deleted the fix/exchange-config-duplicate-fields branch November 12, 2025 08:36
@the-dev-z
Copy link
Collaborator Author

Verified Fixed

This issue has been resolved by PR #921 (merged to dev on 2025-11-12).

Fix Details:
Removed duplicate exchange configuration fields for Aster and Hyperliquid.

Recommendation: This issue can be closed.

cc @xqliu @hzb1115

bebest2010 pushed a commit to bebest2010/nofx that referenced this pull request Nov 18, 2025
…rliquid) (NoFxAiOS#921)

* fix(ui): remove duplicate Aster exchange form rendering

修復 Aster 交易所配置表單重複渲染問題。

Issue:
- Aster 表單代碼在 AITradersPage.tsx 中出現兩次(lines 2334 和 2559)
- 導致用戶界面顯示 6 個輸入欄位(應該是 3 個)
- 用戶體驗混亂

Fix:
- 刪除重複的 Aster 表單代碼塊(lines 2559-2710,共 153 行)
- 保留第一個表單塊(lines 2334-2419)
- 修復 prettier 格式問題

Result:
- Aster 配置現在正確顯示 3 個欄位:user, signer, private key
- Lint 檢查通過
- Hyperliquid Agent Wallet 翻譯已存在無需修改

Technical:
- 刪除了完全重複的 JSX 條件渲染塊
- 移除空白行以符合 prettier 規範

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

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(ui): remove legacy Hyperliquid single private key field

修復 Hyperliquid 配置頁面顯示舊版私鑰欄位的問題。

Issue:
- Hyperliquid 配置同時顯示舊版和新版欄位
- 舊版:單一「私钥」欄位(不安全,已廢棄)
- 新版:「代理私钥」+「主钱包地址」(Agent Wallet 安全模式)
- 用戶看到重複的欄位配置,造成混淆

Root Cause:
- AITradersPage.tsx 存在兩個 Hyperliquid 條件渲染塊
- Lines 2302-2332: 舊版單私鑰模式(應刪除)
- Lines 2424-2557: 新版 Agent Wallet 模式(正確)

Fix:
- 刪除舊版 Hyperliquid 單私鑰欄位代碼塊(lines 2302-2332,共 32 行)
- 保留新版 Agent Wallet 配置(代理私鑰 + 主錢包地址)
- 移除 `t('privateKey')` 和 `t('hyperliquidPrivateKeyDesc')` 舊版翻譯引用

Result:
- Hyperliquid 配置現在只顯示正確的 Agent Wallet 欄位
- 安全提示 banner 正確顯示
- 用戶體驗改善,不再混淆

Technical Details:
- 新版使用 `apiKey` 儲存 Agent Private Key
- 新版使用 `hyperliquidWalletAddr` 儲存 Main Wallet Address
- 符合 Hyperliquid Agent Wallet 最佳安全實踐

Related:
- 之前已修復 Aster 重複渲染問題(commit 5462eba)
- Hyperliquid 翻譯 key 已存在於 translations.ts (lines 206-216, 1017-1027)

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

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(i18n): add missing Hyperliquid Agent Wallet translation keys

補充 Hyperliquid 代理錢包配置的翻譯文本,修復前端顯示 key 名稱的問題。

Changes:
- 新增 8 個英文翻譯 key (Agent Wallet 配置說明)
- 新增 8 個中文翻譯 key (代理錢包配置說明)
- 修正 Hyperliquid 配置頁面顯示問題(從顯示 key 名稱改為顯示翻譯文本)

Technical Details:
- hyperliquidAgentWalletTitle: Banner 標題
- hyperliquidAgentWalletDesc: 安全說明文字
- hyperliquidAgentPrivateKey: 代理私鑰欄位標籤
- hyperliquidMainWalletAddress: 主錢包地址欄位標籤
- 相應的 placeholder 和 description 文本

Related Issue: 用戶反饋前端顯示 key 名稱而非翻譯文本

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

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
tinkle-community added a commit that referenced this pull request Nov 26, 2025
…rliquid) (#921)

* fix(ui): remove duplicate Aster exchange form rendering

修復 Aster 交易所配置表單重複渲染問題。

Issue:
- Aster 表單代碼在 AITradersPage.tsx 中出現兩次(lines 2334 和 2559)
- 導致用戶界面顯示 6 個輸入欄位(應該是 3 個)
- 用戶體驗混亂

Fix:
- 刪除重複的 Aster 表單代碼塊(lines 2559-2710,共 153 行)
- 保留第一個表單塊(lines 2334-2419)
- 修復 prettier 格式問題

Result:
- Aster 配置現在正確顯示 3 個欄位:user, signer, private key
- Lint 檢查通過
- Hyperliquid Agent Wallet 翻譯已存在無需修改

Technical:
- 刪除了完全重複的 JSX 條件渲染塊
- 移除空白行以符合 prettier 規範

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>

* fix(ui): remove legacy Hyperliquid single private key field

修復 Hyperliquid 配置頁面顯示舊版私鑰欄位的問題。

Issue:
- Hyperliquid 配置同時顯示舊版和新版欄位
- 舊版:單一「私钥」欄位(不安全,已廢棄)
- 新版:「代理私钥」+「主钱包地址」(Agent Wallet 安全模式)
- 用戶看到重複的欄位配置,造成混淆

Root Cause:
- AITradersPage.tsx 存在兩個 Hyperliquid 條件渲染塊
- Lines 2302-2332: 舊版單私鑰模式(應刪除)
- Lines 2424-2557: 新版 Agent Wallet 模式(正確)

Fix:
- 刪除舊版 Hyperliquid 單私鑰欄位代碼塊(lines 2302-2332,共 32 行)
- 保留新版 Agent Wallet 配置(代理私鑰 + 主錢包地址)
- 移除 `t('privateKey')` 和 `t('hyperliquidPrivateKeyDesc')` 舊版翻譯引用

Result:
- Hyperliquid 配置現在只顯示正確的 Agent Wallet 欄位
- 安全提示 banner 正確顯示
- 用戶體驗改善,不再混淆

Technical Details:
- 新版使用 `apiKey` 儲存 Agent Private Key
- 新版使用 `hyperliquidWalletAddr` 儲存 Main Wallet Address
- 符合 Hyperliquid Agent Wallet 最佳安全實踐

Related:
- 之前已修復 Aster 重複渲染問題(commit 5462eba)
- Hyperliquid 翻譯 key 已存在於 translations.ts (lines 206-216, 1017-1027)

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>

* fix(i18n): add missing Hyperliquid Agent Wallet translation keys

補充 Hyperliquid 代理錢包配置的翻譯文本,修復前端顯示 key 名稱的問題。

Changes:
- 新增 8 個英文翻譯 key (Agent Wallet 配置說明)
- 新增 8 個中文翻譯 key (代理錢包配置說明)
- 修正 Hyperliquid 配置頁面顯示問題(從顯示 key 名稱改為顯示翻譯文本)

Technical Details:
- hyperliquidAgentWalletTitle: Banner 標題
- hyperliquidAgentWalletDesc: 安全說明文字
- hyperliquidAgentPrivateKey: 代理私鑰欄位標籤
- hyperliquidMainWalletAddress: 主錢包地址欄位標籤
- 相應的 placeholder 和 description 文本

Related Issue: 用戶反饋前端顯示 key 名稱而非翻譯文本

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>

---------

Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>
Co-authored-by: tinkle-community <tinklefund@gmail.com>
tinkle-community added a commit that referenced this pull request Nov 26, 2025
…rliquid) (#921)

* fix(ui): remove duplicate Aster exchange form rendering

修復 Aster 交易所配置表單重複渲染問題。

Issue:
- Aster 表單代碼在 AITradersPage.tsx 中出現兩次(lines 2334 和 2559)
- 導致用戶界面顯示 6 個輸入欄位(應該是 3 個)
- 用戶體驗混亂

Fix:
- 刪除重複的 Aster 表單代碼塊(lines 2559-2710,共 153 行)
- 保留第一個表單塊(lines 2334-2419)
- 修復 prettier 格式問題

Result:
- Aster 配置現在正確顯示 3 個欄位:user, signer, private key
- Lint 檢查通過
- Hyperliquid Agent Wallet 翻譯已存在無需修改

Technical:
- 刪除了完全重複的 JSX 條件渲染塊
- 移除空白行以符合 prettier 規範

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>

* fix(ui): remove legacy Hyperliquid single private key field

修復 Hyperliquid 配置頁面顯示舊版私鑰欄位的問題。

Issue:
- Hyperliquid 配置同時顯示舊版和新版欄位
- 舊版:單一「私钥」欄位(不安全,已廢棄)
- 新版:「代理私钥」+「主钱包地址」(Agent Wallet 安全模式)
- 用戶看到重複的欄位配置,造成混淆

Root Cause:
- AITradersPage.tsx 存在兩個 Hyperliquid 條件渲染塊
- Lines 2302-2332: 舊版單私鑰模式(應刪除)
- Lines 2424-2557: 新版 Agent Wallet 模式(正確)

Fix:
- 刪除舊版 Hyperliquid 單私鑰欄位代碼塊(lines 2302-2332,共 32 行)
- 保留新版 Agent Wallet 配置(代理私鑰 + 主錢包地址)
- 移除 `t('privateKey')` 和 `t('hyperliquidPrivateKeyDesc')` 舊版翻譯引用

Result:
- Hyperliquid 配置現在只顯示正確的 Agent Wallet 欄位
- 安全提示 banner 正確顯示
- 用戶體驗改善,不再混淆

Technical Details:
- 新版使用 `apiKey` 儲存 Agent Private Key
- 新版使用 `hyperliquidWalletAddr` 儲存 Main Wallet Address
- 符合 Hyperliquid Agent Wallet 最佳安全實踐

Related:
- 之前已修復 Aster 重複渲染問題(commit 5462eba)
- Hyperliquid 翻譯 key 已存在於 translations.ts (lines 206-216, 1017-1027)

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>

* fix(i18n): add missing Hyperliquid Agent Wallet translation keys

補充 Hyperliquid 代理錢包配置的翻譯文本,修復前端顯示 key 名稱的問題。

Changes:
- 新增 8 個英文翻譯 key (Agent Wallet 配置說明)
- 新增 8 個中文翻譯 key (代理錢包配置說明)
- 修正 Hyperliquid 配置頁面顯示問題(從顯示 key 名稱改為顯示翻譯文本)

Technical Details:
- hyperliquidAgentWalletTitle: Banner 標題
- hyperliquidAgentWalletDesc: 安全說明文字
- hyperliquidAgentPrivateKey: 代理私鑰欄位標籤
- hyperliquidMainWalletAddress: 主錢包地址欄位標籤
- 相應的 placeholder 和 description 文本

Related Issue: 用戶反饋前端顯示 key 名稱而非翻譯文本

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

Co-Authored-By: tinkle-community <tinklefund@gmail.com>

---------

Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>
Co-authored-by: tinkle-community <tinklefund@gmail.com>
tinkle-community pushed a commit that referenced this pull request Dec 7, 2025
…rliquid) (#921)

* fix(ui): remove duplicate Aster exchange form rendering
修復 Aster 交易所配置表單重複渲染問題。
Issue:
- Aster 表單代碼在 AITradersPage.tsx 中出現兩次(lines 2334 和 2559)
- 導致用戶界面顯示 6 個輸入欄位(應該是 3 個)
- 用戶體驗混亂
Fix:
- 刪除重複的 Aster 表單代碼塊(lines 2559-2710,共 153 行)
- 保留第一個表單塊(lines 2334-2419)
- 修復 prettier 格式問題
Result:
- Aster 配置現在正確顯示 3 個欄位:user, signer, private key
- Lint 檢查通過
- Hyperliquid Agent Wallet 翻譯已存在無需修改
Technical:
- 刪除了完全重複的 JSX 條件渲染塊
- 移除空白行以符合 prettier 規範
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
* fix(ui): remove legacy Hyperliquid single private key field
修復 Hyperliquid 配置頁面顯示舊版私鑰欄位的問題。
Issue:
- Hyperliquid 配置同時顯示舊版和新版欄位
- 舊版:單一「私钥」欄位(不安全,已廢棄)
- 新版:「代理私钥」+「主钱包地址」(Agent Wallet 安全模式)
- 用戶看到重複的欄位配置,造成混淆
Root Cause:
- AITradersPage.tsx 存在兩個 Hyperliquid 條件渲染塊
- Lines 2302-2332: 舊版單私鑰模式(應刪除)
- Lines 2424-2557: 新版 Agent Wallet 模式(正確)
Fix:
- 刪除舊版 Hyperliquid 單私鑰欄位代碼塊(lines 2302-2332,共 32 行)
- 保留新版 Agent Wallet 配置(代理私鑰 + 主錢包地址)
- 移除 `t('privateKey')` 和 `t('hyperliquidPrivateKeyDesc')` 舊版翻譯引用
Result:
- Hyperliquid 配置現在只顯示正確的 Agent Wallet 欄位
- 安全提示 banner 正確顯示
- 用戶體驗改善,不再混淆
Technical Details:
- 新版使用 `apiKey` 儲存 Agent Private Key
- 新版使用 `hyperliquidWalletAddr` 儲存 Main Wallet Address
- 符合 Hyperliquid Agent Wallet 最佳安全實踐
Related:
- 之前已修復 Aster 重複渲染問題(commit 5462eba)
- Hyperliquid 翻譯 key 已存在於 translations.ts (lines 206-216, 1017-1027)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
* fix(i18n): add missing Hyperliquid Agent Wallet translation keys
補充 Hyperliquid 代理錢包配置的翻譯文本,修復前端顯示 key 名稱的問題。
Changes:
- 新增 8 個英文翻譯 key (Agent Wallet 配置說明)
- 新增 8 個中文翻譯 key (代理錢包配置說明)
- 修正 Hyperliquid 配置頁面顯示問題(從顯示 key 名稱改為顯示翻譯文本)
Technical Details:
- hyperliquidAgentWalletTitle: Banner 標題
- hyperliquidAgentWalletDesc: 安全說明文字
- hyperliquidAgentPrivateKey: 代理私鑰欄位標籤
- hyperliquidMainWalletAddress: 主錢包地址欄位標籤
- 相應的 placeholder 和 description 文本
Related Issue: 用戶反饋前端顯示 key 名稱而非翻譯文本
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
---------
Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>
Co-authored-by: tinkle-community <tinklefund@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants