You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ComposableController still inherits from BaseController v1. In order to build a wallet library, we need to make all of our controllers consistent, and that means we need to migrate this controller to BaseController v2.
Please use #1705 (PhishingController) as a recent reference for this type of migration.
The text was updated successfully, but these errors were encountered:
## Explanation
As part of the upcoming core wallet library initiative, we plan to
migrate all controllers to `BaseControllerV2`. This commit upgrades
`ComposableController`.
## References
- Closes#2082
- See #1509
## Changelog
### `@metamask/composable-controller`
## Added
- Add types `ComposableControllerState`,
`ComposableControllerStateChangeEvent`, `ComposableControllerEvents`,
`ComposableControllerMessenger`.
## Changed
- **BREAKING:** `ComposableController` is upgraded to extend
`BaseControllerV2`.
- The constructor now expects an options object with required properties
`controllers` and `messenger` as its only argument.
- `ComposableController` no longer has a `subscribe` method. Instead,
listeners for `ComposableController` events must be registered to the
controller messenger that generated the restricted messenger assigned to
the instance's `messagingSystem` class field.
- Any getters for `ComposableController` state that access the internal
class field directly should be refactored to instead use listeners that
are subscribed to `ComposableControllerStateChangeEvent`.
## 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
---------
Co-authored-by: Ellilot Winkler <[email protected]>
ComposableController still inherits from BaseController v1. In order to build a wallet library, we need to make all of our controllers consistent, and that means we need to migrate this controller to BaseController v2.
Please use #1705 (PhishingController) as a recent reference for this type of migration.
The text was updated successfully, but these errors were encountered: