Skip to content
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

fix: check push notification compatibility before setting up firebase #5069

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

Prithpal-Sooriya
Copy link
Contributor

Explanation

Before we were initialising firebase without checking if the browser has correct setup for it. Thus causing errors logs to be made. (not breaking the app, but still producing errors).

We now do a check to ensure we can initialise firebase.

References

MetaMask/metamask-extension#26173

Changelog

@metamask/notification-services-controller

  • ADDED: getPushAvailability method to check if we can use push notifications.
  • CHANGED: getFirebaseMessaging() now optionally returns null. This is an internal method not exposed outside.
  • CHANGED: unsubscribePushNotifications is not optional. This is internal and not exposed outside module.

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

@Prithpal-Sooriya Prithpal-Sooriya requested a review from a team as a code owner December 16, 2024 14:44
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.

2 participants