[#15152] SHow ENS name on adding contact via ENS name
This commit is contained in:
parent
181e5c2266
commit
61600a534b
|
@ -93,4 +93,4 @@
|
||||||
{:db (-> db
|
{:db (-> db
|
||||||
(assoc :contacts/identity identity)
|
(assoc :contacts/identity identity)
|
||||||
(assoc :contacts/ens-name ens-name))
|
(assoc :contacts/ens-name ens-name))
|
||||||
:dispatch [:contacts/build-contact identity true]})))
|
:dispatch [:contacts/build-contact identity ens-name true]})))
|
||||||
|
|
|
@ -87,9 +87,10 @@
|
||||||
|
|
||||||
(rf/defn build-contact
|
(rf/defn build-contact
|
||||||
{:events [:contacts/build-contact]}
|
{:events [:contacts/build-contact]}
|
||||||
[_ pubkey open-profile-modal?]
|
[_ pubkey ens-name open-profile-modal?]
|
||||||
{:json-rpc/call [{:method "wakuext_buildContact"
|
{:json-rpc/call [{:method "wakuext_buildContact"
|
||||||
:params [pubkey]
|
:params [{:publicKey pubkey
|
||||||
|
:ENSName ens-name}]
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-success #(rf/dispatch [:contacts/contact-built
|
:on-success #(rf/dispatch [:contacts/contact-built
|
||||||
pubkey
|
pubkey
|
||||||
|
@ -113,7 +114,7 @@
|
||||||
:public-key pubkey
|
:public-key pubkey
|
||||||
:ens-name ens-name
|
:ens-name ens-name
|
||||||
:state :valid})}
|
:state :valid})}
|
||||||
(build-contact pubkey false)))
|
(build-contact pubkey ens-name false)))
|
||||||
|
|
||||||
(rf/defn set-new-identity-error
|
(rf/defn set-new-identity-error
|
||||||
{:events [:contacts/set-new-identity-error]}
|
{:events [:contacts/set-new-identity-error]}
|
||||||
|
|
|
@ -44,10 +44,9 @@
|
||||||
|
|
||||||
(defn new-contact
|
(defn new-contact
|
||||||
[]
|
[]
|
||||||
(let [{:keys [input public-key state error]} (rf/sub
|
(let [{:keys [input public-key state error ens-name]} (rf/sub [:contacts/new-identity])
|
||||||
[:contacts/new-identity])
|
error? (and (= state :error)
|
||||||
error? (and (= state :error)
|
(= error :uncompressed-key))]
|
||||||
(= error :uncompressed-key))]
|
|
||||||
[rn/keyboard-avoiding-view (style/container-kbd)
|
[rn/keyboard-avoiding-view (style/container-kbd)
|
||||||
[rn/view style/container-image
|
[rn/view style/container-image
|
||||||
[rn/image
|
[rn/image
|
||||||
|
@ -100,5 +99,5 @@
|
||||||
(fn []
|
(fn []
|
||||||
(rf/dispatch [:contacts/clear-new-identity])
|
(rf/dispatch [:contacts/clear-new-identity])
|
||||||
(rf/dispatch [:navigate-back])
|
(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)]]]]))
|
(i18n/label :t/view-profile)]]]]))
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
:compressed-key (oops/oget js-contact "compressedKey")
|
:compressed-key (oops/oget js-contact "compressedKey")
|
||||||
:primary-name (oops/oget js-contact "primaryName")
|
:primary-name (oops/oget js-contact "primaryName")
|
||||||
:secondary-name (.-secondaryName js-contact)
|
:secondary-name (.-secondaryName js-contact)
|
||||||
:ens-name (.-ensName js-contact)
|
:ens-name (.-name js-contact)
|
||||||
:nickname (.-localNickname js-contact)
|
:nickname (.-localNickname js-contact)
|
||||||
:identicon (oops/oget js-contact "identicon")
|
:identicon (oops/oget js-contact "identicon")
|
||||||
:images (types/js->clj (oops/oget js-contact "images"))
|
:images (types/js->clj (oops/oget js-contact "images"))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "80d350ad5b8366966dd1aafe5622af172d7cce6b",
|
"version": "v0.138.3",
|
||||||
"commit-sha1": "80d350ad5b8366966dd1aafe5622af172d7cce6b",
|
"commit-sha1": "290579f74f10a374ffb8c37abc47dbe2c1e90f5d",
|
||||||
"src-sha256": "0dcfrky9rky09fhzsk5krsj2khly6hwgmvilxzczi7vxny70xcha"
|
"src-sha256": "0vgs3m1fbyri9r1wqxfanzxlx24yzx9zaabflk26qc9d4pclmi7i"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue