Revert "Set initial block range for a newly created account" (#16842)

This reverts commit ad17c37dc1.
This commit is contained in:
Jamie Caprani 2023-08-02 16:35:13 +02:00 committed by GitHub
parent 08bca43f0f
commit ba859b163a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 15 deletions

View File

@ -132,19 +132,19 @@
(switcher-cards-store/fetch-switcher-cards-rpc)))) (switcher-cards-store/fetch-switcher-cards-rpc))))
(rf/defn login-node-signal (rf/defn login-node-signal
[{{:onboarding-2/keys [recovered-account? new-account?] :as db} :db :as cofx} [{{:keys [recovered-account?] :as db} :db :as cofx} {:keys [settings account error]}]
{:keys [settings account error]}]
(log/debug "[signals] node.login" "error" error) (log/debug "[signals] node.login" "error" error)
(if error (if error
{:db (update db :profile/login #(-> % (dissoc :processing) (assoc :error error)))} {:db (update db :profile/login #(-> % (dissoc :processing) (assoc :error error)))}
(rf/merge cofx (let [{:keys [creating?]} (:profile/login db)]
{:db (dissoc db :profile/login) (rf/merge cofx
:dispatch-n [[:logging/initialize-web3-client-version] {:db (dissoc db :profile/login)
(when (and new-account? (not recovered-account?)) :dispatch-n [[:logging/initialize-web3-client-version]
[:wallet/set-initial-blocks-range])]} (when (and creating? (not recovered-account?))
(if (or new-account? recovered-account?) [:wallet/set-initial-blocks-range])]}
(profile.create/login-new-profile recovered-account?) (if (or creating? recovered-account?)
(login-existing-profile settings account))))) (profile.create/login-new-profile recovered-account?)
(login-existing-profile settings account))))))
(rf/defn login-with-biometric-if-available (rf/defn login-with-biometric-if-available
{:events [:profile.login/login-with-biometric-if-available]} {:events [:profile.login/login-with-biometric-if-available]}

View File

@ -14,11 +14,8 @@
(rf/defn recover-profile-and-login (rf/defn recover-profile-and-login
{:events [:profile.recover/recover-and-login]} {:events [:profile.recover/recover-and-login]}
[{:keys [db]} {:keys [display-name password image-path color seed-phrase]}] [_ {:keys [display-name password image-path color seed-phrase]}]
{:db {::restore-profile-and-login
(assoc db :onboarding-2/recovered-account? true)
::restore-profile-and-login
(merge (profile.config/create) (merge (profile.config/create)
{:displayName display-name {:displayName display-name
:mnemonic (security/safe-unmask-data seed-phrase) :mnemonic (security/safe-unmask-data seed-phrase)