Skip to content

Commit

Permalink
[#20905] fix: notification seen state and context background
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen-ghafouri committed Sep 2, 2024
1 parent c66d7f9 commit 5a927da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
:context [[quo/context-tag
{:type :dapp
:size 24
:blur? true
:dapp-logo dapp-icon-url
:dapp-name (utils.url/url-host dapp-url)}]
(i18n/label :t/via)
[quo/context-tag
{:type :dapp
:size 24
:blur? true
:dapp-logo (quo.resources/get-dapp :wallet-connect)
:dapp-name "WalletConnect"}]]}]]))
13 changes: 9 additions & 4 deletions src/status_im/contexts/wallet/wallet_connect/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,17 @@
{:fx [[:json-rpc/call
[{:method "wallet_addWalletConnectSession"
:params [(js/JSON.stringify session-info)]
:on-success (fn []
(log/info "Wallet Connect session persisted")
(rf/dispatch [:wallet-connect/fetch-persisted-sessions])
(rf/dispatch [:activity-center.notifications/fetch-unread-count]))
:on-success [:wallet-connect/persist-session-success session-info]
:on-error #(log/info "Wallet Connect session persistence failed" %)}]]]}))

(rf/reg-event-fx
:wallet-connect/persist-session-success
(fn [_]
(log/info "Wallet Connect session persisted")
{:fx [[:dispatch [:wallet-connect/fetch-active-sessions]]
[:activity-center.notifications/fetch-unread-count]
[:activity-center/update-seen-state]]}))

(rf/reg-event-fx
:wallet-connect/disconnect-session
(fn [{:keys [db]} [topic]]
Expand Down

0 comments on commit 5a927da

Please sign in to comment.