Skip to content

feat: upgrade notification controller to use v2 endpoints #16360

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

Merged

Conversation

Prithpal-Sooriya
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya commented Jun 13, 2025

Description

Upgrades the @metamask/notification-services-controller to use the v2 endpoints.

  • APIs and interactions are much faster.
  • We reduce front end complexity, moving the logic to the backend (better for lower end devices).
  • Backend is source of truth, meaning we are more extensible for adding new networks.

Related issues

Fixes:

Manual testing steps

Test Notification Flows

  1. Enable Notifications
  2. Play with Notification Settings
  3. Create an in-app and push notification

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link

socket-security bot commented Jun 13, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​notification-services-controller@​10.0.0 ⏵ 11.0.097 +110087100 +2100

View full report

@Prithpal-Sooriya Prithpal-Sooriya changed the title Mmassets 890/update notification controller v2 endpoints feat: upgrade notification controller to use v2 endpoints Jun 13, 2025
@Prithpal-Sooriya Prithpal-Sooriya added the Run Smoke E2E Requires smoke E2E testing label Jun 13, 2025
Copy link
Contributor

github-actions bot commented Jun 13, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 6845b96
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e6cea45b-31cb-490e-bd0d-be185bbc51f5

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Prithpal-Sooriya added a commit to MetaMask/core that referenced this pull request Jun 18, 2025
## Explanation

Reduces the number of API calls by 25-33% (cut 1/4 - 1/3 endpoints).
Removes complex encryption and decryption logic from UserStorage. This
took at least 2s on mobile per request!
Enables us to have our notification backend to be the source of truth.
We can now extend notifications easily without as much front-end work.

Test Drive PRs:
- Extension: MetaMask/metamask-extension#33564
- Mobile: MetaMask/metamask-mobile#16360

## References

https://consensyssoftware.atlassian.net/browse/MMASSETS-888

## Changelog

<!--
THIS SECTION IS NO LONGER NEEDED.

The process for updating changelogs has changed. Please consult the
"Updating changelogs" section of the Contributing doc for more.
-->

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] 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
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
@Prithpal-Sooriya Prithpal-Sooriya added Run Smoke E2E Requires smoke E2E testing and removed Run Smoke E2E Requires smoke E2E testing labels Jun 18, 2025
@Prithpal-Sooriya Prithpal-Sooriya marked this pull request as ready for review June 18, 2025 13:21
Copy link
Contributor

github-actions bot commented Jun 18, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 617504b
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/44399d5d-8a39-4627-9252-325de376be40

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

salimtb
salimtb previously approved these changes Jun 18, 2025
@Prithpal-Sooriya Prithpal-Sooriya requested a review from a team as a code owner June 18, 2025 15:47
@Prithpal-Sooriya Prithpal-Sooriya added Run Smoke E2E Requires smoke E2E testing and removed Run Smoke E2E Requires smoke E2E testing labels Jun 18, 2025
Copy link
Contributor

github-actions bot commented Jun 18, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 962f7b2
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8599cfb4-ea13-4b63-988a-45d2852d6252

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Prithpal-Sooriya Prithpal-Sooriya force-pushed the MMASSETS-890/update-notification-controller-v2-endpoints branch from 962f7b2 to 617504b Compare June 18, 2025 17:46
…ETS-890/update-notification-controller-v2-endpoints
@Prithpal-Sooriya Prithpal-Sooriya added Run Smoke E2E Requires smoke E2E testing and removed Run Smoke E2E Requires smoke E2E testing labels Jun 18, 2025
Copy link
Contributor

github-actions bot commented Jun 18, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 22f98b0
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/9e5d45fa-054a-45f4-9e87-c25ccde17a5e

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

Copy link

@Prithpal-Sooriya Prithpal-Sooriya added No QA Needed Apply this label when your PR does not need any QA effort. No E2E Smoke Needed If the PR does not need E2E smoke test run and removed Run Smoke E2E Requires smoke E2E testing labels Jun 18, 2025
@Prithpal-Sooriya
Copy link
Contributor Author

E2E bridging smoke tests are failing due to a portfolio bridge page issue. I am confident that the notification changes are unrelated to this and won't cause any additional e2e failures

@Prithpal-Sooriya Prithpal-Sooriya added this pull request to the merge queue Jun 18, 2025
Merged via the queue into main with commit d40f190 Jun 18, 2025
59 of 65 checks passed
@Prithpal-Sooriya Prithpal-Sooriya deleted the MMASSETS-890/update-notification-controller-v2-endpoints branch June 18, 2025 21:11
@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2025
@metamaskbot metamaskbot added the release-7.50.0 Issue or pull request that will be included in release 7.50.0 label Jun 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No E2E Smoke Needed If the PR does not need E2E smoke test run No QA Needed Apply this label when your PR does not need any QA effort. release-7.50.0 Issue or pull request that will be included in release 7.50.0 team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants