diff --git a/src/status_im/keycard/recovery.cljs b/src/status_im/keycard/recovery.cljs index 7250040af7..072251938e 100644 --- a/src/status_im/keycard/recovery.cljs +++ b/src/status_im/keycard/recovery.cljs @@ -175,8 +175,7 @@ (fx/merge cofx {:db (-> db (assoc-in [:keycard :setup-step] nil) - (dissoc :intro-wizard)) - :init-root-fx :onboarding-notification} + (dissoc :intro-wizard))} (multiaccounts.create/on-multiaccount-created {:recovered (or recovered (get-in db [:intro-wizard :recovering?])) :derived {constants/path-wallet-root-keyword diff --git a/src/status_im/multiaccounts/key_storage/core.cljs b/src/status_im/multiaccounts/key_storage/core.cljs index a95a0d12f5..d4a42424ea 100644 --- a/src/status_im/multiaccounts/key_storage/core.cljs +++ b/src/status_im/multiaccounts/key_storage/core.cljs @@ -143,7 +143,8 @@ {:events [::delete-multiaccount-and-init-keycard-onboarding]} [{:keys [db] :as cofx}] (let [{:keys [key-uid]} (-> db :multiaccounts/login)] - {::delete-multiaccount {:key-uid key-uid + {:db (assoc-in db [:multiaccounts/key-storage :reset-db-checked?] true) + ::delete-multiaccount {:key-uid key-uid :on-error #(re-frame/dispatch [::delete-multiaccount-error %]) :on-success #(re-frame/dispatch [::delete-multiaccount-success])}})) diff --git a/src/status_im/multiaccounts/login/core.cljs b/src/status_im/multiaccounts/login/core.cljs index eef63568b6..f712f3731e 100644 --- a/src/status_im/multiaccounts/login/core.cljs +++ b/src/status_im/multiaccounts/login/core.cljs @@ -337,15 +337,12 @@ (fx/defn login-only-events [{:keys [db] :as cofx} key-uid password save-password?] (let [auth-method (:auth-method db) - new-auth-method (get-new-auth-method auth-method save-password?) - from-migration? (get-in db [:keycard :from-key-storage-and-migration?])] + new-auth-method (get-new-auth-method auth-method save-password?)] (log/debug "[login] login-only-events" "auth-method" auth-method "new-auth-method" new-auth-method) (fx/merge cofx - {:db (-> db - (assoc :chats/loading? true) - (update :keycard dissoc :from-key-storage-and-migration?)) + {:db (assoc db :chats/loading? true) ::json-rpc/call [{:method "browsers_getBrowsers" :on-success #(re-frame/dispatch [::initialize-browsers %])} @@ -357,8 +354,6 @@ :on-success #(do (re-frame/dispatch [::get-settings-callback %]) (redirect-to-root db))}]} (notifications/load-notification-preferences) - (when from-migration? - (utils/show-popup (i18n/label :t/migration-successful) (i18n/label :t/migration-successful-text))) (when save-password? (keychain/save-user-password key-uid password)) (keychain/save-auth-method key-uid (or new-auth-method auth-method keychain/auth-method-none))))) @@ -408,6 +403,7 @@ login-only? (not (or creating? recovered-account? (keycard-setup? cofx))) + from-migration? (get-in db [:keycard :from-key-storage-and-migration?]) nodes nil should-send-metrics? (get-in db [:multiaccount :anon-metrics/should-send?])] (log/debug "[multiaccount] multiaccount-login-success" @@ -416,6 +412,7 @@ (fx/merge cofx {:db (-> db (dissoc :connectivity/ui-status-properties) + (update :keycard dissoc :from-key-storage-and-migration?) (update :keycard dissoc :on-card-read :card-read-in-progress? @@ -439,6 +436,8 @@ (when (and (not login-only?) (not recovered-account?)) (wallet/set-initial-blocks-range)) + (when from-migration? + (utils/show-popup (i18n/label :t/migration-successful) (i18n/label :t/migration-successful-text))) (if login-only? (login-only-events key-uid password save-password?) (create-only-events))))) diff --git a/src/status_im/ui/screens/multiaccounts/key_storage/views.cljs b/src/status_im/ui/screens/multiaccounts/key_storage/views.cljs index 7ef31588cf..e73680a214 100644 --- a/src/status_im/ui/screens/multiaccounts/key_storage/views.cljs +++ b/src/status_im/ui/screens/multiaccounts/key_storage/views.cljs @@ -78,6 +78,7 @@ :subtitle (i18n/label :t/reset-database-warning) :subtitle-max-lines 4 :active reset-db-checked? + :disabled (not move-keystore-checked?) :on-press #(re-frame/dispatch [::multiaccounts.key-storage/reset-db-checked (not reset-db-checked?)]) :accessory :checkbox}]] (when (and next-title next-event)