-
Notifications
You must be signed in to change notification settings - Fork 5k
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
UX: Show Network Logo Based on Chain ID #20895
Conversation
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. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #20895 +/- ##
========================================
Coverage 68.17% 68.17%
========================================
Files 998 998
Lines 39963 39965 +2
Branches 10684 10686 +2
========================================
+ Hits 27242 27244 +2
Misses 12721 12721
☔ View full report in Codecov by Sentry. |
Builds ready [8815613]
Page Load Metrics (1396 ± 14 ms)
Bundle size diffs
|
I tested this using https://app.uniswap.org, and most screens showed the logo correctly, but this one did not |
@HowardBraham ...could you try again? Optimism worked for me the first time, then I deleted that network, re-added it via Uniswap, and the icon displayed as it should |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Builds ready [27a8525]
Page Load Metrics (1823 ± 64 ms)
Bundle size diffs
|
@darkwing I tested it again on Firefox with a brand-new clean version of the Extension, no history. |
@HowardBraham I think we should consider that a separate bug, not only because the image is wrong, but also it states that "ETH" is the native currency of Optimism, etc. |
Filed new issue here: #20934 |
Explanation
Adding a network from within MetaMask (the 'Add Network' functionality within 'Settings') properly provides a
{network}.rpcPrefs.imageUrl
so that networks in the following areas show the correct network icon:The problem is that adding a network from a dapp (example: adding a network via Uniswap) doesn't always mean they provide an
imageUrl
.This PR updates the
getNonTestNetworks
selector so that it provides animageURL
or falls back to providing known network icons based on chain ID.Screenshots/Screencaps
After
Manual Testing Steps
imageUrl
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.