metamask-mobile
metamask-mobile copied to clipboard
refactor: the network name and image utils into selectors
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
- 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.
- Mostly used for the network logos and it's network name used as a fallback letter
- 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.