MetaMask / MetaMask/core

[base-controller,polling-controller] Make non-controller superclass compatible with polling-controller mixins

Open
#4,503 0 comments 0 reactions 0 assignees View on GitHub
enhancement team-wallet-framework wf-wallet-framework
Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

Some of our classes that were previously labeled as controllers have empty state, making them [non-controllers](https://github.com/MetaMask/decisions/blob/main/decisions/core/0001-messaging-non-controllers.md?rgh-link-date=2024-06-21T15%3A43%3A15Z).

As part of Wallet Framework team's Q3 2024 OKRs (O1KR1), we're currently in the process of upgrading these non-controllers to use the messenger pattern without inheriting from `BaseController`.

Some non-controllers have empty state but still use polling patterns (e.g. `TokenDetectionController`). We should define new `PollingController` mixins or extend the existing ones so that they can serve as superclasses for non-controllers as well as controllers.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the linked non-controller decision first, then inspect the existing PollingController mixins and TokenDetectionController. Determine how the polling patterns currently depend on BaseController and define the compatibility boundary. Done means polling mixins can serve non-controllers using the messenger pattern without requiring BaseController.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.