-
-
Notifications
You must be signed in to change notification settings - Fork 267
Feat/integrate notifications controllers #4416
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
Feat/integrate notifications controllers #4416
Conversation
note - we need to ensure types and linting are passing
…:MetaMask/core into feat/integrate-notifications-controllers
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
…chema.ts Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
…chema.ts Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
…otifications-controllers
reorganise logic and controllers into separate folders. Will figure out module exports in a little bit
fix circular deps, tests, types, linting
we pass feature announcement env through the controller config now
fix types, imports, tests, builds, circular deps, and decouple as much as I can from extension.
some stuff was using the old controller name. There are some places that use the older name, but might be a hassle to update
these 2 controllers are heavily tied together and should belong under the same package
…otifications-controllers
for some reason the yarn.lock file got mangled. This mostly reverts it & ensures CI passes
|
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is network access?This module accesses the network. Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use. What is new author?A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package. Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
matteoscurati
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
packages/profile-sync-controller/src/controllers/authentication/services.ts
Outdated
Show resolved
Hide resolved
Jonathansoufer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
this allows mobile and extension to fetch different notifications
52ffa74
this was hardcoded to extension, now supports mobile
…otifications-controllers
Jonathansoufer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
matteoscurati
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Explanation
This adds some core controllers for the notification services that are consumed in both mobile and extension. (Maintained by the notifications team).
Controllers are:
ProfileSyncController- which contains 2 controllers (AuthenticationControllerandUserStorageController)NotificationServicesController- which also contains 2 controllers (NotificationServicesControllerandNotificationsServicesPushController)NOTE - these controllers should be treated as V0.x.x, as they are under development on extension and mobile (iron out any issues).
Previous PR: #4320
(closed this as it was getting to unruly to work in.)
References
Here is a loom recording for the new controllers.
https://www.loom.com/share/4e95a8fcc2ae4d81b737265fc75571c5?sid=8247a832-3f2e-4837-ab74-30c45524ccfe
Future Improvements (as separate PRs)
@metamask/profile-sync-controller/sdk) instead of the global named exports have.Changelog
@metamask/profile-sync-controllerAuthenticationControllerUserStorageController@metamask/notfication-services-controllerNotificationServicesControllerNotificationServicesPushControllerChecklist