Skip to content

Commit

Permalink
Check for empty public key
Browse files Browse the repository at this point in the history
We check that ENS does not return an empty public key. In addition to
that validation is done on status-go in order to avoid saving the chat.

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
  • Loading branch information
cammellos committed Feb 7, 2020
1 parent 06025ce commit 3d4ee8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/status_im/ui/screens/add_new/new_chat/db.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns status-im.ui.screens.add-new.new-chat.db
(:require [status-im.utils.hex :as hex]
[status-im.ethereum.ens :as ens]
[status-im.utils.platform :as platform]
[status-im.i18n :as i18n]
[cljs.spec.alpha :as spec]
Expand All @@ -11,7 +12,8 @@

(defn validate-pub-key [db public-key]
(cond
(not (spec/valid? :global/public-key public-key))
(or (not (spec/valid? :global/public-key public-key))
(= public-key ens/default-key))
(i18n/label (if platform/desktop?
:t/use-valid-contact-code-desktop
:t/use-valid-contact-code))
Expand Down
6 changes: 3 additions & 3 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
"owner": "status-im",
"repo": "status-go",
"version": "v0.43.0",
"commit-sha1": "f2eebd1e499e1eb7ab84d634792ec7927b1e79b3",
"src-sha256": "1pcsigvwlv1k4hnzfw2f7c9shhavinyqg6711xnq3jkr4j53j2p8"
"version": "v0.43.1",
"commit-sha1": "0b6ad662b519ce0bc0f0c1c65f8c5eb77ddb2904",
"src-sha256": "1rn11ig98pb6y5gp5w9vzh41grsampd8bz09zdqz2rzfdic1b66i"
}

0 comments on commit 3d4ee8f

Please sign in to comment.