Repository navigation
fix(miniapps): 修复 PR #142/#143 review 问题 - #145
Merged
Merged
Conversation
P0 高风险修复: - Teleport: signTransData 改用 signedTx.data(RLP encoded rawTx)而非 signature - Forge: 添加 bio_getPublicKey API 框架(含回退机制) P1 中风险修复: - Forge E2E mock: 使用正确的 endpoint 路径 /cot/recharge/support 和 /cot/recharge/V2 - Forge API config: 改为 fail-fast 策略,未配置 VITE_COT_API_BASE_URL 时报错 P2 改进: - Teleport types.ts: 添加 @bnqkl 包使用说明注释 详细变更: - packages/bio-sdk: 添加 bio_getPublicKey 方法定义 - src/services/ecosystem: 添加 handleGetPublicKey handler(待完整实现) - miniapps/forge: useForge 调用 bio_getPublicKey,失败时回退到 address - miniapps/forge: 更新测试以包含新的 API 调用 - miniapps/teleport: 修正 signTransData 数据源并添加说明注释
- SignatureAuthService.handleMessageSign 返回 SignatureResult - SigningConfirmJob 发送 signature + publicKey - bio_signMessage/bio_signTypedData 返回新格式 - useForge 直接使用 signResult.publicKey(hex 格式) - 移除 bio_getPublicKey 回退逻辑(不再需要) publicKey 为 hex 编码的 32 字节公钥(BioForest Ed25519)
- forge: 添加 i18n 导入到 main.tsx - forge: 修复 E2E mock (fetch 拦截 + 选择器优化) - forge: 添加 E2E 测试用 API base URL - teleport: 修复 E2E mock (使用 addInitScript) - teleport: 优化资产选择器和确认页面选择器 E2E 测试结果: - Forge: 9/9 通过 - Teleport: 8/8 通过
Gaubee
added a commit
that referenced
this pull request
Dec 31, 2025
- 移除 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
Gaubee
added a commit
that referenced
this pull request
Jan 3, 2026
* fix(miniapps): PR #145 follow-up - TRON 支持 + E2E 边界测试 - 移除 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 * feat(bio-sdk): BioAccount 返回 publicKey - BioAccount 类型添加必填 publicKey 字段 - ChainAddress 添加 publicKey 字段 - WalletPickerJob 选择时返回 publicKey - deriveAddressesForChains 返回公钥 - 钱包创建/更新时保存公钥到 IndexedDB - 更新白皮书 bio_selectAccount 文档 BREAKING CHANGE: BioAccount.publicKey 现为必填字段 * docs: 更新 BioSDK 开发指南 - BioAccount 和 signMessage 返回类型说明
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
修复 PR #142 (Teleport) 和 PR #143 (Forge) 的代码 review 发现的问题。
修复内容
P0 - 高优先级
Teleport signTransData 修复
signedTx.signature(只有 r+s)signedTx.data(RLP 编码的完整 rawTx)Forge publicKey 问题
bio_signMessage返回{ signature, publicKey }P1 - 中优先级
Forge E2E mock 路径修复
/cot/recharge/support,/cot/recharge/V2Forge API base URL 配置
E2E 测试修复
Forge: 9/9 通过
Teleport: 8/8 通过
测试结果
相关 Issue
Closes review issues from PR #142 and PR #143