[fix #3505] Fix account initialization events order

Signed-off-by: Dmitry Novotochinov <trybeee@gmail.com>
This commit is contained in:
Dmitry Novotochinov 2018-03-06 14:15:43 +07:00
parent ed7705ca7f
commit 1f1ff9cbaf
No known key found for this signature in database
GPG Key ID: 267674DCC86628D9
1 changed files with 5 additions and 5 deletions

View File

@ -123,11 +123,11 @@
(fn [{{:keys [view-id] :as db} :db} [_ error address]]
(if (nil? error)
{:db (cond-> (dissoc db :accounts/login)
(= view-id :create-account)
(assoc-in [:accounts/create :step] :enter-name))
(= view-id :create-account)
(assoc-in [:accounts/create :step] :enter-name))
:dispatch-n (concat
[[:stop-debugging]
[:initialize-account address]]
(when (not= view-id :create-account)
[[:navigate-to-clean :home]]))}
[:initialize-account address
(when (not= view-id :create-account)
[[:navigate-to-clean :home]])]])}
(log/debug "Error changing acount: " error))))