Fix keycard account unlocking on disabled bioauth

This commit fixes the case when biometric auth was disabled on the
device after being enabled for a keycard account.
This commit is contained in:
Roman Volosovskyi 2019-12-03 16:36:15 +02:00
parent a2f64bd544
commit 6db7495423
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 8 additions and 4 deletions

View File

@ -325,10 +325,13 @@
:save-password? true)}
(navigation/navigate-to-cofx :progress nil)
login)
(navigation/navigate-to-cofx
(fx/merge
cofx
(if keycard-account? :keycard-login-pin :login)
nil))))
(when keycard-account?
{:db (assoc-in db [:hardwallet :pin :enter-step] :login)})
(navigation/navigate-to-cofx
(if keycard-account? :keycard-login-pin :login)
nil)))))
(fx/defn get-credentials
[{:keys [db] :as cofx} address]
@ -372,8 +375,9 @@
(if bioauth-success
(get-credentials cofx address)
(fx/merge cofx
{:db (assoc-in db [:multiaccounts/login :save-password?] true)}
{:db (assoc-in db [:multiaccounts/login :save-password?] false)}
(biometric/show-message bioauth-message bioauth-code)
(keychain/save-auth-method address keychain/auth-method-none)
(open-login-callback nil)))))
(fx/defn save-password