diff --git a/src/status_im/contexts/profile/login/events.cljs b/src/status_im/contexts/profile/login/events.cljs index 1c2136a577..56bb542432 100644 --- a/src/status_im/contexts/profile/login/events.cljs +++ b/src/status_im/contexts/profile/login/events.cljs @@ -62,6 +62,9 @@ ;; loading chats and communities. This globally helps alleviate ;; stuttering immediately after login. [:dispatch-later [{:ms 500 :dispatch [:wallet/initialize]}]] + ;; Fetching the currencies along with wallet initialization as + ;; we rely on it for displaying currency symbol + [:dispatch-later [{:ms 500 :dispatch [:settings/get-currencies]}]] [:logs/set-level log-level] @@ -95,7 +98,6 @@ [:dispatch-later [{:ms 1500 :dispatch [:profile.login/non-critical-initialization]}]] [:dispatch [:network/check-expensive-connection]] [:profile.settings/get-profile-picture key-uid] - [:settings/get-currencies] (when (ff/enabled? ::ff/wallet.wallet-connect) [:dispatch [:wallet-connect/init]]) (when (ff/enabled? ::ff/wallet.swap) diff --git a/src/status_im/contexts/settings/language_and_currency/events.cljs b/src/status_im/contexts/settings/language_and_currency/events.cljs index 4297041a75..50da7bf5da 100644 --- a/src/status_im/contexts/settings/language_and_currency/events.cljs +++ b/src/status_im/contexts/settings/language_and_currency/events.cljs @@ -1,6 +1,5 @@ (ns status-im.contexts.settings.language-and-currency.events - (:require [status-im.common.json-rpc.events :as json-rpc] - [status-im.contexts.settings.language-and-currency.data-store :as data-store] + (:require [status-im.contexts.settings.language-and-currency.data-store :as data-store] [utils.collection] [utils.re-frame :as rf])) @@ -11,8 +10,9 @@ :currencies (utils.collection/index-by :id all-currencies))}))) -(rf/reg-fx :settings/get-currencies +(rf/reg-event-fx :settings/get-currencies (fn [] - (json-rpc/call {:method "appgeneral_getCurrencies" - :on-success [:settings/get-currencies-success] - :on-error [:log-rpc-error {:event :settings/get-currencies}]}))) + {:fx [[:json-rpc/call + [{:method "appgeneral_getCurrencies" + :on-success [:settings/get-currencies-success] + :on-error [:log-rpc-error {:event :settings/get-currencies}]}]]]}))