MetaMask / MetaMask/metamask-mobile
Remove all unnecessary deep equal selectors
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
### What is this about?
Since we have mobile controllers using base controller v2! We can finally be confident on removing the deep equal selectors that are returning controllers state, since now that state is ummutable!
An example of that would be this [selector](https://github.com/MetaMask/metamask-mobile/blob/9db299335cb2d588d8d5165c03c0a8bf242cf78a/app/selectors/transactionController.ts#L14)
The goal of this task is to optimize the way we fetch data from the redux state, and turn it less computational demanding.
### Scenario
_No response_
### Design
_No response_
### Technical Details
_No response_
### Threat Modeling Framework
_No response_
### Acceptance Criteria
_No response_
### Stakeholder review needed before the work gets merged
- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)
### References
_No response_
Contributor guide
Research direction
Start with the example selector in app/selectors/transactionController.ts and inspect how its deep-equality comparison is used with controller state. Then locate other selectors using the same pattern and determine which are safe to simplify now that base controller v2 state is immutable; done means unnecessary comparisons are removed without changing selector results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100