diff --git a/packages/notification-services-controller/src/NotificationServicesController/NotificationServicesController.ts b/packages/notification-services-controller/src/NotificationServicesController/NotificationServicesController.ts index 34b65bb136..a9b6c38b81 100644 --- a/packages/notification-services-controller/src/NotificationServicesController/NotificationServicesController.ts +++ b/packages/notification-services-controller/src/NotificationServicesController/NotificationServicesController.ts @@ -577,7 +577,7 @@ export default class NotificationServicesController extends BaseController< #registerMessageHandlers(): void { this.messagingSystem.registerActionHandler( `${controllerName}:updateMetamaskNotificationsList`, - this.updateMetamaskNotificationsList.bind(this), + async (...args) => this.updateMetamaskNotificationsList(...args), ); this.messagingSystem.registerActionHandler( @@ -1375,12 +1375,13 @@ export default class NotificationServicesController extends BaseController< processedNotification, ...state.metamaskNotificationsList, ]; - this.messagingSystem.publish( - `${controllerName}:notificationsListUpdated`, - state.metamaskNotificationsList, - ); } }); + + this.messagingSystem.publish( + `${controllerName}:notificationsListUpdated`, + this.state.metamaskNotificationsList, + ); } } }