All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Debounce
KeyringController:stateChangehandler to reduce redundant notification subscription calls during rapid account syncing (#7980) - Filter out Product Account announcements notifications older than 3 months (#7884)
- Bump
@metamask/controller-utilsfrom^11.18.0to^11.19.0(#7995)
- Upgrade
@metamask/utilsfrom^11.8.1to^11.9.0(#7511) - Move peer dependencies for controller and service packages to direct dependencies (#7209, #7713, #7849)
- The dependencies moved are:
@metamask/keyring-controller(^25.1.0)@metamask/profile-sync-controller(^27.1.0)
- In clients, it is now possible for multiple versions of these packages to exist in the dependency tree.
- For example, this scenario would be valid: a client relies on
@metamask/controller-a1.0.0 and@metamask/controller-b1.0.0, and@metamask/controller-bdepends on@metamask/controller-a1.1.0.
- For example, this scenario would be valid: a client relies on
- Note, however, that the versions specified in the client's
package.jsonalways "win", and you are expected to keep them up to date so as not to break controller and service intercommunication.
- The dependencies moved are:
- Modified background push utilities to handle more edgecases and not throw errors (#7275)
- Bump
@metamask/controller-utilsfrom^11.16.0to^11.18.0(#7534, #7583) - Filter feature announcements older than 3 months (#7884)
- Move notifications networks metadata to backend (#7840)
- BREAKING: Removed the
"./notification-services/ui"subpath export frompackage.json(#7840)- Consumers that import from
@metamask/notification-services-controller/notification-services/uimust switch to network config provided by the backend.
- Consumers that import from
- Remove non-actionable internal
log.errorcalls for expected silent-failure notification paths, while preserving thrown errors where propagation is required (#7885) - Fix
createOnChainTriggersto preserve user preferences on notification re-subscriptions (#7423)- Previously,
isFeatureAnnouncementsEnabledwas unconditionally set totrueon every re-subscription, overriding user preferences - Now, existing preferences are preserved when
isNotificationServicesEnabledis alreadytrue
- Previously,
- Bump
@metamask/controller-utilsfrom^11.15.0to^11.16.0(#7202) - BREAKING: Bump
@metamask/profile-sync-controllerfrom^26.0.0to^27.0.0(#7202) - BREAKING: Bump
@metamask/keyring-controllerfrom^24.0.0to^25.0.0(#7202) - Add optional
envparameter to theNotificationServicesControllerandNotificationServicesPushControllerto support different environments (prd,uat,dev). (#7175)
- BREAKING: Moved Notification API from v2 to v3 (#7102)
- API Endpoint Changes: Updated from
/api/v2/notificationsto/api/v3/notificationsfor listing notifications and marking as read - Request Format: The list notifications endpoint now expects
{ addresses: string[], locale?: string }instead of{ address: string }[] - Response Structure: Notifications now include a
notification_typefield ('on-chain' or 'platform') and nested payload structure- On-chain notifications: data moved from root level to
payload.data - Platform notifications: new type with
templatecontaining localized content (title,body,image_url,cta)
- On-chain notifications: data moved from root level to
- Type System Overhaul:
OnChainRawNotification→NormalisedAPINotification(union of on-chain and platform)UnprocessedOnChainRawNotification→UnprocessedRawNotification- Removed specific DeFi notification types (Aave, ENS, Lido rewards, etc.) - now will be handled generically
- Added
TRIGGER_TYPES.PLATFORMfor platform notifications
- Function Signatures:
getOnChainNotifications()→getAPINotifications()with newlocaleparametergetOnChainNotificationsConfigCached()→getNotificationsApiConfigCached()processOnChainNotification()→processAPINotifications()
- Service Imports: Update imports from
onchain-notificationstoapi-notifications - Auto-expiry: Reduced from 90 days to 30 days for notification auto-expiry
- Locale Support: Added locale parameter to controller constructor for localized server notifications
- API Endpoint Changes: Updated from
- BREAKING: Use new
Messengerfrom@metamask/messenger(#6538)- Previously,
NotificationServicesControllerandNotificationServicesPushControlleraccepted aRestrictedMessengerinstance from@metamask/base-controller.
- Previously,
- BREAKING: Metadata property
anonymousrenamed toincludeInDebugSnapshot(#6538) - BREAKING: Bump
@metamask/keyring-controllerfrom^23.0.0to^24.0.0(#6962) - BREAKING: Bump
@metamask/profile-sync-controllerfrom^25.0.0to^26.0.0(#6962) - Bump
@metamask/base-controllerfrom^8.4.2to^9.0.0(#6962)
- BREAKING: Remove package-level exports of
AllowedActionsandAllowedEventsfromNotificationServicesControllerandNotificationServicesPushController(#6538)
- Bump
@metamask/base-controllerfrom^8.4.1to^8.4.2(#6917)
- Add exported util
isVersionInBoundsto validate version number is in bounds (#6793)
- Bump
@metamask/base-controllerfrom^8.4.0to^8.4.1(#6807) - Bump
@metamask/controller-utilsfrom^11.14.0to^11.14.1(#6807)
- Add max bound version segmentation for feature announcements (#6773)
- Add
extensionMaximumVersionNumberandmobileMaximumVersionNumberproperties to feature announcements
- Add
- Add optional
platformVersionproperty toNotificationServicesControllerFeatureAnnouncementEnvtype (#6568) - Filtering logic to filter feature annonucements by version number (#6568)
- Add package
semver@^7.7.2to handle semver version comparisons for announcement notification filtering (#6568) - Add two new controller state metadata properties:
includeInStateLogsandusedInUi(#6583)
- Bump
@metamask/controller-utilsfrom^11.12.0to^11.14.0(#6620, #6629) - Bump
@metamask/utilsfrom^11.4.2to^11.8.1(#6588, #6708) - Bump
@metamask/base-controllerfrom^8.3.0to^8.4.0(#6632)
- Add
extensionMinimumVersionNumberandmobileMinimumVersionNumberproperties to feature annoucements (#6554)
- Add
sendPerpPlaceOrderNotificationmethod toNotificationServicesController(#6464) - Add
createPerpOrderNotificationfunction to invoke perp notification service (#6464) - Add
perps/schema.tsfile from perp notification OpenAPI types (#6464) - Add exported
OrderInputtype (#6464)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerfrom^24.0.0to^25.0.0(#6558) - Bump
@metamask/base-controllerfrom^8.1.0to^8.3.0(#6355, #6465)
- BREAKING: Bump peer dependency
@metamask/keyring-controllerfrom^22.0.0to^23.0.0(#6345) - BREAKING: Bump peer dependency
@metamask/profile-sync-controllerfrom^23.0.0to^24.0.0(#6345) - Bump
@metamask/base-controllerfrom^8.0.1to^8.1.0(#6284) - Bump
@metamask/controller-utilsfrom^11.11.0to^11.12.0(#6303)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerto^23.0.0(#6213)
- Add
BASEchain to notification UI config inui/constants.ts(#6124)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerto^22.0.0(#6171) - Update push notification utility
getChainSymbolinget-notification-message.tsto use UI constants (#6124)
- BREAKING: Cleanup old config/constants (#6124)
- Remove
NOTIFICATION_CHAINSconstant fromnotification-schema.ts - Remove
CHAIN_SYMBOLSconstant fromnotification-schema.ts - Remove
SUPPORTED_CHAINSconstant fromnotification-schema.ts - Remove
Triggertype fromnotification-schema.ts - Remove
TRIGGERSconstant fromnotification-schema.ts
- Remove
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerto^21.0.0(#6100)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerto^20.0.0(#6071)
- Bump
@metamask/controller-utilsfrom^11.10.0to^11.11.0(#6069)- This upgrade includes performance improvements to checksum hex address normalization
- Bump
@metamask/utilsfrom^11.2.0to^11.4.2(#6054)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerto^19.0.0(#5999)
- SEI network to supported networks for notifications (#5945)
- Added
SEItoNOTIFICATION_CHAINS_IDconstant - Added
Sei Networkto defaultNOTIFICATION_NETWORK_CURRENCY_NAMEconstant - Added
SEIto defaultNOTIFICATION_NETWORK_CURRENCY_SYMBOLconstant - Added SEI block explorer to default
SUPPORTED_NOTIFICATION_BLOCK_EXPLORERSconstant
- Added
-
BREAKING: bump
@metamask/profile-sync-controllerpeer dependency to^18.0.0(#5996) -
BREAKING: Migrated to notification v2 endpoints (#5945)
https://trigger.api.cx.metamask.io/api/v1tohttps://trigger.api.cx.metamask.io/api/v2for managing out notification subscriptionshttps://notification.api.cx.metamask.io/api/v1tohttps://notification.api.cx.metamask.io/api/v2for fetching notifications (in-app notifications)https://push.api.cx.metamask.io/v1tohttps://push.api.cx.metamask.io/v2for subscribing push notifications- Renamed method
updateOnChainTriggersByAccounttoenableAccountsinNotificationServicesController - Renamed method
deleteOnChainTriggersByAccounttodisableAccountsinNotificationServicesController - Deprecated
updateTriggerPushNotificationsfromNotificationServicesPushControllerand will be removed in a subsequent release.
-
Bump
@metamask/controller-utilsto^11.10.0(#5935)
- BREAKING: Migrated to notification v2 endpoints (#5945)
- removed
NotificationServicesPushController:updateTriggerPushNotificationsaction fromNotificationServicesController - removed
UserStorageController:getStorageKeyaction fromNotificationServicesController - removed
UserStorageController:performGetStorageaction fromNotificationServicesController - removed
UserStorageController:performSetStorageaction fromNotificationServicesController - removed UserStorage notification utilities:
initializeUserStorage,cleanUserStorage,traverseUserStorageTriggers,checkAccountsPresence,inferEnabledKinds,getUUIDsForAccount,getAllUUIDs,getUUIDsForKinds,getUUIDsForAccountByKinds,upsertAddressTriggers,upsertTriggerTypeTriggers,toggleUserStorageTriggerStatus.
- removed
- BREAKING: bump
@metamask/profile-sync-controllerpeer dependency to^17.0.0(#5906)
- BREAKING: bump
@metamask/profile-sync-controllerpeer dependency to^16.0.0(#5802) - Bump
@metamask/controller-utilsto^11.9.0(#5812)
- BREAKING: bump
@metamask/keyring-controllerpeer dependency to^22.0.0(#5802) - BREAKING: bump
@metamask/profile-sync-controllerpeer dependency to^15.0.0(#5802) - Bump peer dependency
@metamask/profile-sync-controllerto^14.0.0(#5789)- While
@metamask/profile-sync-controller@14.0.0contains breaking changes for clients, they are not breaking as a peer dependency here as the changes do not impact@metamask/notification-services-controller
- While
- replaced
KeyringController:withKeyringwithKeyringController:getStateto get the first HD keyring for notifications (#5764) - Bump
@metamask/controller-utilsto^11.8.0(#5765)
- BREAKING removed
KeyringController:withKeyringallowed action inNotificationServicesController(#5764)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerto^13.0.0(#5763)
- Bump
@metamask/base-controllerfrom ^8.0.0 to ^8.0.1 (#5722)
- add a check inside the
KeyringController:stateChangesubscription insideNotificationServicesControllerto prevent infinite updates (#5731)- As we invoke a
KeyringController:withKeyringinside theKeyringController:stateChangeevent subscription, we are causing many infinite updates which block other controllers from performing state updates. - We now check the size of keyrings from the
KeyringController:stateChangeto better assume when keyrings have been added
- As we invoke a
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerto^12.0.0(#5644) - Bump
@metamask/controller-utilsto^11.7.0(#5583)
- add guard if
KeyringController:withKeyringfails when called inNotificationServicesController(#5514)
- Bump peer dependency
@metamask/profile-sync-controllerto^11.0.0(#5507)
- BREAKING split
NotificationServiceControllerconstructor and initialization methods (#5504)- Now requires calling
.init()to finalize initialization, making it compatible with the Modular Controller Initialization architecture.
- Now requires calling
- use
withKeyringto get main keyring accounts for enabling notifications (#5459) - add support for fetching shared announcements cross platforms (#5441)
- BREAKING Bump
@metamask/keyring-controllerpeer dependency to^21.0.0(#5439) - BREAKING Bump
@metamask/profile-sync-controllerpeer dependency to^10.0.0(#5439)
- Add support for locales on push notifications (#5392)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to^20.0.0(#5426) - BREAKING: Bump
@metamask/profile-sync-controllerpeer dependency to^9.0.0(#5426)
- added new public methods
enablePushNotificationsanddisablePushNotificationonNotificationServicesController(#5120) - added
isPushEnabledandisUpdatingFCMTokentoNotificationServicesPushControllerstate (#5120) - added
/push-services/websubpath export to make it easier to import web helpers (#5120)
- BREAKING: updated
NotificationServicesPushControllerconstructor config to require a push interface (#5120) - Optimized API calls for creating push notification links (#5358)
- Bump
@metamask/utilsfrom^11.1.0to^11.2.0(#5301)
- only allow hex addresses when creating notifications (#5343)
- Lock conditional checks when initializing accounts inside the
NotificationServicesController(#5323) - Accounts initialize call when the wallet is unlocked (#5323)
- BREAKING: Bump
@metamask/profile-sync-controllerpeer dependency from^7.0.0to^8.0.0(#5318)
- Bump
@metamask/base-controllerfrom^7.1.1to^8.0.0(#5305)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerfrom^6.0.0to^7.0.0(#5292)
- Improve logic & dependencies between profile sync, auth, user storage & notifications (#5275)
- Rename
ControllerMessengertoMessenger(#5242) - Bump @metamask/utils to v11.1.0 (#5223)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerfrom^4.0.0to^5.0.0(#5218)
- Bump
firebasefrom^10.11.0to^11.2.0(#5196)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerfrom^3.0.0to^4.0.0(#5140) - Bump
@metamask/base-controllerfrom^7.0.0to^7.1.0(#5079)
- BREAKING: Bump peer dependency
@metamask/profile-sync-controllerfrom^2.0.0to^3.0.0(#5012) - Bump
@metamask/controller-utilsfrom^11.4.3to^11.4.4(#5012)
- Correct ESM-compatible build so that imports of the following packages that re-export other modules via
export *are no longer corrupted: (#5011)loglevelnock
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency from^18.0.0to^19.0.0(#4195) - BREAKING: Bump
@metamask/profile-sync-controllerpeer dependency from^1.0.0to^2.0.0(#4195)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency from^17.0.0to^18.0.0(#4195) - BREAKING: Bump
@metamask/profile-sync-controllerpeer dependency from^0.9.7to^1.0.0(#4902) - Bump
@metamask/controller-utilsfrom^11.4.2to^11.4.3(#4195)
- chore: Bump
@metamask/utilsfrom^9.1.0to^10.0.0(#4831)
- fix: allow snap notifications to be visible when controller is disabled (#4890)
- Most notification services are switched off when the controller is disabled, but since snaps are "local notifications", they need to be visible irrespective to the controller disabled state.
- Export snap types (#4836)
- fix: add publish event in
deleteNotificationsById(#4836)
- 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)
-
update the types described in
types/on-chain-notification/schemaandtypes/on-chain-notification/on-chain-notification(#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)
- can be accessed through
@metamask/notification-services-controller/notification-services/mocks
- can be accessed through
- made
updateMetamaskNotificationsListfunction work correctly by making the message handler async and moving the publish call outside of the update function. This ensures theNotificationServicesController:notificationsListUpdatedevent is received by the extension (#4826)
- added the ability for the
fetchFeatureAnnouncementNotificationsfunction, within thenotification-services-controller, to fetch draft content from Contentful. This is made possible by passing apreviewTokenparameter (#4790)
- update
createMockNotificationfunctions to provide more realistic data for use in tests and component rendering in Storybook (#4791)
- Add new functions to create mock notifications (#4780)
createMockNotificationAaveV3HealthFactor: this function generates a mock notification related to the health factor of an Aave V3 positioncreateMockNotificationEnsExpiration: this function creates a mock notification for the expiration of an ENS (Ethereum Name Service) domaincreateMockNotificationLidoStakingRewards: this function produces a mock notification for Lido staking rewardscreateMockNotificationNotionalLoanExpiration: this function generates a mock notification for the expiration of a Notional loancreateMockNotificationSparkFiHealthFactor: This function produces a mock notification related to the health factor of a SparkFi position
- Add
resetNotificationsoption during the notification creation flow (#4738)
- Bump
@metamask/keyring-controllerfrom^17.2.1to^17.2.2. (#4731) - Bump
@metamask/profile-sync-controllerfrom^0.9.1to^0.9.2. (#4731)
- Update UI export from MATIC to POL (#4720)
- Bump
@metamask/profile-sync-controllerfrom^0.8.0to^0.8.1([#4722]#4720)
- Bump
@metamask/profile-sync-controllerfrom^0.7.0to^0.8.0(#4712)
- BREAKING use new profile-sync notification settings path hash (#4711)
- changing this path also means the underlying storage hash has changed. But this will align with our existing solutions that are in prod.
- update subpath exports to use new .d.cts definition files. (#4709)
- Bump
@metamask/profile-sync-controllerfrom^0.6.0to^0.7.0(#4710)
- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files (#4648)
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
exportsfield inpackage.jsonlinked to these files. This is an anti-pattern and was rightfully flagged by the "Are the Types Wrong?" tool as "masquerading as CJS". All of the ATTW checks now pass.
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
- Remove chunk files (#4648).
- Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present.
- move contentful as a dev dependency (#4673)
- update polygon symbol from MATIC to POL (#4672)
- Bump
@metamask/profile-sync-controllerfrom^0.4.0to^0.5.0(#4678)
- fix: keep push subscription when wallet is locked (#4653)
- add
NotificationServicesPushController:subscribeToPushNotificationsevent and allowedEvent inNotificationServicesController - add else check to continue to subscribe to push notifications when wallet is locked
- add
- Bump
@metamask/profile-sync-controllerfrom^0.3.0to^0.4.0(#4661)
- passed notification parameter to the
NotificationServicesPushControlleronPushNotificationClickedconfig (#4613) - Define and export new type
NotificationServicesControllerGetStateAction(#4633) - Add and export types
NotificationServicesPushControllerGetStateAction,NotificationServicesPushControllerStateChangeEvent(#4641) - add subpath exports to
@metamask/notification-services-controller(#4604)- add
@metamask/notification-services-controller/notification-servicesexport - add
@metamask/notification-services-controller/push-servicesexport
- add
- add
TypeExternalLinkFields,TypePortfolioLinkFields, andTypeMobileLinkFieldstypes to handle different types of links in feature announcements (#4620)
- Bump
typescriptfrom~5.1.6to~5.2.2(#4584) - Bump
@metamask/profile-sync-controllerfrom^0.2.1to^0.3.0(#4657) - Bump
contentfulfrom^10.3.6to^10.15.0(#4637) - BREAKING: Rename
NotificationServicesPushControllerPushNotificationClickedtype toNotificationServicesPushControllerPushNotificationClickedEvent(#4641) - BREAKING: Narrow
AllowedEventstype forNotificationServicesPushControllerMessengertonever(#4641) - updated
NotificationServicesPushControllerMessengermust allow internal eventNotificationServicesPushControllerStateChangeEvent(#4641) - updated
FeatureAnnouncementRawNotificationDatato include fields for external, portfolio, and mobile links (#4620) - updated
TypeFeatureAnnouncementFieldsto include fields for external, portfolio, and mobile links (#4620) - updated
fetchFeatureAnnouncementNotificationsto handle the new link types and include them in the notification data.
- Replace
getStateaction inNotificationServicesControllerActionswith correctly-definedNotificationServicesControllerGetStateActiontype (#4633) - BREAKING: Fix package-level export for
NotificationServicesPushControllerfrom "NotificationsServicesPushController" to "NotificationsServicesPushController" (#4641) - BREAKING: Replace incorrectly-defined
getStateaction in theActionstype forNotificationServicesPushControllerMessengerwith newNotificationServicesPushControllerGetStateActiontype (#4641) - update subpath exports internal
package.jsonfiles to resolvejest-haste-maperrors (#4650) - removed unnecessary subpath exports (#4650)
- removed
/constants,/services,/processors,/utilssub paths as these are navigable from root.
- removed
- new controller events when notifications list is updated or notifications are read (#4573)
- unlock checks for when controller methods are called (#4569)
- Add and export type
BlockExplorerConfigand objectSUPPORTED_NOTIFICATION_BLOCK_EXPLORERS, which is a collection of block explorers for chains on which notifications are supported (#4552)
- BREAKING: Bump peerDependency
@metamask/profile-sync-controllerfrom^0.1.4to^0.2.0(#4548) - Remove
@metamask/keyring-controllerand@metamask/profile-sync-controllerdependencies #4556- These were listed under
peerDependenciesalready, so they were redundant as dependencies.
- These were listed under
- Upgrade TypeScript version to
~5.0.4and setmoduleResolutionoption toNode16(#3645) - Bump
@metamask/base-controllerfrom^6.0.1to^6.0.2(#4544) - Bump
@metamask/controller-utilsfrom^11.0.1to^11.0.2(#4544)
-
added catch statements in NotificationServicesController to silently fail push notifications (#4536)
-
added checks to see feature announcement environments before fetching announcements (#4530)
- removed retries when fetching announcements and wallet notifications. Clients are to handle retries now. (#4531)
-
export
defaultStateforNotificationServicesControllerandNotificationServicesPushController. (#4441) -
export
NOTIFICATION_CHAINS_IDwhich is a const-asserted version ofNOTIFICATION_CHAINS(#4441) -
export
NOTIFICATION_NETWORK_CURRENCY_NAMEandNOTIFICATION_NETWORK_CURRENCY_SYMBOL. Allows consistent currency names and symbols for supported notification services (#4441) -
add
isPushIntegratedas an optional env property in theNotificationServicesControllerconstructor (defaults to true) (#4441)
NotificationServicesPushController- removed globalselfcalls for mobile compatibility (#4441)
- Initial release