From 0d9bedf11c57c79f29b388f080dd188acdf5c487 Mon Sep 17 00:00:00 2001 From: yqrashawn Date: Mon, 1 Jul 2024 09:57:21 +0800 Subject: [PATCH] fix: use "Biometric" instead of Touch ID when no Biometric found (#20555) Signed-off-by: yqrashawn --- src/legacy/status_im/events.cljs | 3 ++- src/status_im/common/biometric/utils.cljs | 7 ++++--- translations/en.json | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/legacy/status_im/events.cljs b/src/legacy/status_im/events.cljs index ca49261d6f..dffe74020a 100644 --- a/src/legacy/status_im/events.cljs +++ b/src/legacy/status_im/events.cljs @@ -135,7 +135,8 @@ (>= (- now app-in-background-since) constants/ms-in-bg-for-require-bioauth))] (rf/merge cofx - {:db (dissoc db :app-in-background-since)} + {:db (dissoc db :app-in-background-since) + :effects.biometric/get-supported-type nil} (mailserver/process-next-messages-request) (when-not new-account? (universal-links/process-stored-event)) diff --git a/src/status_im/common/biometric/utils.cljs b/src/status_im/common/biometric/utils.cljs index bc4003f698..3ec10689d4 100644 --- a/src/status_im/common/biometric/utils.cljs +++ b/src/status_im/common/biometric/utils.cljs @@ -11,9 +11,10 @@ (defn get-label-by-type [biometric-type] (condp = biometric-type - constants/biometrics-type-android (i18n/label :t/biometric-fingerprint) - constants/biometrics-type-face-id (i18n/label :t/biometric-faceid) - (i18n/label :t/biometric-touchid))) + constants/biometrics-type-android (i18n/label :t/biometric-fingerprint) + constants/biometrics-type-face-id (i18n/label :t/biometric-faceid) + constants/biometrics-type-touch-id (i18n/label :t/biometric-touchid) + (i18n/label :t/biometric))) (defn get-icon-by-type [biometric-type] diff --git a/translations/en.json b/translations/en.json index c3702cf6ac..211d741ce5 100644 --- a/translations/en.json +++ b/translations/en.json @@ -70,6 +70,7 @@ "bio-added": "Bio added", "bio-is-too-long": "Bio is too long", "bio-updated": "Bio updated", + "biometric": "Biometric", "biometric-auth-android-sensor-desc": "Touch sensor", "biometric-auth-android-sensor-error-desc": "Failed", "biometric-auth-android-title": "Authentication Required",