Fix ens names & group chat add-members

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
Andrea Maria Piana 2020-01-16 11:31:36 +01:00
parent 280063b687
commit 53d0cb519c
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
5 changed files with 17 additions and 12 deletions

View File

@ -81,7 +81,7 @@
{:db (-> db {:db (-> db
(update-in [:contacts/contacts public-key] merge contact))} (update-in [:contacts/contacts public-key] merge contact))}
(transport.filters/load-contact contact) (transport.filters/load-contact contact)
(contacts-store/save-contact contact))) #(contacts-store/save-contact % (get-in % [:db :contacts/contacts public-key]))))
(fx/defn send-contact-request (fx/defn send-contact-request
[{:keys [db] :as cofx} {:keys [public-key] :as contact}] [{:keys [db] :as cofx} {:keys [public-key] :as contact}]
@ -205,9 +205,12 @@
(fx/defn name-verified (fx/defn name-verified
{:events [:contacts/ens-name-verified]} {:events [:contacts/ens-name-verified]}
[{:keys [db]} public-key ens-name] [{:keys [db] :as cofx} public-key ens-name]
{:db (update-in db [:contacts/contacts public-key] (fx/merge cofx
merge {:db (update-in db [:contacts/contacts public-key]
{:name ens-name merge
:ens-verified-at (quot (time/timestamp) 1000) {:name ens-name
:ens-verified true})}) :ens-verified-at (quot (time/timestamp) 1000)
:ens-verified true})}
(upsert-contact {:public-key public-key})))

View File

@ -10,7 +10,6 @@
;;Contact ;;Contact
(spec/def :contact/address (spec/nilable :global/address))
(spec/def :contact/last-online (spec/nilable int?)) (spec/def :contact/last-online (spec/nilable int?))
(spec/def :contact/last-updated (spec/nilable int?)) (spec/def :contact/last-updated (spec/nilable int?))
(spec/def :contact/name (spec/nilable string?)) (spec/def :contact/name (spec/nilable string?))

View File

@ -129,6 +129,7 @@
:MaxMessageDeliveryAttempts config/max-message-delivery-attempts :MaxMessageDeliveryAttempts config/max-message-delivery-attempts
:MailServerConfirmations config/mailserver-confirmations-enabled? :MailServerConfirmations config/mailserver-confirmations-enabled?
:VerifyTransactionURL "https://mainnet.infura.io/v3/f315575765b14720b32382a61a89341a" :VerifyTransactionURL "https://mainnet.infura.io/v3/f315575765b14720b32382a61a89341a"
:VerifyENSURL "https://mainnet.infura.io/v3/f315575765b14720b32382a61a89341a"
:VerifyTransactionChainID 1 :VerifyTransactionChainID 1
:DataSyncEnabled true :DataSyncEnabled true
:PFSEnabled true} :PFSEnabled true}

View File

@ -1631,7 +1631,9 @@
:contacts/all-contacts-not-in-current-chat :contacts/all-contacts-not-in-current-chat
:<- [::query-current-chat-contacts remove] :<- [::query-current-chat-contacts remove]
(fn [contacts] (fn [contacts]
(sort-by (comp clojure.string/lower-case :name) contacts))) (->> contacts
(filter contact.db/added?)
(sort-by (comp clojure.string/lower-case multiaccounts/displayed-name)))))
(re-frame/reg-sub (re-frame/reg-sub
:contacts/current-chat-contacts :contacts/current-chat-contacts

View File

@ -2,7 +2,7 @@
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead", "_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
"owner": "status-im", "owner": "status-im",
"repo": "status-go", "repo": "status-go",
"version": "v0.39.5", "version": "v0.39.6",
"commit-sha1": "0316f949077f1481ccff5b71c0aeeec69fecaafb", "commit-sha1": "25d46c6d82fbf3e4b6659cb96cf1789bac87f12a",
"src-sha256": "123wsfhrn53yv18xgmx3fhfh0bgm0wpqpx7pszx8fq5kgr8nssc3" "src-sha256": "1m6d07hlxfp8yr94ld73m6dflrgdyjhmpr2ajnjkhjlv9ffvicgb"
} }