Commit ed168cf
## 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 `AccountActivityService` and `BackendWebSocketService`
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
-->
## 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]
> Replaces base-controller messenger with @metamask/messenger across
core-backend services, updates types/exports, tests, dependencies, and
docs with breaking changes noted.
>
> - **Core Backend Services**:
> - Migrate `AccountActivityService` and `BackendWebSocketService` to
`@metamask/messenger` (`Messenger`) replacing `RestrictedMessenger`.
> - Update messenger wiring: new root/child messengers, `delegate`,
`publish/subscribe/call` usage; adjust connection, subscription, and
event handling accordingly.
> - Refactor tests to use new messenger APIs and types.
> - **API/Types (BREAKING)**:
> - Remove controller-messenger-specific exported aliases/constants:
`BackendWebSocketServiceAllowedActions/Events`,
`AccountActivityServiceAllowedActions/Events`,
`ACCOUNT_ACTIVITY_SERVICE_ALLOWED_ACTIONS/ EVENTS`.
> - Rename metadata property `anonymous` to `includeInDebugSnapshot`.
> - **Dependencies/Build**:
> - Remove `@metamask/base-controller`; add `@metamask/messenger` and
reference in `tsconfig`.
> - Bump `@metamask/profile-sync-controller` to `^25.1.2`.
> - **Docs**:
> - Update README dependency graph: `core_backend --> messenger`; add
`eip_7702_internal_rpc_middleware --> controller_utils`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1eef1b3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Michele Esposito <michele@esposito.codes>
1 parent ce4c907 commit ed168cf
File tree
11 files changed
+163
-86
lines changed- packages/core-backend
- src
11 files changed
+163
-86
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | 213 | | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
12 | 22 | | |
13 | 23 | | |
14 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
Lines changed: 83 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
14 | | - | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
| |||
48 | 60 | | |
49 | 61 | | |
50 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
51 | 74 | | |
52 | 75 | | |
53 | 76 | | |
54 | 77 | | |
55 | 78 | | |
56 | 79 | | |
57 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
58 | 95 | | |
59 | 96 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
70 | 127 | | |
71 | 128 | | |
72 | 129 | | |
| |||
215 | 272 | | |
216 | 273 | | |
217 | 274 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 275 | + | |
222 | 276 | | |
223 | 277 | | |
224 | 278 | | |
| |||
633 | 687 | | |
634 | 688 | | |
635 | 689 | | |
636 | | - | |
| 690 | + | |
637 | 691 | | |
638 | 692 | | |
639 | 693 | | |
| |||
667 | 721 | | |
668 | 722 | | |
669 | 723 | | |
670 | | - | |
| 724 | + | |
671 | 725 | | |
672 | 726 | | |
673 | 727 | | |
| |||
718 | 772 | | |
719 | 773 | | |
720 | 774 | | |
721 | | - | |
| 775 | + | |
722 | 776 | | |
723 | 777 | | |
724 | 778 | | |
| |||
748 | 802 | | |
749 | 803 | | |
750 | 804 | | |
751 | | - | |
| 805 | + | |
752 | 806 | | |
753 | 807 | | |
754 | 808 | | |
| |||
770 | 824 | | |
771 | 825 | | |
772 | 826 | | |
773 | | - | |
| 827 | + | |
774 | 828 | | |
775 | 829 | | |
776 | 830 | | |
| |||
810 | 864 | | |
811 | 865 | | |
812 | 866 | | |
813 | | - | |
| 867 | + | |
814 | 868 | | |
815 | 869 | | |
816 | 870 | | |
| |||
848 | 902 | | |
849 | 903 | | |
850 | 904 | | |
851 | | - | |
| 905 | + | |
852 | 906 | | |
853 | 907 | | |
854 | 908 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 143 | + | |
| 144 | + | |
147 | 145 | | |
148 | 146 | | |
149 | 147 | | |
| |||
Lines changed: 47 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
2 | 8 | | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
23 | 37 | | |
24 | 38 | | |
25 | 39 | | |
| |||
163 | 177 | | |
164 | 178 | | |
165 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
166 | 191 | | |
167 | 192 | | |
168 | 193 | | |
| |||
171 | 196 | | |
172 | 197 | | |
173 | 198 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
182 | 212 | | |
183 | 213 | | |
184 | 214 | | |
185 | 215 | | |
186 | | - | |
| 216 | + | |
| 217 | + | |
187 | 218 | | |
188 | 219 | | |
189 | 220 | | |
| |||
252 | 283 | | |
253 | 284 | | |
254 | 285 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 286 | + | |
259 | 287 | | |
260 | 288 | | |
261 | 289 | | |
| |||
270 | 298 | | |
271 | 299 | | |
272 | 300 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 301 | + | |
277 | 302 | | |
278 | 303 | | |
279 | 304 | | |
| |||
0 commit comments