Skip to content

fix: fall back to client map when icon cannot be found - #45437

Draft
n3ps wants to merge 2 commits into
mainfrom
n3ps/avatar-cdn-onerror-fallback
Draft

fix: fall back to client map when icon cannot be found#45437
n3ps wants to merge 2 commits into
mainfrom
n3ps/avatar-cdn-onerror-fallback

Conversation

@n3ps

@n3ps n3ps commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

Some custom networks (e.g. Chiliz) do not have icons in the CDN. This PR adds onError handling for native assetIds, fall back to a local mapping.

Depends on MetaMask/core#9833

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Related: MetaMask/core#9833

Manual testing steps

  1. With core#9833 (or equivalent) producing eip155:88888/erc20:0x000…000 for Chiliz natives, open Activity on Chiliz.
  2. Confirm the chili icon appears after the CDN miss (may briefly flash ?).
  3. Confirm a random ERC-20 with a missing CDN icon still shows ?, not the chain native image.

Screenshots/Recordings

Before

N/A

After

N/A

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Made with Cursor

@n3ps
n3ps deployed to pr-comment August 12, 2026 03:41 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamask-ci metamask-ci Bot added the team-core-extension-ux Core Extension UX team label Aug 12, 2026
@n3ps n3ps changed the title fix: fall back to local native icons when Activity CDN 404s fix: fall back to local native icons when icon cannot be found Aug 12, 2026
@n3ps n3ps changed the title fix: fall back to local native icons when icon cannot be found fix: fall back to client map when icon cannot be found Aug 12, 2026
@n3ps
n3ps marked this pull request as ready for review August 12, 2026 04:03
@n3ps
n3ps deployed to pr-comment August 12, 2026 04:03 — with GitHub Actions Active
@n3ps
n3ps enabled auto-merge August 12, 2026 04:03
@n3ps
n3ps marked this pull request as draft August 12, 2026 04:03
auto-merge was automatically disabled August 12, 2026 04:03

Pull request was converted to draft

@n3ps
n3ps deployed to pr-comment August 12, 2026 04:04 — with GitHub Actions Active
@sonarqubecloud

Copy link
Copy Markdown

@n3ps
n3ps deployed to pr-comment August 12, 2026 04:30 — with GitHub Actions Active
@metamask-ci

metamask-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
Builds ready [36ca0e3]
⚡ Performance Benchmarks (Total: 🟢 12 pass · 🟡 12 warn · 🔴 0 fail)

Baseline (latest main): 171ed20 | Date: 7/28/2026 | Pipeline: 31562057502 | Baseline logs

Interaction Benchmarks · Samples: 5
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 load_new_account
confirmTx
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/inp: -17%
  • loadNewAccount/fcp: -13%
  • loadNewAccount/lcp: -18%
  • confirmTx/longTaskTotalDuration: -29%
  • confirmTx/longTaskMaxDuration: +12%
  • confirmTx/tbt: -51%
  • confirmTx/lcp: +807%
  • bridgeUserActions/bridge_load_page: -10%
  • bridgeUserActions/bridge_load_asset_picker: +27%
  • bridgeUserActions/longTaskCount: -100%
  • bridgeUserActions/longTaskTotalDuration: -100%
  • bridgeUserActions/longTaskMaxDuration: -100%
  • bridgeUserActions/tbt: -100%
  • bridgeUserActions/fcp: -15%
  • bridgeUserActions/lcp: -13%
  • loadNewAccount/load_new_account: +22%
  • loadNewAccount/total: +22%
  • loadNewAccount/inp: -17%
  • loadNewAccount/fcp: -46%
  • loadNewAccount/lcp: +1411%
  • confirmTx/longTaskCount: -100%
  • confirmTx/longTaskTotalDuration: -100%
  • confirmTx/longTaskMaxDuration: -100%
  • confirmTx/tbt: -100%
  • confirmTx/inp: -32%
  • confirmTx/fcp: -59%
  • confirmTx/lcp: +1543%
  • bridgeUserActions/bridge_load_page: +213%
  • bridgeUserActions/bridge_load_asset_picker: +70%
  • bridgeUserActions/bridge_search_token: -10%
  • bridgeUserActions/longTaskCount: -100%
  • bridgeUserActions/longTaskTotalDuration: -100%
  • bridgeUserActions/longTaskMaxDuration: -100%
  • bridgeUserActions/tbt: -100%
  • bridgeUserActions/total: +21%
  • bridgeUserActions/inp: -23%
  • bridgeUserActions/lcp: +1144%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/LCP: p75 2.6s
  • 🟡 confirmTx/LCP: p75 2.8s
  • 🟡 bridgeUserActions/FCP: p75 1.9s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 loadScripts
startupPowerUserHome
[Sentry log · main/release]
🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/firstPaint: +12%
  • startupStandardHome/firstReactRender: -99%
  • startupStandardHome/numNetworkReqs: -17%
  • startupStandardHome/domInteractive: +11%
  • startupStandardHome/backgroundConnect: +14%
  • startupStandardHome/firstReactRender: -98%
  • startupStandardHome/setupStore: +13%
  • startupStandardHome/numNetworkReqs: -13%
  • startupPowerUserHome/load: +17%
  • startupPowerUserHome/domContentLoaded: +17%
  • startupPowerUserHome/domInteractive: +11%
  • startupPowerUserHome/backgroundConnect: +16%
  • startupPowerUserHome/firstReactRender: -99%
  • startupPowerUserHome/initialActions: +11%
  • startupPowerUserHome/loadScripts: +14%
  • startupPowerUserHome/setupStore: +295%
  • startupPowerUserHome/fcp: +12%
  • startupPowerUserHome/lcp: +19%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 startupPowerUserHome/LCP: p75 3.4s
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟡 [CI log]
🟡 total
🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 total
assetDetails
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 assetClickToPriceChart
importSrpHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
sendTransactions
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
swap
[Sentry log · main/release]
🟡 [CI log]
🟡 total
🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -11%
  • onboardingImportWallet/confirmSrpToPwForm: -16%
  • onboardingImportWallet/pwFormToMetricsScreen: -15%
  • onboardingImportWallet/metricsToWalletReadyScreen: -28%
  • onboardingImportWallet/doneButtonToHomeScreen: -92%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: -56%
  • onboardingImportWallet/longTaskCount: -86%
  • onboardingImportWallet/longTaskTotalDuration: -96%
  • onboardingImportWallet/longTaskMaxDuration: -92%
  • onboardingImportWallet/tbt: -100%
  • onboardingImportWallet/total: -82%
  • onboardingNewWallet/skipBackupToMetricsScreen: -11%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -16%
  • onboardingNewWallet/doneButtonToAssetList: -73%
  • onboardingNewWallet/longTaskCount: -38%
  • onboardingNewWallet/longTaskTotalDuration: -58%
  • onboardingNewWallet/longTaskMaxDuration: -39%
  • onboardingNewWallet/tbt: -85%
  • onboardingNewWallet/total: -70%
  • solanaAssetDetails/assetClickToPriceChart: +216%
  • solanaAssetDetails/longTaskCount: -100%
  • solanaAssetDetails/longTaskTotalDuration: -100%
  • solanaAssetDetails/longTaskMaxDuration: -100%
  • solanaAssetDetails/tbt: -100%
  • solanaAssetDetails/total: +216%
  • importSrpHome/loginToHomeScreen: -23%
  • importSrpHome/homeAfterImportWithNewWallet: -24%
  • importSrpHome/longTaskCount: -58%
  • importSrpHome/longTaskTotalDuration: -54%
  • importSrpHome/longTaskMaxDuration: -43%
  • importSrpHome/tbt: -68%
  • importSrpHome/total: -23%
  • importSrpHome/inp: -43%
  • importSrpHome/fcp: -14%
  • importSrpHome/lcp: -13%
  • importSrpHome/cls: +484%
  • sendTransactions/selectTokenToSendFormLoaded: +26%
  • sendTransactions/reviewTransactionToConfirmationPage: -97%
  • sendTransactions/longTaskCount: -100%
  • sendTransactions/longTaskTotalDuration: -100%
  • sendTransactions/longTaskMaxDuration: -100%
  • sendTransactions/tbt: -100%
  • sendTransactions/total: -93%
  • sendTransactions/inp: -19%
  • sendTransactions/fcp: +13%
  • sendTransactions/lcp: -61%
  • sendTransactions/cls: +171%
  • swap/openSwapPageFromHome: +199%
  • swap/fetchAndDisplaySwapQuotes: +139%
  • swap/longTaskCount: +167%
  • swap/longTaskTotalDuration: +108%
  • swap/longTaskMaxDuration: +31%
  • swap/tbt: +26%
  • swap/total: +144%
  • swap/lcp: -71%
  • swap/cls: -92%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 sendTransactions/FCP: p75 1.9s
  • 🟡 swap/FCP: p75 1.9s
  • 🟡 solanaAssetDetails/FCP: p75 2.0s
  • 🔴 sendTransactions/INP: p75 744ms
  • 🟡 sendTransactions/FCP: p75 2.0s
  • 🔴 swap/INP: p75 784ms
  • 🟡 swap/FCP: p75 1.8s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • dappPageLoad/pageLoadTime: -57%
  • dappPageLoad/firstPaint: -41%
  • dappPageLoad/firstContentfulPaint: -41%
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 105 Bytes (0%)
  • ui: 1.64 KiB (0.01%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 0 Bytes (0%)
  • zip: 1021 Bytes (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-M team-core-extension-ux Core Extension UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant