metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

refactor: the network name and image utils into selectors

Open EtherWizard33 opened this issue 9 months ago • 1 comments

Description

We are replacing calls to the get network name and get network image from utils to use a selector instead.

This way all places referring to it will do so in the same way and all with the same memoization provided by reselect.

Related issues

Fixes:

Manual testing steps

  1. Where the network name and image were used before, the network name and image should still display after, there are about 15 places for each.
  2. Mostly used for the network logos and it's network name used as a fallback letter
  3. Other use cases are plainly to display the network name as text

Screenshots/Recordings

Here is a quick 2 minute overview of this PR:

Before

After

Pre-merge author checklist

  • [x] I’ve followed MetaMask Coding Standards.
  • [ ] I've completed the PR template to the best of my ability
  • [ ] 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.

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.

EtherWizard33 avatar May 17 '24 19:05 EtherWizard33

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.

github-actions[bot] avatar May 17 '24 19:05 github-actions[bot]