MetaMask / MetaMask/core

[base-controller] Make `metadata` a static property

Open
#7,633 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

team-core-platform
Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

The `BaseController` API has a `metadata` instance property, but we almost always know the metadata statically (the one exception to this, `ComposableController`, is planned for deletion). We can make this a static property instead.

This would make it easier to setup state listeners/handlers programmatically before controller construction in the client repositories.

Contributor guide

No contributing guide indexed for this repository

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 by locating BaseController and its metadata property, then inspect the planned exception, ComposableController, and the client-repository state listener setup described in the issue. Update the API so metadata is static and verify that listeners or handlers can be configured before controller construction without breaking the existing controller usage.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.