hide HW screens from navigation

Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
This commit is contained in:
Dmitry Novotochinov 2018-09-24 18:22:43 +03:00
parent 18b9ba0aac
commit acb8c7905d
No known key found for this signature in database
GPG Key ID: 43D1DAF5AD39C927
1 changed files with 45 additions and 40 deletions

View File

@ -69,7 +69,8 @@
[status-im.utils.random :as rand] [status-im.utils.random :as rand]
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[taoensso.timbre :as log] [taoensso.timbre :as log]
[status-im.utils.platform :as platform])) [status-im.utils.platform :as platform]
[status-im.utils.config :as config]))
(defn wrap [view-id component] (defn wrap [view-id component]
(fn [] (fn []
@ -133,14 +134,16 @@
:progress progress :progress progress
:create-account create-account :create-account create-account
:recover recover :recover recover
:accounts accounts :accounts accounts}
:hardwallet-authentication-method hardwallet-authentication-method (= :intro view-id)
(assoc :intro intro)
config/hardwallet-enabled?
(assoc :hardwallet-authentication-method hardwallet-authentication-method
:hardwallet-connect hardwallet-connect :hardwallet-connect hardwallet-connect
:hardwallet-setup hardwallet-setup :hardwallet-setup hardwallet-setup
:hardwallet-pin hardwallet-pin :hardwallet-pin hardwallet-pin
:hardwallet-success hardwallet-success} :hardwallet-success hardwallet-success)))
(= :intro view-id)
(assoc :intro intro)))
(cond-> {:headerMode "none"} (cond-> {:headerMode "none"}
(#{:intro :login} view-id) (#{:intro :login} view-id)
(assoc :initialRouteName (name view-id))))} (assoc :initialRouteName (name view-id))))}
@ -259,7 +262,7 @@
{:screen {:screen
(nav-reagent/stack-navigator (nav-reagent/stack-navigator
(stack-screens (stack-screens
{:my-profile (main-tabs/get-main-tab :my-profile) (cond-> {:my-profile (main-tabs/get-main-tab :my-profile)
:profile-photo-capture profile-photo-capture :profile-photo-capture profile-photo-capture
:about-app about-app/about-app :about-app about-app/about-app
:bootnodes-settings bootnodes-settings :bootnodes-settings bootnodes-settings
@ -281,12 +284,14 @@
:create-account create-account :create-account create-account
:recover recover :recover recover
:accounts accounts :accounts accounts
:hardwallet-authentication-method hardwallet-authentication-method :qr-scanner qr-scanner}
config/hardwallet-enabled?
(assoc :hardwallet-authentication-method hardwallet-authentication-method
:hardwallet-connect hardwallet-connect :hardwallet-connect hardwallet-connect
:hardwallet-pin hardwallet-pin :hardwallet-pin hardwallet-pin
:hardwallet-setup hardwallet-setup :hardwallet-setup hardwallet-setup
:hardwallet-success hardwallet-success :hardwallet-success hardwallet-success)))
:qr-scanner qr-scanner})
{:headerMode "none" {:headerMode "none"
:initialRouteName "my-profile"})} :initialRouteName "my-profile"})}
:profile-qr-viewer :profile-qr-viewer