fix create-account white screen

This commit is contained in:
yenda 2018-09-20 18:36:12 +02:00
parent 08c132c8a6
commit 47b739b4df
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
5 changed files with 17 additions and 14 deletions

View File

@ -99,10 +99,18 @@
:enter-password (navigation/navigate-back cofx)
:confirm-password (reset-account-creation cofx)))
(defn navigate-to-create-account-screen [{:keys [db] :as cofx}]
(handlers-macro/merge-fx cofx
{:db (update db :accounts/create
#(-> %
(assoc :step :enter-password)
(dissoc :password :password-confirm :name :error)))}
(navigation/navigate-to-cofx :create-account nil)))
(defn navigate-to-authentication-method [{:keys [db] :as cofx}]
(if (hardwallet/hardwallet-supported? db)
(navigation/navigate-to-cofx :hardwallet/authentication-method nil cofx)
(navigation/navigate-to-cofx :create-account nil cofx)))
(navigate-to-create-account-screen cofx)))
;;;; COFX

View File

@ -1,6 +1,5 @@
(ns status-im.events
(:require status-im.ui.screens.accounts.create.navigation
status-im.ui.screens.accounts.recover.navigation
(:require status-im.ui.screens.accounts.recover.navigation
[re-frame.core :as re-frame]
[status-im.accounts.core :as accounts]
[status-im.accounts.create.core :as accounts.create]
@ -510,6 +509,11 @@
(fn [cofx _]
(hardwallet/navigate-to-connect-screen cofx)))
(handlers/register-handler-fx
:hardwallet.ui/password-option-pressed
(fn [cofx _]
(accounts.create/navigate-to-create-account-screen cofx)))
(handlers/register-handler-fx
:hardwallet.ui/go-to-settings-button-pressed
(fn [_ _]

View File

@ -1,9 +0,0 @@
(ns status-im.ui.screens.accounts.create.navigation
(:require [status-im.ui.screens.navigation :as nav]))
(defmethod nav/preload-data! :create-account
[db]
(update db :accounts/create
#(-> %
(assoc :step :enter-password)
(dissoc :password :password-confirm :name :error))))

View File

@ -39,4 +39,4 @@
:on-press #(re-frame/dispatch [:hardwallet.ui/status-hardwallet-option-pressed])}]
[authentication-method-row {:title (i18n/label :t/password)
:icon :icons/password
:on-press #(re-frame/dispatch [:navigate-to :create-account])}]]]])
:on-press #(re-frame/dispatch [:hardwallet.ui/password-option-pressed])}]]]])

View File

@ -20,7 +20,7 @@
:key :intro-text-description}]]
[react/view styles/buttons-container
[components.common/button {:button-style {:flex-direction :row}
:on-press #(re-frame/dispatch [:navigate-to :create-account])
:on-press #(re-frame/dispatch [:accounts.create.ui/create-new-account-button-pressed])
:label (i18n/label :t/create-account)}]
[react/view styles/bottom-button-container
[components.common/button {:on-press #(re-frame/dispatch [:navigate-to :recover])