From 114e4f278a7f1140062dce2428b7bbdcab876086 Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Fri, 6 Sep 2024 13:41:24 +0530 Subject: [PATCH] review changes 2 --- src/legacy/status_im/data_store/activities.cljs | 1 + src/legacy/status_im/pairing/core.cljs | 2 +- .../shell/activity_center/notification/syncing/view.cljs | 6 +++--- src/status_im/contexts/syncing/events.cljs | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/legacy/status_im/data_store/activities.cljs b/src/legacy/status_im/data_store/activities.cljs index 8ca8865e3ee..fe72a87bc85 100644 --- a/src/legacy/status_im/data_store/activities.cljs +++ b/src/legacy/status_im/data_store/activities.cljs @@ -62,6 +62,7 @@ :chatId :chat-id :contactVerificationStatus :contact-verification-status :communityId :community-id + :installationId :installation-id :membershipStatus :membership-status :albumMessages :album-messages}) (update :last-message #(when % (messages/<-rpc %))) diff --git a/src/legacy/status_im/pairing/core.cljs b/src/legacy/status_im/pairing/core.cljs index 282af4ff977..2eac19659e8 100644 --- a/src/legacy/status_im/pairing/core.cljs +++ b/src/legacy/status_im/pairing/core.cljs @@ -250,7 +250,7 @@ [{:method "wakuext_enableInstallationAndPair" :params [{:installationId (:syncing/installation-id db)}] :js-response true - :on-success #(rf/dispatch [:sanitize-messages-and-process-response %])}]]]}) + :on-success [:sanitize-messages-and-process-response]}]]]}) (rf/defn pair-and-sync {:events [:pairing/pair-and-sync]} diff --git a/src/status_im/contexts/shell/activity_center/notification/syncing/view.cljs b/src/status_im/contexts/shell/activity_center/notification/syncing/view.cljs index 654239150ef..d7d2e758a41 100644 --- a/src/status_im/contexts/shell/activity_center/notification/syncing/view.cljs +++ b/src/status_im/contexts/shell/activity_center/notification/syncing/view.cljs @@ -21,7 +21,7 @@ (defn installation-created-view [{:keys [notification extra-fn]}] - (let [{:keys [installationId read timestamp]} notification + (let [{:keys [installation-id read timestamp]} notification customization-color (rf/sub [:profile/customization-color]) theme (quo.theme/use-theme) more-details (rn/use-callback @@ -30,8 +30,8 @@ {:content (fn [] [new-device-sheet/installation-request-creator-view - installationId])}])) - [installationId])] + installation-id])}])) + [installation-id])] [swipeable {:extra-fn extra-fn} [quo/activity-log {:title (i18n/label :t/sync-your-profile) diff --git a/src/status_im/contexts/syncing/events.cljs b/src/status_im/contexts/syncing/events.cljs index bced4e12563..c1c3dae8176 100644 --- a/src/status_im/contexts/syncing/events.cljs +++ b/src/status_im/contexts/syncing/events.cljs @@ -2,6 +2,7 @@ (:require [clojure.string :as string] [native-module.core :as native-module] + [re-frame.core :as re-frame] [react-native.platform :as platform] [status-im.constants :as constants] [status-im.contexts.profile.config :as profile.config] @@ -50,8 +51,7 @@ :syncing/key-uid key-uid :syncing/installation-id installation-id)}) -(rf/defn clear-syncing-data - {:events [:syncing/clear-syncing-data]} +(defn clear-syncing-data [{:keys [db]}] {:db (dissoc db @@ -59,6 +59,8 @@ :syncing/installation-id :syncing/pairing-process-initiated?)}) +(re-frame/reg-event-fx :syncing/clear-syncing-data clear-syncing-data) + (rf/defn preflight-outbound-check-for-local-pairing {:events [:syncing/preflight-outbound-check]} [_ set-checks-passed]