From d5c7f0261e494c35511bfdb756116cf635227b12 Mon Sep 17 00:00:00 2001 From: Brian Sztamfater Date: Mon, 5 Jun 2023 10:32:27 +0100 Subject: [PATCH] fix: fixes error message on login page Signed-off-by: Brian Sztamfater --- src/status_im2/contexts/onboarding/profiles/view.cljs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/status_im2/contexts/onboarding/profiles/view.cljs b/src/status_im2/contexts/onboarding/profiles/view.cljs index c900e1c418..4d8b13be06 100644 --- a/src/status_im2/contexts/onboarding/profiles/view.cljs +++ b/src/status_im2/contexts/onboarding/profiles/view.cljs @@ -12,7 +12,8 @@ [utils.security.core :as security] [utils.transforms :as types] [quo2.foundations.colors :as colors] - [react-native.safe-area :as safe-area])) + [react-native.safe-area :as safe-area] + [clojure.string :as string])) (defn login-multiaccount [] @@ -178,7 +179,12 @@ (let [{:keys [key-uid name customization-color error processing password]} (rf/sub [:multiaccounts/login]) sign-in-enabled? (rf/sub [:sign-in-enabled?]) - profile-picture (rf/sub [:multiaccounts/login-profiles-picture key-uid])] + profile-picture (rf/sub [:multiaccounts/login-profiles-picture key-uid]) + error (if (and (some? error) + (or (= error "file is not a database") + (string/starts-with? error "failed to set "))) + (i18n/label :t/wrong-password) + error)] [rn/keyboard-avoiding-view {:style style/login-container :keyboardVerticalOffset (- (safe-area/get-bottom))}