From 5ad8263d51f787aa3f8d2aeb670d5e716f1870f1 Mon Sep 17 00:00:00 2001 From: Mohsen Date: Mon, 13 May 2024 10:42:34 +0300 Subject: [PATCH] [#19917] fix: resolve reviewer feedbacks --- src/status_im/common/validation/keypair.cljs | 9 +++++++-- .../wallet/keypairs_and_accounts/rename/view.cljs | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/status_im/common/validation/keypair.cljs b/src/status_im/common/validation/keypair.cljs index 69e1c92a33bc..3d13da8a362b 100644 --- a/src/status_im/common/validation/keypair.cljs +++ b/src/status_im/common/validation/keypair.cljs @@ -5,8 +5,13 @@ utils.emojilib [utils.i18n :as i18n])) -(defn keypair-too-short? [s] (< (count (string/trim (str s))) constants/keypair-name-min-length)) -(defn keypair-too-long? [s] (> (count (string/trim (str s))) constants/keypair-name-max-length)) +(defn keypair-too-short? + [s] + (< (-> s str string/trim count) constants/keypair-name-min-length)) + +(defn keypair-too-long? + [s] + (> (-> s str string/trim count) constants/keypair-name-max-length)) (defn validation-keypair-name [s] diff --git a/src/status_im/contexts/settings/wallet/keypairs_and_accounts/rename/view.cljs b/src/status_im/contexts/settings/wallet/keypairs_and_accounts/rename/view.cljs index a7397220c97e..748c18527619 100644 --- a/src/status_im/contexts/settings/wallet/keypairs_and_accounts/rename/view.cljs +++ b/src/status_im/contexts/settings/wallet/keypairs_and_accounts/rename/view.cljs @@ -10,7 +10,7 @@ [utils.i18n :as i18n] [utils.re-frame :as rf])) -(defn navigation-back [] (rf/dispatch [:navigate-back])) +(defn navigate-back [] (rf/dispatch [:navigate-back])) (defn view [] @@ -43,7 +43,7 @@ [floating-button-page/view {:header [quo/page-nav {:icon-name :i/close - :on-press navigation-back + :on-press navigate-back :accessibility-label :top-bar}] :footer [quo/bottom-actions {:actions :one-action