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