From 61600a534beb3770c13a01579c05a4e63ac0f559 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Tue, 14 Mar 2023 18:12:25 +0100 Subject: [PATCH] [#15152] SHow ENS name on adding contact via ENS name --- src/status_im/profile/core.cljs | 2 +- src/status_im2/contexts/add_new_contact/events.cljs | 7 ++++--- src/status_im2/contexts/add_new_contact/views.cljs | 9 ++++----- src/status_im2/contexts/contacts/events.cljs | 2 +- status-go-version.json | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/status_im/profile/core.cljs b/src/status_im/profile/core.cljs index 27261aea3b..37e4fa2587 100644 --- a/src/status_im/profile/core.cljs +++ b/src/status_im/profile/core.cljs @@ -93,4 +93,4 @@ {:db (-> db (assoc :contacts/identity identity) (assoc :contacts/ens-name ens-name)) - :dispatch [:contacts/build-contact identity true]}))) + :dispatch [:contacts/build-contact identity ens-name true]}))) diff --git a/src/status_im2/contexts/add_new_contact/events.cljs b/src/status_im2/contexts/add_new_contact/events.cljs index f1afbdbd8f..b653a393d9 100644 --- a/src/status_im2/contexts/add_new_contact/events.cljs +++ b/src/status_im2/contexts/add_new_contact/events.cljs @@ -87,9 +87,10 @@ (rf/defn build-contact {:events [:contacts/build-contact]} - [_ pubkey open-profile-modal?] + [_ pubkey ens-name open-profile-modal?] {:json-rpc/call [{:method "wakuext_buildContact" - :params [pubkey] + :params [{:publicKey pubkey + :ENSName ens-name}] :js-response true :on-success #(rf/dispatch [:contacts/contact-built pubkey @@ -113,7 +114,7 @@ :public-key pubkey :ens-name ens-name :state :valid})} - (build-contact pubkey false))) + (build-contact pubkey ens-name false))) (rf/defn set-new-identity-error {:events [:contacts/set-new-identity-error]} diff --git a/src/status_im2/contexts/add_new_contact/views.cljs b/src/status_im2/contexts/add_new_contact/views.cljs index a1314f9bd0..cc3019fc17 100644 --- a/src/status_im2/contexts/add_new_contact/views.cljs +++ b/src/status_im2/contexts/add_new_contact/views.cljs @@ -44,10 +44,9 @@ (defn new-contact [] - (let [{:keys [input public-key state error]} (rf/sub - [:contacts/new-identity]) - error? (and (= state :error) - (= error :uncompressed-key))] + (let [{:keys [input public-key state error ens-name]} (rf/sub [:contacts/new-identity]) + error? (and (= state :error) + (= error :uncompressed-key))] [rn/keyboard-avoiding-view (style/container-kbd) [rn/view style/container-image [rn/image @@ -100,5 +99,5 @@ (fn [] (rf/dispatch [:contacts/clear-new-identity]) (rf/dispatch [:navigate-back]) - (rf/dispatch [:chat.ui/show-profile public-key]))}) + (rf/dispatch [:chat.ui/show-profile public-key ens-name]))}) (i18n/label :t/view-profile)]]]])) diff --git a/src/status_im2/contexts/contacts/events.cljs b/src/status_im2/contexts/contacts/events.cljs index 32ce589454..d4fa4fa47e 100644 --- a/src/status_im2/contexts/contacts/events.cljs +++ b/src/status_im2/contexts/contacts/events.cljs @@ -12,7 +12,7 @@ :compressed-key (oops/oget js-contact "compressedKey") :primary-name (oops/oget js-contact "primaryName") :secondary-name (.-secondaryName js-contact) - :ens-name (.-ensName js-contact) + :ens-name (.-name js-contact) :nickname (.-localNickname js-contact) :identicon (oops/oget js-contact "identicon") :images (types/js->clj (oops/oget js-contact "images")) diff --git a/status-go-version.json b/status-go-version.json index 1327192a37..85587dd63c 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "80d350ad5b8366966dd1aafe5622af172d7cce6b", - "commit-sha1": "80d350ad5b8366966dd1aafe5622af172d7cce6b", - "src-sha256": "0dcfrky9rky09fhzsk5krsj2khly6hwgmvilxzczi7vxny70xcha" + "version": "v0.138.3", + "commit-sha1": "290579f74f10a374ffb8c37abc47dbe2c1e90f5d", + "src-sha256": "0vgs3m1fbyri9r1wqxfanzxlx24yzx9zaabflk26qc9d4pclmi7i" }