MetaMask / MetaMask/metamask-extension
[State Sync Redesign 3.9] Remove dual-write and `updateMetamaskState` thunk
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
Remove the Redux dispatch path now that all components read from `ControllerStateManager`.
## Steps
1. Remove Redux dispatch from `requestAnimationFrame` batch flush in `ui/index.js`
2. Remove `updateMetamaskState` thunk from `ui/store/actions.ts`
3. Remove `UPDATE_METAMASK_STATE` action constant
4. Remove the `UPDATE_METAMASK_STATE` case from `ui/ducks/metamask/metamask.js`
5. Remove derived action dispatches (`CHAIN_CHANGED`, `ACCOUNT_CHANGED`, etc.)
6. Remove the `sendUpdate` notification handler from `ui/index.js` `onNotification`
## Files
- `ui/index.js`
- `ui/store/actions.ts`
- `ui/store/action-constants.ts`
- `ui/ducks/metamask/metamask.js`
## Dependencies
Issue 3.8 (all `forceUpdateMetamaskState` calls removed), all Issue 3.7 sub-issues complete
## Context
Part of [State Sync Redesign — Epic 3: UI-controller subscriptions].
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ui/index.js and verify the requestAnimationFrame batch flush and onNotification paths named in the issue. Then inspect ui/store/actions.ts, ui/store/action-constants.ts, and ui/ducks/metamask/metamask.js, after confirming Issue 3.8 and all Issue 3.7 sub-issues are complete. Done means the listed Redux and derived action paths, including sendUpdate, are removed without leaving UPDATE_METAMASK_STATE references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, redux, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100