Skip to content

Commit ba859b1

Browse files
authored
Revert "Set initial block range for a newly created account" (#16842)
This reverts commit ad17c37.
1 parent 08bca43 commit ba859b1

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

src/status_im2/contexts/profile/login/events.cljs

+10-10
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,19 @@
132132
(switcher-cards-store/fetch-switcher-cards-rpc))))
133133

134134
(rf/defn login-node-signal
135-
[{{:onboarding-2/keys [recovered-account? new-account?] :as db} :db :as cofx}
136-
{:keys [settings account error]}]
135+
[{{:keys [recovered-account?] :as db} :db :as cofx} {:keys [settings account error]}]
137136
(log/debug "[signals] node.login" "error" error)
138137
(if error
139138
{:db (update db :profile/login #(-> % (dissoc :processing) (assoc :error error)))}
140-
(rf/merge cofx
141-
{:db (dissoc db :profile/login)
142-
:dispatch-n [[:logging/initialize-web3-client-version]
143-
(when (and new-account? (not recovered-account?))
144-
[:wallet/set-initial-blocks-range])]}
145-
(if (or new-account? recovered-account?)
146-
(profile.create/login-new-profile recovered-account?)
147-
(login-existing-profile settings account)))))
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))))))
148148

149149
(rf/defn login-with-biometric-if-available
150150
{:events [:profile.login/login-with-biometric-if-available]}

src/status_im2/contexts/profile/recover/events.cljs

+2-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414

1515
(rf/defn recover-profile-and-login
1616
{:events [:profile.recover/recover-and-login]}
17-
[{:keys [db]} {:keys [display-name password image-path color seed-phrase]}]
18-
{:db
19-
(assoc db :onboarding-2/recovered-account? true)
20-
21-
::restore-profile-and-login
17+
[_ {:keys [display-name password image-path color seed-phrase]}]
18+
{::restore-profile-and-login
2219
(merge (profile.config/create)
2320
{:displayName display-name
2421
:mnemonic (security/safe-unmask-data seed-phrase)

0 commit comments

Comments
 (0)