-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Update NotificationServicesController
to accommodate for Snaps Notifications
#4809
Conversation
…ommodate for snaps and updated NotificationServicesController tests
NotificationServicesController
to accommodate for Snaps NotificationsNotificationServicesController
to accommodate for Snaps Notifications & remove NotificationController
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: npm/@metamask/[email protected] |
CODEOWNER reviews are being triggered because I used the latest version of EDIT: Split the bumps into a different PR |
NotificationServicesController
to accommodate for Snaps Notifications & remove NotificationController
NotificationServicesController
to accommodate for Snaps Notifications
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.
Looks good, some initial comments.
I think we can move forward with this after our sync session.
Explanation
NotificationController
solely exists for the purpose of snap notifications. With the revamping of the notifications system, it is best to house all notifications in one place.NotificationServicesController
updateMetamaskNotificationsList
function will be the gateway for snaps to add notifications to the controller.Changelog
@metamask/notification-services-controller
getNotificationsByType
to grab a list of notifications by type.deleteNotificationById
to delete a notification in the controller's state (to be only used by notifications that live in this controller which currently is just snaps).fetchAndUpdateMetamaskNotifications
to grab snaps from state before repopulating with a new list of other notifications.markNotificaftionsAsRead
to account for snaps notifications.updateMetamaskNotificationsList
to assign a processed notification to state instead of the originally passed in notification as theprocessSnapNotification
function adds on extra properties to the raw notification.Checklist