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
## 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 all remaining assets controllers to
`@metamask/messenger` instead of `@metamask/base-controller`. This is
part of a larger effort to migrate all controllers to use
`@metamask/messenger`.
## 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 remaining assets controllers and tests from base-controller
RestrictedMessenger to @metamask/messenger, updating metadata flags and
event wiring.
>
> - **Controllers (migration to `@metamask/messenger`)**:
> - `MultichainAssetsController`, `MultichainBalancesController`,
`NftDetectionController`, `RatesController`,
`TokenSearchDiscoveryDataController` now use `Messenger` types and
`this.messenger` for `call/subscribe/publish` (replacing
`RestrictedMessenger`/`messagingSystem`).
> - Update controller-specific messenger types and allowed
actions/events; add namespaced messengers in tests via `delegate`.
> - **Metadata updates**:
> - Switch to `@metamask/base-controller/next` and `StateMetadata`;
replace `anonymous` with `includeInDebugSnapshot` where applicable.
> - **Tests**:
> - Refactor to root messenger + delegated namespaced messengers; update
imports to `/next`; adjust assertions to new metadata flags; minor test
helpers tweaks.
> - **RatesController**:
> - Maintain polling events via `this.messenger.publish` and expose
metadata via `StateMetadata`.
> - **Changelog**:
> - Consolidate BREAKING note: controllers migrated to new `Messenger`
API.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
241e6a0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Mark Stacey <[email protected]>
Copy file name to clipboardExpand all lines: packages/assets-controllers/CHANGELOG.md
+1-10Lines changed: 1 addition & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,16 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
14
14
### Changed
15
15
16
-
-**BREAKING:** Migrate the following controllers to the new `Messenger` from `@metamask/messenger` ([#6444](https://github.com/MetaMask/core/pull/6444))
17
-
-`AccountTrackerController`
18
-
-`CurrencyRateController`
19
-
-`DeFiPositionController`
20
-
-`MultichainAssetsRatesController`
21
-
-`TokenBalancesController`
22
-
-`TokenDetectionController`
23
-
-`TokenListController`
24
-
-`TokenRatesController`
25
-
-**BREAKING:** Migrate `AssetsContractController`, `NftController`, and `TokensController` to new `Messenger` from `@metamask/messenger` ([#6386](https://github.com/MetaMask/core/pull/6386))
16
+
-**BREAKING:** Migrate controllers to new `Messenger` from `@metamask/messenger` ([#6444](https://github.com/MetaMask/core/pull/6444), [#6386](https://github.com/MetaMask/core/pull/6386), [#6745](https://github.com/MetaMask/core/pull/6745))
26
17
- Previously, the controllers accepted a `RestrictedMessenger` instance from `@metamask/base-controller`.
27
18
- Bump `@metamask/polling-controller` from `^14.0.1` to `^14.0.2` ([#6940](https://github.com/MetaMask/core/pull/6940))
0 commit comments