Skip to content

feat: hardcode svg network#22643

Merged
salimtb merged 1 commit intodevelopfrom
MMASSETS-129
Jan 25, 2024
Merged

feat: hardcode svg network#22643
salimtb merged 1 commit intodevelopfrom
MMASSETS-129

Conversation

@salimtb
Copy link
Copy Markdown
Contributor

@salimtb salimtb commented Jan 23, 2024

Description

hardcode a mapping of chainIDs to currency symbol, once the svg are uploaded we mapped the images to the network name and chainIDs

Acceptance criteria
When the network list is displayed within the Select a network modal, or custom network list, or any similar context, the hardcoded network image avatars should be displayed. This will reduce the often appearing "?" that appears when the network avatar is not present.

Related issues

Fixes: #1813

Manual testing steps

  1. Go to the network modal
  2. Add a new network displayed on this list
  3. check if the image is displayed

Screenshots/Recordings

Before

before.mov

After

after.mov

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • 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.

@salimtb salimtb requested a review from a team as a code owner January 23, 2024 16:23
@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.

@salimtb salimtb marked this pull request as draft January 23, 2024 16:24
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [8737055]
Page Load Metrics (752 ± 18 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint90140109126
domContentLoaded9201431
load6728167523718
domInteractive9201431
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 4.34 KiB (0.08%)

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c6d6946) 67.90% compared to head (8737055) 67.93%.
Report is 154 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #22643      +/-   ##
===========================================
+ Coverage    67.90%   67.93%   +0.03%     
===========================================
  Files         1071     1071              
  Lines        41378    41422      +44     
  Branches     11112    11112              
===========================================
+ Hits         28096    28140      +44     
  Misses       13282    13282              

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

@salimtb salimtb marked this pull request as ready for review January 24, 2024 10:56
@salimtb salimtb self-assigned this Jan 24, 2024
Copy link
Copy Markdown
Contributor

@garrettbear garrettbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whew, a lot of files to review on that one 😅

Ideally would have broken this PR out into maybe a few different PRs, but looks great!

@salimtb salimtb merged commit d3d67d5 into develop Jan 25, 2024
@salimtb salimtb deleted the MMASSETS-129 branch January 25, 2024 13:55
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
@metamaskbot metamaskbot added the release-11.10.0 Issue or pull request that will be included in release 11.10.0 label Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.10.0 Issue or pull request that will be included in release 11.10.0 team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants