diff --git a/src/status_im/accounts/handlers.cljs b/src/status_im/accounts/handlers.cljs index cfb6d32d9b..a3d6550853 100644 --- a/src/status_im/accounts/handlers.cljs +++ b/src/status_im/accounts/handlers.cljs @@ -6,6 +6,7 @@ [status-im.utils.types :refer [json->clj]] [status-im.persistence.simple-kv-store :as kv] [status-im.protocol.state.storage :as storage] + [status-im.utils.identicon :refer [identicon]] [clojure.string :as str])) @@ -25,7 +26,9 @@ public-key (:pubkey data) address (:address data) account {:public-key public-key - :address address}] + :address address + :name address + :photo-path (identicon address)}] (log/debug "Created account: " result) (when (not (str/blank? public-key)) (do diff --git a/src/status_im/android/core.cljs b/src/status_im/android/core.cljs index 77174edd2b..f71789f8ab 100644 --- a/src/status_im/android/core.cljs +++ b/src/status_im/android/core.cljs @@ -14,6 +14,7 @@ [status-im.discovery.screen :refer [discovery]] [status-im.discovery.tag :refer [discovery-tag]] [status-im.chat.screen :refer [chat]] + [status-im.login.screen :refer [login]] [status-im.users.screen :refer [users]] [status-im.chats-list.screen :refer [chats-list]] [status-im.new-group.screen :refer [new-group]] diff --git a/src/status_im/persistence/realm.cljs b/src/status_im/persistence/realm.cljs index e9e9e1098d..08e7ae84f4 100644 --- a/src/status_im/persistence/realm.cljs +++ b/src/status_im/persistence/realm.cljs @@ -17,8 +17,10 @@ :optinal true}}} {:name :accounts :primaryKey :address - :properties {:address "string" - :public-key "string"}} + :properties {:address "string" + :public-key "string" + :name "string" + :photo-path "string"}} {:name :requests :properties {:message-id :string :chat-id :string diff --git a/src/status_im/users/screen.cljs b/src/status_im/users/screen.cljs index b40e29a30d..09de1948e6 100644 --- a/src/status_im/users/screen.cljs +++ b/src/status_im/users/screen.cljs @@ -39,9 +39,9 @@ (defview users [] [accounts [:get :accounts]] - (let [accounts (conj accounts {:name (label :t/add-account) - :address "0x0" - :photo-path :icon_plus})] + (let [accounts (conj (vals accounts) {:name (label :t/add-account) + :address "0x0" + :photo-path :icon_plus})] [view st/screen-container [linear-gradient {:colors ["rgba(182, 116, 241, 1)" "rgba(107, 147, 231, 1)" "rgba(43, 171, 238, 1)"] :start [0, 0] diff --git a/src/status_im/users/views/user.cljs b/src/status_im/users/views/user.cljs index 3ff295ed10..daf1a41387 100644 --- a/src/status_im/users/views/user.cljs +++ b/src/status_im/users/views/user.cljs @@ -15,7 +15,7 @@ (dispatch [:navigate-to :login address]) (dispatch [:set-in [:login :address] address])) -(defview user-view [{:keys [address photo-path name ] :as account}] +(defview user-view [{:keys [address photo-path name] :as account}] [current-account [:get :current-account]] [touchable-highlight {:onPress #(on-press address)} @@ -29,7 +29,7 @@ :style icon-plus}])]] [view st/name-container [text {:style st/name-text - :numberOfLines 1} name] + :numberOfLines 1} (or name address)] (when (not= address "0x0") [text {:style st/address-text :numberOfLines 1} address])]