fix: display TRON chain icon in multi-chain wallet selection view#5574
fix: display TRON chain icon in multi-chain wallet selection view#5574devin-ai-integration[bot] wants to merge 3 commits intomainfrom
Conversation
…vailable Co-Authored-By: Magomed Khamidov <mago.khamidov@gmail.com>
Co-Authored-By: Magomed Khamidov <mago.khamidov@gmail.com>
Co-Authored-By: Magomed Khamidov <mago.khamidov@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
9 Skipped Deployments
|
Visual Regression Test Results ✅ PassedChromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=805 👉 Please review the visual changes in Chromatic and accept or reject them. |
|
📦 Bundle Size Check✅ All bundles are within size limits 📊 View detailed bundle sizes> @reown/appkit-monorepo@1.7.1 size /home/runner/work/appkit/appkit > size-limit |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
Description
Fixes the TRON chain icon not displaying in the
w3m-connecting-multi-chain-view("Select Chain" modal when selecting a multi-chain wallet).Root cause:
fetchNetworkImages()only pre-fetched images for explicitly configured CAIP networks. When TRON is discovered dynamically via adapter detection but isn't in the app's configured networks, its namespace image was never fetched — soAssetController.state.networkImages[namespaceImageIds['tron']]returnedundefined.Fix: Extend
fetchNetworkImages()to also pre-fetch all namespace chain images (fromnamespaceImageIds) alongside the requested network images. UsesSetfor deduplication and filters out empty/already-fetched entries.Changes
AssetUtil.ts: ExportnamespaceImageIdsfor use byApiControllerApiController.ts: ExtendfetchNetworkImages()to collect and pre-fetch namespace image IDs (eip155, solana, bip122, ton, tron) in addition to configured network image IDsApiController.test.ts: Update assertions to verify specific image IDs are fetched rather than exact call countsAssetUtil.test.ts: AddgetChainImage()test coverage for pre-fetched lookup, missing image, and namespaces without image IDsKey review points
networkIds as string[]cast after.filter(Boolean)— TypeScript doesn't narrow the type through the filter chain.Type of change
Checklist
Link to Devin session: https://app.devin.ai/sessions/dfc50d86703a42c5ade594e7512a3a0e
Requested by: @magiziz