From 292fd78ff82962e545b590f4c7cd98ae5fe313b5 Mon Sep 17 00:00:00 2001 From: flexsurfer Date: Thu, 11 Apr 2024 15:42:29 +0200 Subject: [PATCH] warning fixes (#19605) --- src/legacy/status_im/stickers/core.cljs | 16 ---------------- src/status_im/contexts/profile/login/events.cljs | 13 +++---------- .../contexts/shell/activity_center/events.cljs | 8 ++++---- src/status_im/subs/profile.cljs | 6 ------ 4 files changed, 7 insertions(+), 36 deletions(-) diff --git a/src/legacy/status_im/stickers/core.cljs b/src/legacy/status_im/stickers/core.cljs index c6f7ae54fa..88282686b6 100644 --- a/src/legacy/status_im/stickers/core.cljs +++ b/src/legacy/status_im/stickers/core.cljs @@ -38,22 +38,6 @@ :params [] :on-success [:stickers/stickers-recent-success]}))) -(rf/defn load-packs - {:events [:stickers/load-packs]} - [{:keys [db]}] - {:json-rpc/call [{:method "stickers_market" - :params [(chain/chain-id db)] - :on-success #(re-frame/dispatch [:stickers/stickers-market-success %])} - {:method "stickers_installed" - :params [] - :on-success #(re-frame/dispatch [:stickers/stickers-installed-success %])} - {:method "stickers_pending" - :params [] - :on-success #(re-frame/dispatch [:stickers/stickers-pending-success %])} - {:method "stickers_recent" - :params [] - :on-success #(re-frame/dispatch [:stickers/stickers-recent-success %])}]}) - (rf/defn pending-pack {:events [:stickers/pending-pack]} [{db :db} id] diff --git a/src/status_im/contexts/profile/login/events.cljs b/src/status_im/contexts/profile/login/events.cljs index 8f6543495d..7af92c2584 100644 --- a/src/status_im/contexts/profile/login/events.cljs +++ b/src/status_im/contexts/profile/login/events.cljs @@ -9,7 +9,6 @@ status-im.contexts.profile.login.effects [status-im.contexts.profile.rpc :as profile.rpc] [taoensso.timbre :as log] - [utils.ethereum.chain :as chain] [utils.i18n :as i18n] [utils.re-frame :as rf] [utils.security.core :as security])) @@ -87,18 +86,14 @@ ;; login phase 2: we want to load and show chats faster, so we split login into 2 phases (rf/reg-event-fx :profile.login/get-chats-callback (fn [{:keys [db]}] - (let [{:networks/keys [current-network networks]} db - {:keys [notifications-enabled? key-uid - preview-privacy?]} (:profile/profile db) - network-id (str (get-in networks - [current-network :config :NetworkId]))] + (let [{:keys [notifications-enabled? key-uid + preview-privacy?]} (:profile/profile db)] {:db db :fx [[:json-rpc/call [{:method "wakuext_startMessenger" :on-success [:profile.login/messenger-started] :on-error #(log/error "failed to start messenger")}]] - [:check-eip1559-activation {:network-id network-id}] [:effects.profile/enable-local-notifications] [:contacts/initialize-contacts] [:browser/initialize-browser] @@ -116,8 +111,7 @@ (rf/reg-event-fx :profile.login/messenger-started (fn [{:keys [db]} [{:keys [mailservers]}]] - (let [chain-id (chain/chain-id db) - new-account? (get db :onboarding/new-account?)] + (let [new-account? (get db :onboarding/new-account?)] {:db (-> db (assoc :messenger/started? true) (mailserver/add-mailservers mailservers)) @@ -126,7 +120,6 @@ :on-success [:profile.login/node-info-fetched] :on-error #(log/error "node-info: failed error" %)}]] [:pairing/get-our-installations] - [:stickers/load-packs chain-id] (when-not new-account? [:dispatch [:universal-links/process-stored-event]])]}))) diff --git a/src/status_im/contexts/shell/activity_center/events.cljs b/src/status_im/contexts/shell/activity_center/events.cljs index e65423fd82..34c1cc832f 100644 --- a/src/status_im/contexts/shell/activity_center/events.cljs +++ b/src/status_im/contexts/shell/activity_center/events.cljs @@ -454,10 +454,10 @@ (re-frame/reg-fx :activity-center/update-seen-state (fn [] - (json-rpc/call [{:method "wakuext_hasUnseenActivityCenterNotifications" - :params [] - :on-success [:activity-center/update-seen-state-success] - :on-error [:activity-center/update-seen-state-error]}]))) + (json-rpc/call {:method "wakuext_hasUnseenActivityCenterNotifications" + :params [] + :on-success [:activity-center/update-seen-state-success] + :on-error [:activity-center/update-seen-state-error]}))) (rf/defn update-seen-state-success {:events [:activity-center/update-seen-state-success]} diff --git a/src/status_im/subs/profile.cljs b/src/status_im/subs/profile.cljs index 660d3149dd..a4978d5dc3 100644 --- a/src/status_im/subs/profile.cljs +++ b/src/status_im/subs/profile.cljs @@ -122,12 +122,6 @@ (fn [{:keys [preferred-name]}] preferred-name)) -(re-frame/reg-sub - :profile/image - :<- [:profile/profile-with-image] - (fn [profile] - (profile.utils/photo profile))) - (re-frame/reg-sub :multiaccount/default-account :<- [:wallet/accounts]