Skip to content

fix: 改进 BioForest 交易历史查询和错误处理 - #89

Merged
Gaubee merged 1 commit into
mainfrom
fix/transfer-flow-issues
Dec 23, 2025
Merged

Gaubee merged 1 commit into
mainfrom
fix/transfer-flow-issues

Conversation

@Gaubee

@Gaubee Gaubee commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

变更

修复交易历史查询 (问题4)

  • 使用正确的 API 格式查询交易:
    • 先获取 lastblock 获取 maxHeight
    • 使用正确的查询参数 (maxHeight, address, page, pageSize, sort)
    • 解析正确的响应格式 { trs: TransactionDetail[] }
    • 过滤转账交易 (AST-01, AST-02)
    • 从 transaction.asset.transferAsset 提取金额

改进错误处理 (问题3 部分修复)

  • 添加 @bfmeta/sign-util 包为后续 SDK 集成做准备
  • 改进 submitBioforestTransfer 的错误消息:
    • 添加调试日志
    • 为广播失败提供更清晰的错误消息

未解决的问题

完整的 BioForest 转账需要 @bnqkl/bioforest-chain-bundle SDK,该 SDK 目前是私有的。
已创建 Issue #88 跟踪 SDK 集成需求。

测试

  • typecheck 通过
  • 1376 单元测试通过

Relates to #88

- Fix getTransactionHistory to use correct API format:
  - First fetch lastblock to get maxHeight
  - Use proper query parameters (maxHeight, address, page, pageSize, sort)
  - Parse correct response format { trs: TransactionDetail[] }
  - Filter for transfer transactions (AST-01, AST-02)
  - Extract amount from transaction.asset.transferAsset

- Add @bfmeta/sign-util package for future SDK integration

- Improve error messages in submitBioforestTransfer:
  - Log errors for debugging
  - Provide clearer error messages for broadcast failures

Note: Full BioForest transfer requires @bnqkl/bioforest-chain-bundle SDK
which is currently private/proprietary. Transaction creation may fail
until proper SDK integration is implemented.
@Gaubee
Gaubee merged commit c274dd9 into main Dec 23, 2025
5 checks passed
@Gaubee
Gaubee deleted the fix/transfer-flow-issues branch January 4, 2026 07:23
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.

1 participant