Fix repeated key generation

Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
This commit is contained in:
Vitaliy Vlasov 2019-07-12 13:10:58 +03:00
parent 3c0a24f429
commit 5a02074426
No known key found for this signature in database
GPG Key ID: A7D57C347F2B2964
1 changed files with 8 additions and 5 deletions

View File

@ -170,11 +170,14 @@
(navigation/navigate-to-cofx :home nil)))
(fx/defn init-key-generation [{:keys [db] :as cofx}]
(let [node-started? (= :started (:node/status db))]
(fx/merge
{:db (-> db
(assoc-in [:intro-wizard :generating-keys?] true)
(assoc :node/on-ready :start-onboarding))}
(node/initialize nil)))
(if node-started?
{:intro-wizard/start-onboarding {:n 5 :mnemonic-length 12}}
(node/initialize nil)))))
(fx/defn on-confirm-failure [{:keys [db] :as cofx}]
(do