Commit 9ad84cb
authored
feat: Extend notification account toggles to all wallet keyrings (#27254)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
Update **Notifications settings** so the **Account activity** section
lists notification-eligible accounts from all wallet keyrings, not just
the first HD wallet. This is tied to the relevant PRs in MM-core:
- MetaMask/core#8108
- MetaMask/core#8449
Keep the existing per-account toggle behavior unchanged, so imported
accounts use the same enable/disable notification flow as HD accounts.
Add focused test coverage for multi-wallet rendering and update the
settings snapshot accordingly.
<img width="328" height="722" alt="image"
src="https://github.com/user-attachments/assets/b2c296a2-2cb7-4087-b33f-84741a90c3fb"
/>
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: Extend notification account toggles to all wallet
keyrings
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes the account-listing/filtering logic in notification settings
and upgrades the notification services controller, which could affect
which accounts appear and push-link behavior if filtering/messenger
wiring is incorrect.
>
> **Overview**
> Extends **Notification Settings → Account activity** to list
notification-eligible (EVM) accounts across *all* wallets/keyrings,
instead of only the first HD/entropy wallet.
>
> Introduces `useNotificationWalletAccountGroups()` to filter
wallet/account groups down to those containing EVM accounts, updates
`AccountsList` to render per-wallet sections via `SectionList` (skipping
non-EVM groups), and adjusts the settings screen to show/hide the
section based on these filtered groups. Updates and expands unit/UI
tests to cover multi-wallet rendering and empty/no-EVM scenarios, and
refreshes smoke-test notification mocks.
>
> Also updates the notifications controller messenger delegation to
include push link add/delete actions, and bumps
`@metamask/notification-services-controller` to `^23.1.0`.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
9844b6e. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 85dc04e commit 9ad84cb
11 files changed
Lines changed: 322 additions & 87 deletions
File tree
- app
- components/Views/Settings/NotificationsSettings
- core/Engine/messengers/notifications
- tests/smoke/notifications/utils
Lines changed: 117 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
35 | 68 | | |
36 | | - | |
| 69 | + | |
37 | 70 | | |
38 | 71 | | |
39 | 72 | | |
| |||
52 | 85 | | |
53 | 86 | | |
54 | 87 | | |
55 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
56 | 107 | | |
57 | 108 | | |
58 | 109 | | |
59 | | - | |
| 110 | + | |
60 | 111 | | |
61 | 112 | | |
62 | 113 | | |
63 | | - | |
| 114 | + | |
| 115 | + | |
64 | 116 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
68 | 120 | | |
69 | | - | |
70 | | - | |
| 121 | + | |
71 | 122 | | |
72 | 123 | | |
73 | 124 | | |
| |||
94 | 145 | | |
95 | 146 | | |
96 | 147 | | |
97 | | - | |
98 | | - | |
| 148 | + | |
| 149 | + | |
99 | 150 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
104 | 155 | | |
105 | 156 | | |
106 | 157 | | |
| |||
297 | 348 | | |
298 | 349 | | |
299 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
300 | 389 | | |
301 | 390 | | |
302 | 391 | | |
303 | 392 | | |
304 | 393 | | |
305 | 394 | | |
306 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
307 | 399 | | |
308 | 400 | | |
309 | 401 | | |
| |||
318 | 410 | | |
319 | 411 | | |
320 | 412 | | |
321 | | - | |
| 413 | + | |
| 414 | + | |
322 | 415 | | |
323 | 416 | | |
324 | 417 | | |
| |||
327 | 420 | | |
328 | 421 | | |
329 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
330 | 432 | | |
331 | 433 | | |
Lines changed: 28 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
| 85 | + | |
87 | 86 | | |
88 | | - | |
89 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
90 | 111 | | |
91 | | - | |
92 | 112 | | |
93 | 113 | | |
94 | 114 | | |
95 | | - | |
| 115 | + | |
96 | 116 | | |
97 | 117 | | |
98 | 118 | | |
99 | | - | |
| 119 | + | |
100 | 120 | | |
101 | 121 | | |
102 | 122 | | |
0 commit comments