Skip to content

Conversation

@Prithpal-Sooriya
Copy link
Contributor

Explanation

Separates out the controller constructor and initialisation. This makes it easier to integrate with the Modular Initialisation approach in extension and mobile.

BREAKING it would now require the controller to explicitly call init after being constructed to be correctly setup. E.g.

const notificationServicesController = ...

// This needs to be done
notificationServicesController.init()

References

Changelog

@metamask/notification-services-controller

  • REMOVED: BREAKING - refactored out the NotificationServicesController constructor initialisation methods. You must explicitly call the .init() method to initialise controller
  • ADDED: init method to initialise NotificationServicesController

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 highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

This requires controller initialiasation to call init()
@Prithpal-Sooriya Prithpal-Sooriya requested a review from a team as a code owner March 19, 2025 16:27
@Prithpal-Sooriya Prithpal-Sooriya enabled auto-merge (squash) March 19, 2025 16:54
@Prithpal-Sooriya Prithpal-Sooriya merged commit 94d55d8 into main Mar 19, 2025
193 checks passed
@Prithpal-Sooriya Prithpal-Sooriya deleted the feat/add-notification-controller-init-methods branch March 19, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants