Merge pull request #533 from status-im/bug/#526

Show password request only for a new account
This commit is contained in:
Roman Volosovskyi 2016-12-02 11:40:27 +02:00 committed by GitHub
commit 02aa30988b
3 changed files with 9 additions and 5 deletions

View File

@ -67,7 +67,7 @@
(get accounts current-account-id)
account' (assoc account :network (or acc-network network))]
(accounts-store/save (get accounts current-account-id) true)))
(accounts-store/save account' true)))
(defn send-account-update
[{:keys [current-account-id current-public-key web3 accounts]} _]

View File

@ -5,8 +5,12 @@
[status-im.utils.types :refer [json->clj]]
[status-im.data-store.core :as data-store]
[status-im.components.status :as status]
[status-im.constants :refer [console-chat-id]]))
[status-im.constants :refer [console-chat-id]]
[status-im.navigation.handlers :as nav]))
(defmethod nav/preload-data! :login
[db]
(update db :login dissoc :error :password))
(defn set-login-from-qr
[{:keys [login] :as db} [_ _ login-info]]

View File

@ -201,8 +201,7 @@
(set-message-shown db chat-id message-id)))
(defn init-console-chat
([existing-account?] (init-console-chat {} existing-account?))
([{:keys [chats] :as db} existing-account?]
([{:keys [chats current-account-id] :as db} existing-account?]
(let [new-chat sign-up-service/console-chat]
(if (chats console-chat-id)
db
@ -210,7 +209,8 @@
(dispatch [:add-contacts [sign-up-service/console-contact]])
(chats/save new-chat)
(contacts/save-all [sign-up-service/console-contact])
(sign-up-service/intro)
(when-not current-account-id
(sign-up-service/intro))
(when existing-account?
(sign-up-service/start-signup))
(-> db