MetaMask / MetaMask/metamask-extension

Pass background state to UI without flattening

Open
#7,678 0 comments 0 reactions 1 assignee View on GitHub

@Gudahtt is already working on this.

Since Jan 8, 2021.

area-background area-UI team-extension-platform type-refactor
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

The background state is _flattened_ before being passed to the UI, so that each controller's state is accesisble directly rather than through a key for that controller (e.g. `state.OnboardingController.seedPhraseBackedUp` becomes `state.seedPhraseBackedUp`). This makes it difficult to trace where each piece of state comes from. This is especially difficult given that some state comes from outside of this repo (e.g. `GABA`, `rpc-cap`).

If we pass the background state to the UI without flattening it, it'll be easier to trace where each piece comes from.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.