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
refactor: migrate {AbstractMessage,DecryptMessage,EncryptionPublicKey}Manager to @metamask/messenger (#6545)
## 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?
-->
This PR migrates `AbstractMessageManager`, `EncryptionPublicKeyManager`
and `DecryptMessageManager` to the new `@metamask/messenger` message
bus, as opposed to the one exported from `@metamask/base-controller`.
## 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
-->
* Related to #5626
## 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 communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Migrates `AbstractMessageManager`, `DecryptMessageManager`, and
`EncryptionPublicKeyManager` to the new `@metamask/messenger` API,
updating types/events and wiring, and adds the messenger dependency.
>
> - **Message Manager (breaking)**
> - Switch from `RestrictedMessenger` (`@metamask/base-controller`) to
`Messenger` (`@metamask/messenger`) across `AbstractMessageManager`,
`DecryptMessageManager`, and `EncryptionPublicKeyManager`.
> - Update publish calls to use `this.messenger.publish` and rework
action/event typings (`ControllerGetStateAction`,
`ControllerStateChangeEvent`).
> - Adjust state metadata keys (`anonymous` → `includeInDebugSnapshot`).
> - **Tests**
> - Update mocks and types to use `Messenger` and new metadata flag.
> - **Configs/Dependencies**
> - Add `@metamask/messenger` dependency and TypeScript project
references.
> - Update README dependency graph to show `message_manager` →
`messenger` and add new edge for `eip-7702-internal-rpc-middleware`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c9835ae. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Michele Esposito <[email protected]>
Co-authored-by: Michele Esposito <[email protected]>
Copy file name to clipboardExpand all lines: packages/message-manager/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Changed
11
+
12
+
-**BREAKING:** Use new `Messenger` from `@metamask/messenger` ([#6545](https://github.com/MetaMask/core/pull/6545))
13
+
- Previously, `AbstractMessageManager`, `DecryptMessageManager` and `EncryptionPublicKeyManager` accepted a `RestrictedMessenger` instance from `@metamask/base-controller`.
0 commit comments