From 9ded9da7e3b76ec00dfe32062ce8522d4845c66f Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 1 Feb 2023 15:36:33 +0100 Subject: [PATCH] Fetch unread notification count only for supported notification types (#14923) * Fetch unread notification count only for supported notification types --- src/status_im2/contexts/activity_center/events.cljs | 2 +- .../contexts/activity_center/notification_types.cljs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/status_im2/contexts/activity_center/events.cljs b/src/status_im2/contexts/activity_center/events.cljs index 6b62ee6640..ecc8c14ab7 100644 --- a/src/status_im2/contexts/activity_center/events.cljs +++ b/src/status_im2/contexts/activity_center/events.cljs @@ -366,7 +366,7 @@ {:events [:activity-center.notifications/fetch-unread-count]} [_] {:json-rpc/call [{:method "wakuext_unreadAndAcceptedActivityCenterNotificationsCount" - :params [] + :params [types/all-supported] :on-success #(rf/dispatch [:activity-center.notifications/fetch-unread-count-success %]) :on-error #()}]}) diff --git a/src/status_im2/contexts/activity_center/notification_types.cljs b/src/status_im2/contexts/activity_center/notification_types.cljs index c2049eb111..a598f65cd7 100644 --- a/src/status_im2/contexts/activity_center/notification_types.cljs +++ b/src/status_im2/contexts/activity_center/notification_types.cljs @@ -9,6 +9,15 @@ (def ^:const admin 8) (def ^:const contact-verification 10) +(def ^:const all-supported + #{one-to-one-chat + private-group-chat + mention + reply + contact-request + admin + contact-verification}) + ;; TODO: Replace with correct enum values once status-go implements them. (def ^:const tx 66612) (def ^:const system 66614)