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]
[re-frame.core :as re-frame]
[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]
(fn []
@ -133,14 +134,16 @@
:progress progress
:create-account create-account
:recover recover
:accounts accounts
:hardwallet-authentication-method hardwallet-authentication-method
:accounts accounts}
(= :intro view-id)
(assoc :intro intro)
config/hardwallet-enabled?
(assoc :hardwallet-authentication-method hardwallet-authentication-method
:hardwallet-connect hardwallet-connect
:hardwallet-setup hardwallet-setup
:hardwallet-pin hardwallet-pin
:hardwallet-success hardwallet-success}
(= :intro view-id)
(assoc :intro intro)))
:hardwallet-success hardwallet-success)))
(cond-> {:headerMode "none"}
(#{:intro :login} view-id)
(assoc :initialRouteName (name view-id))))}
@ -259,7 +262,7 @@
{:screen
(nav-reagent/stack-navigator
(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
:about-app about-app/about-app
:bootnodes-settings bootnodes-settings
@ -281,12 +284,14 @@
:create-account create-account
:recover recover
: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-pin hardwallet-pin
:hardwallet-setup hardwallet-setup
:hardwallet-success hardwallet-success
:qr-scanner qr-scanner})
:hardwallet-success hardwallet-success)))
{:headerMode "none"
:initialRouteName "my-profile"})}
:profile-qr-viewer