Skip to content

Commit

Permalink
fix: hide biometric button when not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
clauxx committed Dec 12, 2023
1 parent 5a13b7c commit 50dcd11
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/status_im2/contexts/profile/profiles/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
{:keys [key-uid name customization-color]} (rf/sub [:profile/login-profile])
sign-in-enabled? (rf/sub [:sign-in-enabled?])
profile-picture (rf/sub [:profile/login-profiles-picture key-uid])
auth-method (rf/sub [:auth-method])
login-multiaccount #(rf/dispatch [:profile.login/login])]
[rn/keyboard-avoiding-view
{:style style/login-container
Expand Down Expand Up @@ -209,12 +210,14 @@
:card-style style/login-profile-card}]
[standard-authentication/password-input
{:shell? true
:on-press-biometrics (fn []
(rf/dispatch [:biometric/authenticate
{:on-success #(rf/dispatch
[:profile.login/biometric-success])
:on-fail #(rf/dispatch
[:profile.login/biometric-auth-fail %])}]))
:on-press-biometrics (when (= auth-method constants/auth-method-biometric)
(fn []
(rf/dispatch [:biometric/authenticate
{:on-success #(rf/dispatch
[:profile.login/biometric-success])
:on-fail #(rf/dispatch
[:profile.login/biometric-auth-fail
%])}])))
:default-password password}]]
[quo/button
{:size 40
Expand Down

0 comments on commit 50dcd11

Please sign in to comment.