warning fixes (#19605)

This commit is contained in:
flexsurfer 2024-04-11 15:42:29 +02:00 committed by GitHub
parent c875fb33fa
commit 292fd78ff8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 36 deletions

View File

@ -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]

View File

@ -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]])]})))

View File

@ -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]}

View File

@ -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]