Fix repeated key generation
Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
This commit is contained in:
parent
3c0a24f429
commit
5a02074426
|
@ -170,11 +170,14 @@
|
||||||
(navigation/navigate-to-cofx :home nil)))
|
(navigation/navigate-to-cofx :home nil)))
|
||||||
|
|
||||||
(fx/defn init-key-generation [{:keys [db] :as cofx}]
|
(fx/defn init-key-generation [{:keys [db] :as cofx}]
|
||||||
(fx/merge
|
(let [node-started? (= :started (:node/status db))]
|
||||||
{:db (-> db
|
(fx/merge
|
||||||
(assoc-in [:intro-wizard :generating-keys?] true)
|
{:db (-> db
|
||||||
(assoc :node/on-ready :start-onboarding))}
|
(assoc-in [:intro-wizard :generating-keys?] true)
|
||||||
(node/initialize nil)))
|
(assoc :node/on-ready :start-onboarding))}
|
||||||
|
(if node-started?
|
||||||
|
{:intro-wizard/start-onboarding {:n 5 :mnemonic-length 12}}
|
||||||
|
(node/initialize nil)))))
|
||||||
|
|
||||||
(fx/defn on-confirm-failure [{:keys [db] :as cofx}]
|
(fx/defn on-confirm-failure [{:keys [db] :as cofx}]
|
||||||
(do
|
(do
|
||||||
|
|
Loading…
Reference in New Issue