Skip to content

fix(providers): unwrap btcwallet-v1 response wrapper - #179

Merged
Gaubee merged 1 commit into
mainfrom
fix/btcwallet-v1-schema
Jan 7, 2026
Merged

Gaubee merged 1 commit into
mainfrom
fix/btcwallet-v1-schema

Conversation

@Gaubee

@Gaubee Gaubee commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

问题

btcwallet-v1 在 Storybook 中返回空数据,但网络面板显示 API 有正确响应。

根因

walletapi.bfmeta.info 返回 { success: true, result: {...} } 包装格式,但 proxyGet 方法直接用 BlockbookAddressInfoSchema 解析整个响应,未解包 result。

修复

  • 添加 WalletApiWrapperSchema 解包外层
  • proxyGet 优先解包 wrapper,fallback 直接解析(兼容 mempool 等)
  • 更新测试用例覆盖真实 API 响应格式
  • 更新 api-providers-status.md 标记 btcwallet-v1 为正常

验证

  • 单元测试通过
  • Storybook 中 btcwallet-v1 显示正确数据

- Add WalletApiWrapperSchema to handle walletapi.bfmeta.info response format
- Update proxyGet to unwrap result with fallback for direct parsing
- Update tests to use wrapped response format
- Update api-providers-status.md to mark btcwallet-v1 as working
@Gaubee
Gaubee merged commit b25662b into main Jan 7, 2026
5 checks passed
@Gaubee
Gaubee deleted the fix/btcwallet-v1-schema branch January 7, 2026 08:15
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