Skip to content

Commit

Permalink
fix action and move publish event call to outside of the update function
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalik88 committed Oct 21, 2024
1 parent d75a971 commit 0652d29
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
);
}
}
}

0 comments on commit 0652d29

Please sign in to comment.