Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use correct selector to pull name from non-popular networks #29121

Merged
merged 7 commits into from
Dec 12, 2024

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Dec 12, 2024

Description

On token-list-item, we were using the wrong selector to select the network configuration, which included the network name needed for the fallback icon of non-popular networks.

getNetworkConfigurationsByChainId returns chainId => networkConfiguration mapping, while getNetworkConfigurationIdByChainId returns a chainId => string mapping, which could be a networkId (random UUID string)

This broke the fallback behavior, as we would render the first letter of the uuid, rather than the first letter of the network name.

Open in GitHub Codespaces

Related issues

Fixes: Incorrect network logo fallback letter

Manual testing steps

  1. Add Base Sepolia as custom network: https://chainlist.org/chain/84532
  2. Verify that the fallback image on main token-list and token-detail page is B and matches the network picker.

Screenshots/Recordings

Before
Screenshot 2024-12-11 at 5 29 02 PM

After
Screenshot 2024-12-11 at 5 28 21 PM

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.

Copy link
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.

@gambinish gambinish marked this pull request as ready for review December 12, 2024 02:21
@gambinish gambinish requested a review from a team as a code owner December 12, 2024 02:21
@metamaskbot
Copy link
Collaborator

Builds ready [0f5f974]
Page Load Metrics (1631 ± 57 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14371891163611555
domContentLoaded14191882159610550
load14291894163111957
domInteractive257440136
backgroundConnect9143373316
firstReactRender16101523517
getState583242713
initialActions01000
loadScripts1043145912088943
setupStore66215178
uiStartup168325951999272131
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 196 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [563dfa0]
Page Load Metrics (1519 ± 55 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint21518651402404194
domContentLoaded13831817148810651
load13921865151911455
domInteractive228040199
backgroundConnect7128303014
firstReactRender1585322411
getState486202311
initialActions01000
loadScripts9931398111110048
setupStore68314199
uiStartup15372269181719995
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 233 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [946db0d]
Page Load Metrics (1676 ± 70 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint25920531598340163
domContentLoaded14542036165214469
load14622052167614670
domInteractive2410644209
backgroundConnect977252010
firstReactRender1684452813
getState55413168
initialActions00000
loadScripts10451556121911957
setupStore65713147
uiStartup16622240190915876
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 218 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@salimtb
Copy link
Contributor

salimtb commented Dec 12, 2024

LGTM , tested and approved

@gambinish gambinish added this pull request to the merge queue Dec 12, 2024
Merged via the queue into main with commit 4b48ee6 Dec 12, 2024
77 checks passed
@gambinish gambinish deleted the fix/avatar-network-fallback branch December 12, 2024 17:04
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2024
@metamaskbot metamaskbot added the release-12.10.1 Issue or pull request that will be included in release 12.10.1 label Dec 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.10.1 Issue or pull request that will be included in release 12.10.1 team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants