MetaMask / MetaMask/metamask-extension
Replace deprecated `useTokenTracker` hook
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### What is this about?
We now keep track of token balances in the background. The UI token polling performed by the `eth-token-tracker` package is now redundant and should be replaced to simplify the codebase and improve performance.
We've already created a drop-in replacement for the `useTokenTracker` hook, it just hasn't been introduced everywhere yet.
### Scenario
_No response_
### Design
_No response_
### Technical Details
- Replace all uses of the deprecated `ui/hooks/useTokenTracker` hook with the `useTokenTracker` hook in `ui/hooks/useTokenBalances`.
### Threat Modeling Framework
_No response_
### Acceptance Criteria
_No response_
### Stakeholder review needed before the work gets merged
- [x] 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 by searching the repository for uses of ui/hooks/useTokenTracker, then inspect the replacement hook in ui/hooks/useTokenBalances. Update each identified use to the replacement and verify that no deprecated hook usages remain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100