From 3d4ee8fe6a5f19b930ed8ac433792246a9c74a00 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Fri, 7 Feb 2020 09:55:46 +0100 Subject: [PATCH] Check for empty public key 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 --- src/status_im/ui/screens/add_new/new_chat/db.cljs | 4 +++- status-go-version.json | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/status_im/ui/screens/add_new/new_chat/db.cljs b/src/status_im/ui/screens/add_new/new_chat/db.cljs index fae24a5ad8..7e74796b73 100644 --- a/src/status_im/ui/screens/add_new/new_chat/db.cljs +++ b/src/status_im/ui/screens/add_new/new_chat/db.cljs @@ -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] @@ -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)) diff --git a/status-go-version.json b/status-go-version.json index ebf1f8b5e5..3e07464dfb 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -2,7 +2,7 @@ "_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh ' 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" }