|
11 | 11 | [status-im2.contexts.profile.config :as profile.config]
|
12 | 12 | [taoensso.timbre :as log]
|
13 | 13 | [status-im.notifications.core :as notifications]
|
14 |
| - [status-im2.contexts.profile.create.events :as profile.create] |
15 | 14 | [status-im2.config :as config]
|
16 | 15 | [status-im.data-store.settings :as data-store.settings]
|
17 | 16 | [status-im2.contexts.communities.discover.events :as contract-communities]
|
|
132 | 131 | (switcher-cards-store/fetch-switcher-cards-rpc))))
|
133 | 132 |
|
134 | 133 | (rf/defn login-node-signal
|
135 |
| - [{{:keys [recovered-account?] :as db} :db :as cofx} {:keys [settings account error]}] |
| 134 | + [{{:onboarding-2/keys [recovered-account? new-account?] :as db} :db :as cofx} |
| 135 | + {:keys [settings account error]}] |
136 | 136 | (log/debug "[signals] node.login" "error" error)
|
137 | 137 | (if error
|
138 | 138 | {:db (update db :profile/login #(-> % (dissoc :processing) (assoc :error error)))}
|
139 |
| - (let [{:keys [creating?]} (:profile/login db)] |
140 |
| - (rf/merge cofx |
141 |
| - {:db (dissoc db :profile/login) |
142 |
| - :dispatch-n [[:logging/initialize-web3-client-version] |
143 |
| - (when (and creating? (not recovered-account?)) |
144 |
| - [:wallet/set-initial-blocks-range])]} |
145 |
| - (if (or creating? recovered-account?) |
146 |
| - (profile.create/login-new-profile recovered-account?) |
147 |
| - (login-existing-profile settings account)))))) |
| 139 | + (rf/merge cofx |
| 140 | + {:db (dissoc db :profile/login) |
| 141 | + :dispatch-n [[:logging/initialize-web3-client-version] |
| 142 | + (when (and new-account? (not recovered-account?)) |
| 143 | + [:wallet/set-initial-blocks-range])]} |
| 144 | + (login-existing-profile settings account)))) |
148 | 145 |
|
149 | 146 | (rf/defn login-with-biometric-if-available
|
150 | 147 | {:events [:profile.login/login-with-biometric-if-available]}
|
|
0 commit comments