fix pairing for new cards

Signed-off-by: Michele Balistreri <michele@bitgamma.com>
This commit is contained in:
Michele Balistreri 2021-12-10 10:14:01 +03:00
parent d1f3a33194
commit c6271557b1
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A
2 changed files with 7 additions and 2 deletions

View File

@ -70,7 +70,9 @@
(mnemonic/set-mnemonic))
(when (= flow :recovery)
(onboarding/proceed-with-generating-key)))
(recovery/load-pair-screen cofx))))
(if (get-in db [:keycard :secrets :password])
(onboarding/load-pairing-screen cofx)
(recovery/load-pair-screen cofx)))))
(fx/defn navigate-to-keycard-settings
{:events [:profile.ui/keycard-settings-button-pressed]}

View File

@ -236,7 +236,10 @@
(assoc-in [:keycard :card-state] :init)
(assoc-in [:keycard :setup-step] :secret-keys)
(update-in [:keycard :secrets] merge secrets'))}
(load-pairing-screen))))
(common/show-connection-sheet
{:on-card-connected :keycard/get-application-info
:on-card-read :keycard/check-card-state
:handler (common/get-application-info :keycard/check-card-state)}))))
(fx/defn on-install-applet-and-init-card-error
{:events [:keycard.callback/on-install-applet-and-init-card-error