Repository navigation
fix(ecosystem): implement bio_getBalance and resolve miniapp icon URLs - #212
Merged
Merged
Conversation
- Implement actual balance query in bio_getBalance handler using bioforest-sdk - Resolve relative miniapp icon URLs to absolute based on miniapp's base URL - Add TDD tests for bio_getBalance handler with mock dependencies Fixes: miniapp balance shows '0', miniapp icon not rendering in sheets
Fixes race condition where miniapp calls bio_closeSplashScreen before React useEffect runs initBioProvider(). Now handlers are registered at module import time with double-init protection.
- Test Forge miniapp launches without bio_closeSplashScreen error - Test connect button is visible after launch - Skip full authorization test (requires backend API)
The default API URL was pointing to bf-meta.org which returns 404. Fixed to use bfmeta.info which has the recharge/support endpoint.
…ain ID 1. Add BFMCHAIN/BFCHAIN -> bfmeta/bfchain mapping in normalizeChainId 2. Migrate SigningConfirmJob, MiniappTransferConfirmJob, MiniappSignTransactionJob to use MiniappSheetHeader for consistent styling
- Create eslint-plugin-file-component-constraints package - Enforce MiniappSheetHeader usage in Miniapp*.tsx sheet files - Migrate MiniappDestroyConfirmJob to use MiniappSheetHeader - Configure plugin in .oxlintrc.json with jsPlugins
- bio_requestAccounts now passes appName/appIcon to wallet picker - bio_selectAccount now passes appName/appIcon to wallet picker - bio_pickWallet now passes appName/appIcon to wallet picker This fixes the 'unknown DApp' header display in authorization sheets.
…sses - Remove chain switching button from swap step (must go back to re-authorize) - Display full addresses with break-all styling instead of truncated - Update WalletPickerJob comments to document BFMCHAIN support
…straints - Change from relative path to workspace:* dependency - This fixes oxlint failing in subdirectories (miniapps/forge)
Miniapps need this dependency since oxlint may look up parent configs.
Ensures eslint-plugin-file-component-constraints is built before lint runs.
Replace Chinese text queries with data-testid for better test stability.
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.
Summary
修复小程序生态系统的多个问题,采用TDD方法验证。
Changes
1. 实现
bio_getBalance实际余额查询bioforest-sdk的getAccountBalance查询真实余额2. 修复小程序图标URL解析
icon.svg) 现在正确解析为绝对URL3. 修复
bio_closeSplashScreen竞态条件4. 修复 Forge API 配置
bf-meta.org(404) 改为bfmeta.infoTesting
单元测试 (21 passed)
wallet-handlers.test.ts: 9 tests for bio_getBalancebridge.test.ts: 12 tests for permission validationE2E测试 (9 passed)
Files Changed
src/services/ecosystem/handlers/wallet.tssrc/services/ecosystem/bridge.tssrc/services/ecosystem/provider.tsminiapps/forge/src/api/config.tse2e/forge-auth.mock.spec.tssrc/services/ecosystem/__tests__/wallet-handlers.test.ts