fix: crashed after local pairing (#14931)

This commit is contained in:
frank 2023-01-31 17:23:38 +08:00 committed by GitHub
parent 3692ad38dd
commit 01523f3a1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 10 deletions

View File

@ -173,8 +173,11 @@
:keychain/save-auth-method :keychain/save-auth-method
(fn [[key-uid method]] (fn [[key-uid method]]
(log/debug "[keychain] :keychain/save-auth-method" (log/debug "[keychain] :keychain/save-auth-method"
"key-uid"
key-uid
"method" "method"
method) method)
(when-not (empty? key-uid) ; key-uid may be nil after restore from local pairing
(save-credentials (save-credentials
(str key-uid "-auth") (str key-uid "-auth")
key-uid key-uid
@ -184,7 +187,7 @@
(str "Error while saving auth method." (str "Error while saving auth method."
" " " "
"The app will continue to work normally, " "The app will continue to work normally, "
"but you will have to login again next time you launch it.")))))) "but you will have to login again next time you launch it.")))))))
(re-frame/reg-fx (re-frame/reg-fx
:keychain/save-keycard-keys :keychain/save-keycard-keys