mirror of
https://github.com/status-im/status-react.git
synced 2025-01-29 20:25:53 +00:00
Fix ens name hash exception for bad names
Fixes #11022 Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
parent
95997530c6
commit
72726e2b0b
@ -28,8 +28,10 @@
|
||||
(let [[label remainder] (-> s
|
||||
string/lower-case
|
||||
(string/split #"\." 2))]
|
||||
(ethereum/sha3 (str (namehash remainder)
|
||||
(subs (ethereum/sha3 label) 2)))))))
|
||||
(if-not (seq label)
|
||||
default-namehash
|
||||
(ethereum/sha3 (str (namehash remainder)
|
||||
(subs (ethereum/sha3 label) 2))))))))
|
||||
|
||||
;; Registry contract
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user