-
-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove BaseControllerV1 #5041
Labels
Comments
cryptodev-2s
added a commit
that referenced
this issue
Feb 5, 2025
## Explanation Removes the deprecated `BaseControllerV1` and its associated types and methods, replacing them with the V2 `BaseController`, its derived classes, and helper methods. This is the culmination of work completed over multiple quarters, and represents a major step forward for performative and best practice-compliant state management in our clients. ## References - Closes #5041 - Blocked by #5103 ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> ## `@metamask/base-controller` ### Changed - Widen input parameter for type guard `isBaseController` from `ControllerInstance` to `unknown`. ### Removed - **BREAKING:** Remove class `BaseControllerV1` and type guard `isBaseControllerV1`. - **BREAKING:** Remove types `BaseConfig`, `BaseControllerV1Instance`, `BaseState`, `ConfigConstraintV1`, `Listener`, `StateConstraintV1`, `LegacyControllerStateConstraint`, `ControllerInstance`. ## `@metamask/composable-controller` ### Changed - **BREAKING:** Re-define `ComposableControllerStateConstraint` type using `StateConstraint` instead of `LegacyControllerStateConstraint`. - **BREAKING:** Constrain the `ComposableControllerState` generic argument for the `ComposableController` class using `ComposableControllerStateConstraint` instead of `LegacyComposableControllerStateConstraint`. ## `@metamask/polling-controller` ### Removed - **BREAKING:** Remove `BlockTrackerPollingControllerV1`, `StaticIntervalPollingControllerV1`. ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes --------- Co-authored-by: cryptodev-2s <[email protected]> Co-authored-by: Salah-Eddine Saakoun <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Blocked by https://github.com/MetaMask/MetaMask-planning/issues/3747
Once we have migrated the last BaseControllerV2 work we need to remove the old BaseControllerV1 from the codebase. 🎉
The text was updated successfully, but these errors were encountered: