-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
fix: Migrate AbstractMessageManager
from BaseControllerV1
to BaseControllerV2
#5103
fix: Migrate AbstractMessageManager
from BaseControllerV1
to BaseControllerV2
#5103
Conversation
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
fb4b210
to
b901514
Compare
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
This also closes one of the items in #1509. |
## Explanation <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> New RC for the `284.0.0` ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## 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/[email protected]` #### Changed - **BREAKING:** Base class of `DecryptMessageManager` and `EncryptionPublicKeyManager`(`AbstractMessageManager`) now expects new options to initialise ([#5103](#5103)) - Bump `@metamask/base-controller` from `^7.0.0` to `^7.1.0` ([#5079](#5079)) #### Removed - **BREAKING:** Removed internal event emitter (`hub` property) from `AbstractMessageManager` ([#5103](#5103)) - **BREAKING:** `unapprovedMessage` and `updateBadge` removed from internal events. These events are now emitted from messaging system ([#5103](#5103)) - Controllers should now listen to `DerivedManagerName:X` event instead of using internal event emitter. ### `@metamask/[email protected]` #### Changed - Bump `@metamask/eth-snap-keyring` from `^8.0.0` to `^8.1.0` ([#5167](#5167)) ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes --------- Co-authored-by: Charly Chevalier <[email protected]>
Explanation
This PR aims to remove
BaseControllerV1
usage fromAbstractMessageManager
. As expected this change affected bothDecryptMessageManager
(DMM
) andEncryptionPublicKeyManager
(EPKM
).Since extension already have wrapper classes for both
DMM
&EPKM
in the extension code, we want to keep changes minimal and make these both classes in the core work like controller but let wrappers sync the state in their classes as we currently do. You can find the extension PR in the references below.References
DecryptMessageManager
EncryptMessageManager
to extend controllers metamask-extension#29237Changelog
@metamask/message-manager
DecryptMessageManager
andEncryptionPublicKeyManager
(AbstractMessageManager
) now expects new options to initialisehub
property) fromAbstractMessageManager
unapprovedMessage
andupdateBadge
removed from internal events. These events are now emitted from messaging systemDerivedManagerName:X
event instead of using internal event emitter.Checklist