File tree 3 files changed +8
-7
lines changed
contexts/wallet/create_account/new_keypair/keypair_name
3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
(ns status-im.common.validation.general
2
2
(:require
3
- [status-im.constants :as constants]))
3
+ [status-im.constants :as constants]
4
+ [utils.emojilib :as emoji]))
4
5
5
6
(defn valid-public-key?
6
7
[s]
14
15
(not-empty s)
15
16
(boolean (re-matches constants/regx-compressed-key s))))
16
17
17
- (defn has-emojis? [s] (boolean (re-find utils.emojilib /emoji-regex s)))
18
+ (defn has-emojis? [s] (boolean (re-find emoji /emoji-regex s)))
18
19
19
20
(def no-special-chars-regex #"^[a-zA-Z0-9\- _ ]+$" )
20
21
(defn has-special-characters?
Original file line number Diff line number Diff line change 1
1
(ns status-im.common.validation.profile-test
2
2
(:require
3
3
[cljs.test :refer-macros [deftest are]]
4
+ [status-im.common.validation.general :as validator]
4
5
[status-im.common.validation.profile :as profile-validator]
5
6
[utils.i18n :as i18n]))
6
7
7
8
(deftest has-emojis-test
8
9
(are [arg expected]
9
- (expected (profile- validator/has-emojis? arg))
10
+ (expected (validator/has-emojis? arg))
10
11
" Hello 😊" true ?
11
12
" Hello" false ?))
12
13
18
19
19
20
(deftest has-special-characters-test
20
21
(are [arg expected]
21
- (expected (profile- validator/has-special-characters? arg))
22
+ (expected (validator/has-special-characters? arg))
22
23
" @name" true ?
23
24
" name" false ?))
24
25
Original file line number Diff line number Diff line change 18
18
19
19
(defn navigate-back [] (rf/dispatch [:navigate-back ]))
20
20
21
- (defn view-internal
22
- [{ :keys [theme]} ]
21
+ (defn view
22
+ []
23
23
(let [[keypair-name set-keypair-name] (rn/use-state " " )
24
24
customization-color (rf/sub [:profile/customization-color ])
25
25
[error set-error] (rn/use-state false )
71
71
:icon :i/info
72
72
:container-style style/error-container}
73
73
(get error-messages error)])]]))
74
- (def view (quo.theme/with-theme view-internal))
You can’t perform that action at this time.
0 commit comments