MetaMask / MetaMask/metamask-extension

Refactor "background actions" API into separate module

Open
#15,783 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type-refactor
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

The "background actions" API (aka the "controller API" as we call it in some places) is setup in the getApi method of metamask-controller.js. This is the set of functions that is called by the ui in actions.js.

We should move this API, including all related functions, into a separate module. This would make the API easier to read and maintain, and would dramatically simplify the metamask-controller.js module which is already one of the largest and most complex modules in this project.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the getApi method in metamask-controller.js and trace the background actions called by actions.js, including their related functions. Done means the API and related functions live in a separate module while the UI-facing behavior remains available through actions.js.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.