Skip to content

Conversation

@Gaubee
Copy link
Contributor

@Gaubee Gaubee commented Dec 31, 2025

变更内容

基于 PR #145 Follow-up Review 的修复:

🔧 Bug 修复

  • 移除 bio_getPublicKey: 该 API 已暴露但未实现,从 SDK 类型和 provider 中移除
  • 强化 COT API 配置: 添加 ApiConfigError 类,getApiBaseUrlSafe() 在未配置时抛出明确错误(而非返回空字符串)
  • 修复 WalletPicker exclude: 实现地址过滤功能,正确排除源钱包地址

✨ 新功能

  • TRON/TRC20 支持: Teleport fromTrJson 构造支持 tron/trc20 链类型
  • data-testid 属性: 为关键 UI 元素添加测试定位属性

🧪 测试增强

E2E 边界场景测试覆盖:

Teleport (tests 09-11):

  • API 失败 - 资产列表不可用
  • 用户取消钱包选择
  • 传送 API 失败

Forge (tests 10-12):

  • API 失败 - 配置不可用
  • 用户取消钱包连接
  • 充值 API 失败

📚 文档更新

  • 更新白皮书 bio_signMessage 文档:返回 { signature, publicKey } 格式

测试通过:

  • Teleport: 41 单元测试 + 11 E2E 测试 ✅
  • Forge: 46 单元测试 + 12 E2E 测试 ✅
  • TypeScript 类型检查 ✅

- 移除 bio_getPublicKey(未实现的 API,从 SDK 类型和 provider 移除)
- 强化 COT API 配置:添加 ApiConfigError,getApiBaseUrlSafe 在未配置时抛出错误
- 实现 WalletPicker exclude 参数支持,过滤排除地址
- 添加 TRON/TRC20 支持(Teleport fromTrJson 构造)
- 添加 data-testid 属性用于 E2E 测试定位
- 添加 E2E 边界场景测试:
  - Teleport: API 失败、用户取消、传送失败 (tests 09-11)
  - Forge: 配置加载失败、钱包连接取消、充值失败 (tests 10-12)
- 更新白皮书 bio_signMessage 文档:返回 { signature, publicKey } 格式
- 修复 Forge Storybook 测试环境变量 mock
- BioAccount 类型添加必填 publicKey 字段
- ChainAddress 添加 publicKey 字段
- WalletPickerJob 选择时返回 publicKey
- deriveAddressesForChains 返回公钥
- 钱包创建/更新时保存公钥到 IndexedDB
- 更新白皮书 bio_selectAccount 文档

BREAKING CHANGE: BioAccount.publicKey 现为必填字段
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