mirror of
https://github.com/status-im/status-react.git
synced 2025-02-17 05:16:46 +00:00
support PUK and seed recovery during onboarding
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
This commit is contained in:
parent
cd86a1065b
commit
e45f959c27
@ -16,7 +16,7 @@
|
|||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
{:db (-> db
|
{:db (-> db
|
||||||
(assoc-in [:keycard :creating-backup?] backup-type))}
|
(assoc-in [:keycard :creating-backup?] backup-type))}
|
||||||
(when-not (:multiaccounts/login db)
|
(when (:multiaccount db)
|
||||||
(navigation/change-tab :profile))
|
(navigation/change-tab :profile))
|
||||||
(navigation/navigate-to-cofx :seed-phrase nil)))
|
(navigation/navigate-to-cofx :seed-phrase nil)))
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
:error nil
|
:error nil
|
||||||
:status nil))
|
:status nil))
|
||||||
:hide-popover nil})
|
:hide-popover nil})
|
||||||
(when-not (:multiaccounts/login db)
|
(when (:multiaccount db)
|
||||||
(navigation/change-tab :profile))
|
(navigation/change-tab :profile))
|
||||||
(when-not (:multiaccounts/login db)
|
(when-not (:multiaccounts/login db)
|
||||||
(if (:popover/popover db)
|
(if (:popover/popover db)
|
||||||
|
@ -217,9 +217,15 @@
|
|||||||
:t/keycard-access-reset :t/keycard-backup-success-title))
|
:t/keycard-access-reset :t/keycard-backup-success-title))
|
||||||
:content (i18n/label (if (= backup-type :recovery-card)
|
:content (i18n/label (if (= backup-type :recovery-card)
|
||||||
:t/keycard-can-use-with-new-passcode :t/keycard-backup-success-body))}}
|
:t/keycard-can-use-with-new-passcode :t/keycard-backup-success-body))}}
|
||||||
(if (multiaccounts.model/logged-in? cofx)
|
(cond
|
||||||
|
(multiaccounts.model/logged-in? cofx)
|
||||||
(navigation/set-stack-root :profile-stack [:my-profile :keycard-settings])
|
(navigation/set-stack-root :profile-stack [:my-profile :keycard-settings])
|
||||||
(return-to-keycard-login))))
|
|
||||||
|
(:multiaccounts/login db)
|
||||||
|
(return-to-keycard-login)
|
||||||
|
|
||||||
|
:else
|
||||||
|
(navigation/set-stack-root :onboarding [:get-your-keys]))))
|
||||||
|
|
||||||
(re-frame/reg-fx
|
(re-frame/reg-fx
|
||||||
::finish-migration
|
::finish-migration
|
||||||
|
@ -109,12 +109,15 @@
|
|||||||
types/json->clj
|
types/json->clj
|
||||||
:error
|
:error
|
||||||
string/blank?
|
string/blank?
|
||||||
not)]
|
not)
|
||||||
|
onboarding? (not (or (:multiaccounts/login db) (:multiaccount db)))]
|
||||||
(if error?
|
(if error?
|
||||||
(popover/show-popover cofx {:view :custom-seed-phrase})
|
(popover/show-popover cofx {:view :custom-seed-phrase})
|
||||||
{::validate-seed-against-key-uid {:seed-phrase (-> db :multiaccounts/key-storage :seed-phrase)
|
{::validate-seed-against-key-uid {:seed-phrase (-> db :multiaccounts/key-storage :seed-phrase)
|
||||||
;; Unique key-uid of the account for which we are going to move keys
|
;; Unique key-uid of the account for which we are going to move keys
|
||||||
:key-uid (or (-> db :multiaccounts/login :key-uid) (-> db :multiaccount :key-uid))}})))
|
:key-uid (or (-> db :multiaccounts/login :key-uid)
|
||||||
|
(-> db :multiaccount :key-uid)
|
||||||
|
(and onboarding? (-> db :keycard :application-info :key-uid)))}})))
|
||||||
|
|
||||||
(fx/defn choose-storage-pressed
|
(fx/defn choose-storage-pressed
|
||||||
{:events [::choose-storage-pressed]}
|
{:events [::choose-storage-pressed]}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user