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 #20934 - Show network icon in New Network popover #21016

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

darkwing
Copy link
Contributor

@darkwing darkwing commented Sep 22, 2023

Description

Fixes #20934

This PR ensures the correct network icon displays when switching to a new network like Optimism and Arbitrum. While ETH may be the native currency of each of those networks, the chip image should represent the network.

Manual testing steps

  1. Open the Networks menu and click "Add network"
  2. Add Arbitrum and switch to that network
  3. See the Arbitrum logo in the "You've switched" network circle
  4. Repeat with Optimism

Screenshots/Recordings

Before

image

After

image

Related issues

Fixes #20934

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@darkwing darkwing requested a review from a team as a code owner September 22, 2023 22:28
@darkwing darkwing added team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead needs-ux-ds-review labels Sep 22, 2023
@github-actions
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.

@darkwing darkwing marked this pull request as draft September 22, 2023 22:29
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (f690d9a) 68.35% compared to head (af1a57c) 68.35%.
Report is 12 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #21016      +/-   ##
===========================================
- Coverage    68.35%   68.35%   -0.00%     
===========================================
  Files         1007     1007              
  Lines        40261    40259       -2     
  Branches     10766    10764       -2     
===========================================
- Hits         27519    27517       -2     
  Misses       12742    12742              
Files Coverage Δ
...components/ui/new-network-info/new-network-info.js 81.58% <100.00%> (+0.63%) ⬆️
ui/selectors/selectors.js 86.76% <100.00%> (+0.04%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Collaborator

Builds ready [343633d]
Page Load Metrics (1762 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint881701132110
domContentLoaded711671052311
load15302047176212158
domInteractive711671052311
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 115 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@HowardBraham
Copy link
Contributor

I tested this. It solves the icon problem, but the layout is off.

image

@darkwing
Copy link
Contributor Author

@HowardBraham I noticed that as well, so I put the PR in draft state.

@metamaskbot
Copy link
Collaborator

Builds ready [af1a57c]
Page Load Metrics (1434 ± 26 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint8211490105
domContentLoaded6611485136
load1362160614345526
domInteractive6611485136
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -699 Bytes (-0.01%)
  • common: 0 Bytes (0.00%)

@HowardBraham HowardBraham marked this pull request as ready for review September 27, 2023 17:56
@HowardBraham HowardBraham merged commit d633b97 into develop Sep 27, 2023
9 checks passed
@HowardBraham HowardBraham deleted the new-network-icon branch September 27, 2023 17:57
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2023
@metamaskbot metamaskbot added the release-11.3.0 Issue or pull request that will be included in release 11.3.0 label Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.3.0 Issue or pull request that will be included in release 11.3.0 team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: getNativeCurrency makes Arbitrum, Optimism show incorrect logo
4 participants