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

refactor: the network name and image utils into selectors #9678

Closed

Conversation

EtherWizard33
Copy link
Contributor

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

  • 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 and others added 24 commits May 15, 2024 10:39
…Asset and ApproveTransactionHeader components
refactor: use new selector instead of utils to get the networkImageSource
… to the snapshot that was unnexpectedly changed
…ing the util, reverting the change to use selector in this component
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.

@EtherWizard33 EtherWizard33 marked this pull request as ready for review May 17, 2024 20:18
@EtherWizard33 EtherWizard33 requested review from a team as code owners May 17, 2024 20:18
@EtherWizard33 EtherWizard33 deleted the refactor/network-name-util-into-a-selector-4 branch May 30, 2024 17:44
@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant