Skip to content

fix: display TRON chain icon in multi-chain wallet selection view#5574

Open
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1772552150-fix-tron-chain-icon
Open

fix: display TRON chain icon in multi-chain wallet selection view#5574
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin/1772552150-fix-tron-chain-icon

Conversation

@devin-ai-integration
Copy link
Contributor

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 — so AssetController.state.networkImages[namespaceImageIds['tron']] returned undefined.

Fix: Extend fetchNetworkImages() to also pre-fetch all namespace chain images (from namespaceImageIds) alongside the requested network images. Uses Set for deduplication and filters out empty/already-fetched entries.

Changes

  • AssetUtil.ts: Export namespaceImageIds for use by ApiController
  • ApiController.ts: Extend fetchNetworkImages() to collect and pre-fetch namespace image IDs (eip155, solana, bip122, ton, tron) in addition to configured network image IDs
  • ApiController.test.ts: Update assertions to verify specific image IDs are fetched rather than exact call counts
  • AssetUtil.test.ts: Add getChainImage() test coverage for pre-fetched lookup, missing image, and namespaces without image IDs

Key review points

  • All non-empty namespace images are now pre-fetched on initialization (5 additional small blob fetches, deduplicated with configured network images). Verify this is acceptable vs. a more targeted approach.
  • The networkIds as string[] cast after .filter(Boolean) — TypeScript doesn't narrow the type through the filter chain.
  • Verify on the preview deployment that the TRON icon renders correctly in the "Select Chain" view.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Link to Devin session: https://app.devin.ai/sessions/dfc50d86703a42c5ade594e7512a3a0e
Requested by: @magiziz

devin-ai-integration bot and others added 3 commits March 3, 2026 15:37
…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-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot
Copy link

changeset-bot bot commented Mar 3, 2026

⚠️ No Changeset found

Latest commit: 6896f8d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
appkit-demo Ready Ready Preview, Comment Mar 3, 2026 4:06pm
appkit-gallery Ready Ready Preview, Comment Mar 3, 2026 4:06pm
appkit-headless-sample-app Ready Ready Preview, Comment Mar 3, 2026 4:06pm
appkit-laboratory Building Building Preview, Comment Mar 3, 2026 4:06pm
9 Skipped Deployments
Project Deployment Actions Updated (UTC)
appkit-basic-example Ignored Ignored Mar 3, 2026 4:06pm
appkit-basic-sign-client-example Ignored Ignored Mar 3, 2026 4:06pm
appkit-basic-up-example Ignored Ignored Mar 3, 2026 4:06pm
appkit-ethers5-bera Ignored Ignored Mar 3, 2026 4:06pm
appkit-nansen-demo Ignored Ignored Mar 3, 2026 4:06pm
appkit-wagmi-cdn-example Ignored Ignored Mar 3, 2026 4:06pm
ethereum-provider-wagmi-example Ignored Ignored Mar 3, 2026 4:06pm
next-wagmi-solana-bitcoin-example Ignored Ignored Mar 3, 2026 4:06pm
vue-wagmi-example Ignored Ignored Mar 3, 2026 4:06pm

Request Review

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Visual Regression Test Results ✅ Passed

⚠️ 15 visual change(s) detected

Chromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=805
Storybook Preview: https://6493191bf4b10fed8ca7353f-cqaryhwomn.chromatic.com/

👉 Please review the visual changes in Chromatic and accept or reject them.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Warnings
⚠️

🔑 Potential UUID detected in packages/controllers/src/utils/AssetUtil.ts (line 19): ba0ba0cd-17c6-4806-a...

⚠️

🔑 Potential UUID detected in packages/controllers/src/utils/AssetUtil.ts (line 21): a1b58899-f671-4276-6...

⚠️

🔑 Potential UUID detected in packages/controllers/src/utils/AssetUtil.ts (line 25): 0b4838db-0161-4ffe-0...

⚠️

🔑 Potential UUID detected in packages/controllers/src/utils/AssetUtil.ts (line 33): 20f673c0-095e-49b2-0...

⚠️

🔑 Potential UUID detected in packages/controllers/src/utils/AssetUtil.ts (line 35): dd9de794-d4ce-4c94-6...

⚠️

🔑 Potential UUID detected in packages/controllers/tests/utils/AssetUtil.test.ts (line 132): dd9de794-d4ce-4c94-6...

Generated by 🚫 dangerJS against 6896f8d

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

📦 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

@reown/appkit - Main Entry
Size limit:   80 kB
Size:         75.67 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 367 ms   on Snapdragon 410
Total time:   1.9 s
@reown/appkit/react
Size limit:   235 kB
Size:         234.75 kB with all dependencies, minified and gzipped
Loading time: 4.6 s     on slow 3G
Running time: 662 ms    on Snapdragon 410
Total time:   5.3 s
@reown/appkit/vue
Size limit:   80 kB
Size:         75.67 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 295 ms   on Snapdragon 410
Total time:   1.8 s
@reown/appkit-scaffold-ui
Size limit:   220 kB
Size:         214.02 kB with all dependencies, minified and gzipped
Loading time: 4.2 s     on slow 3G
Running time: 534 ms    on Snapdragon 410
Total time:   4.8 s
@reown/appkit-ui
Size limit:   500 kB
Size:         13.16 kB with all dependencies, minified and gzipped
Loading time: 258 ms   on slow 3G
Running time: 120 ms   on Snapdragon 410
Total time:   377 ms

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.63% 39618 / 50382
🔵 Statements 78.63% 39618 / 50382
🔵 Functions 76.36% 4252 / 5568
🔵 Branches 86.7% 9643 / 11122
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/controllers/src/controllers/ApiController.ts 95.05% 96.21% 86.44% 95.05% 122-123, 185, 195-198, 280-281, 540-548, 575, 589, 593, 597, 206
packages/controllers/src/utils/AssetUtil.ts 72.39% 89.39% 66.66% 72.39% 48-49, 63, 68, 85-86, 94, 131-132, 143-144, 158-162, 171-182, 191-202, 211, 222-232, 240-241
Generated in workflow #16956 for commit 6896f8d by the Vitest Coverage Report Action

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.

0 participants