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

feat: ✨ update notification types and tests #4818

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

matteoscurati
Copy link
Contributor

Explanation

This PR introduces a better definition of the notification types described by the NotificationServiceController. The new types allow for the description of the new Web3Notification while maintaining compatibility with the current WalletNotification.​

References

Related to https://consensyssoftware.atlassian.net/browse/NOTIFY-1230?atlOrigin=eyJpIjoiMzYwOGEwNTFhN2IxNGRiMWEwZGU0N2IyNzI0MTExNzgiLCJwIjoiaiJ9

Changelog

@metamask/notification-services-controller

  • CHANGED: Updated the types described in types/on-chain-notification/schema and types/on-chain-notification/on-chain-notification
  • CHANGED: Updated the mock data according to the new types in mock-raw-notifications

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

@matteoscurati matteoscurati added the team-notifications Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications label Oct 18, 2024
@matteoscurati matteoscurati requested a review from a team as a code owner October 18, 2024 09:34
@matteoscurati matteoscurati merged commit 56efd1d into main Oct 18, 2024
116 checks passed
@matteoscurati matteoscurati deleted the feat/new-notification-types branch October 18, 2024 10:50
matteoscurati added a commit that referenced this pull request Oct 22, 2024
## Explanation

This is a RC for v224.0.0. See changelog for more details

@metamask/notification-services-controller:0.10.1

## References

- https://consensyssoftware.atlassian.net/browse/NOTIFY-1230
- https://consensyssoftware.atlassian.net/browse/NOTIFY-1238

## Changelog

```
## [0.11.0]

### Added

- Added support for an optional FCM token parameter for push notifications on mobile platforms, allowing native handling of FCM token creation through the Firebase SDK ([#4823](#4823))

### Changed

- update the types described in `types/on-chain-notification/schema` and `types/on-chain-notification/on-chain-notification` ([#4818](#4818))

  - adds new notifications: aave_v3_health_factor; ens_expiration; lido_staking_rewards; notional_loan_expiration; rocketpool_staking_rewards; spark_fi_health_factor
  - splits Wallet Notifications from Web 3 Notifications

- updated and added new notification mocks ([#4818](#4818))
  - can be accessed through `@metamask/notification-services-controller/notification-services/mocks`

### Fixed

- made `updateMetamaskNotificationsList` function work correctly by making the message handler async and moving the publish call outside of the update function. This ensures the `NotificationServicesController:notificationsListUpdated` event is received by the extension ([#4826](#4826))
```

## 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 highlighted breaking changes using the "BREAKING" category
above as appropriate
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-notifications Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants