From 15d9e7be8677510e0f13df025ae32093bdb25fa5 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 4 Dec 2019 09:40:10 +0200 Subject: [PATCH] Fix recovery with seed after visiting keycard recovery --- src/status_im/multiaccounts/recover/core.cljs | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/status_im/multiaccounts/recover/core.cljs b/src/status_im/multiaccounts/recover/core.cljs index 4af77024b8..2e03bf45ff 100644 --- a/src/status_im/multiaccounts/recover/core.cljs +++ b/src/status_im/multiaccounts/recover/core.cljs @@ -14,7 +14,8 @@ [status-im.utils.security :as security] [status-im.utils.types :as types] [status-im.utils.platform :as platform] - [status-im.utils.utils :as utils])) + [status-im.utils.utils :as utils] + [status-im.ui.components.bottom-sheet.core :as bottom-sheet])) (defn existing-account? [root-key multiaccounts] @@ -139,18 +140,21 @@ (fx/defn enter-phrase-pressed {:events [::enter-phrase-pressed]} [{:keys [db] :as cofx}] - (fx/merge cofx - {:db (assoc db - :intro-wizard {:step :enter-phrase - :recovering? true - :next-button-disabled? true - :weak-password? true - :encrypt-with-password? true - :first-time-setup? false - :back-action :intro-wizard/navigate-back - :forward-action :multiaccounts.recover/enter-phrase-next-pressed}) - :dispatch [:bottom-sheet/hide-sheet]} - (navigation/navigate-to-cofx :recover-multiaccount-enter-phrase nil))) + (fx/merge + cofx + {:db (-> db + (assoc :intro-wizard + {:step :enter-phrase + :recovering? true + :next-button-disabled? true + :weak-password? true + :encrypt-with-password? true + :first-time-setup? false + :back-action :intro-wizard/navigate-back + :forward-action :multiaccounts.recover/enter-phrase-next-pressed}) + (update :hardwallet dissoc :flow))} + (bottom-sheet/hide-bottom-sheet) + (navigation/navigate-to-cofx :recover-multiaccount-enter-phrase nil))) (fx/defn proceed-to-import-mnemonic {:events [:multiaccounts.recover/enter-phrase-next-pressed]}