Skip to content

Commit

Permalink
chore: remove old wallet signals and move signals to status-im ns
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Son89 committed Jan 2, 2024
1 parent e392608 commit b6bda31
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 94 deletions.
88 changes: 0 additions & 88 deletions src/legacy/status_im/ethereum/subscriptions.cljs

This file was deleted.

1 change: 0 additions & 1 deletion src/legacy/status_im/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
legacy.status-im.chat.models.loading
legacy.status-im.contact.block
legacy.status-im.currency.core
legacy.status-im.ethereum.subscriptions
legacy.status-im.fleet.core
[legacy.status-im.keycard.core :as keycard]
legacy.status-im.log-level.core
Expand Down
9 changes: 4 additions & 5 deletions src/status_im/common/signals/events.cljs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(ns status-im.common.signals.events
(:require
[legacy.status-im.chat.models.message :as models.message]
[legacy.status-im.ethereum.subscriptions :as ethereum.subscriptions]
[legacy.status-im.mailserver.core :as mailserver]
[legacy.status-im.visibility-status-updates.core :as visibility-status-updates]
[status-im.common.pairing.events :as pairing]
Expand Down Expand Up @@ -70,10 +69,10 @@
"messages.new" (messages.transport/sanitize-messages-and-process-response cofx
event-js
true)
"wallet" (ethereum.subscriptions/new-wallet-event cofx
(js->clj event-js
:keywordize-keys
true))
"wallet" (rf/dispatch [:wallet/signal-fired
(js->clj event-js
:keywordize-keys
true)])
"local-notifications" (local-notifications/process cofx
(js->clj event-js :keywordize-keys true))
"community.found" (link-preview/cache-community-preview-data (js->clj event-js
Expand Down
20 changes: 20 additions & 0 deletions src/status_im/contexts/wallet/signals.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
(ns status-im.contexts.wallet.signals
(:require
[taoensso.timbre :as log]
[utils.re-frame :as rf]))

(rf/reg-event-fx
:wallet/signal-fired
(fn [_ {:keys [type blockNumber accounts] :as event}]
(log/debug "[wallet-subs] new-wallet-event"
"event-type" type
"blockNumber" blockNumber
"accounts" accounts)
(case type
"wallet-owned-collectibles-filtering-done" {:fx [[:dispatch
[:wallet/owned-collectibles-filtering-done
event]]]}
"wallet-get-collectibles-details-done" {:fx [[:dispatch
[:wallet/get-collectible-details-done
event]]]}
(log/debug ::unknown-wallet-event :type type :event event))))
1 change: 1 addition & 0 deletions src/status_im/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
status-im.contexts.syncing.events
status-im.contexts.wallet.events
status-im.contexts.wallet.send.events
status-im.contexts.wallet.signals
[status-im.db :as db]
[utils.re-frame :as rf]))

Expand Down

0 comments on commit b6bda31

Please sign in to comment.