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 []
@ -129,18 +130,20 @@
{:screen {:screen
(nav-reagent/stack-navigator (nav-reagent/stack-navigator
(stack-screens (stack-screens
(cond-> {:login login (cond-> {:login login
: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
:hardwallet-connect hardwallet-connect
:hardwallet-setup hardwallet-setup
:hardwallet-pin hardwallet-pin
:hardwallet-success hardwallet-success}
(= :intro view-id) (= :intro view-id)
(assoc :intro intro))) (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)))
(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,34 +262,36 @@
{: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
:edit-bootnode edit-bootnode :edit-bootnode edit-bootnode
:offline-messaging-settings offline-messaging-settings :offline-messaging-settings offline-messaging-settings
:edit-mailserver edit-mailserver :edit-mailserver edit-mailserver
:help-center help-center :help-center help-center
:extensions-settings extensions-settings :extensions-settings extensions-settings
:add-extension add-extension :add-extension add-extension
:show-extension show-extension :show-extension show-extension
:network-settings network-settings :network-settings network-settings
:network-details network-details :network-details network-details
:edit-network edit-network :edit-network edit-network
:log-level-settings log-level-settings :log-level-settings log-level-settings
:fleet-settings fleet-settings :fleet-settings fleet-settings
:currency-settings currency-settings :currency-settings currency-settings
:backup-seed backup-seed :backup-seed backup-seed
:login login :login login
: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}
:hardwallet-connect hardwallet-connect
:hardwallet-pin hardwallet-pin config/hardwallet-enabled?
:hardwallet-setup hardwallet-setup (assoc :hardwallet-authentication-method hardwallet-authentication-method
:hardwallet-success hardwallet-success :hardwallet-connect hardwallet-connect
:qr-scanner qr-scanner}) :hardwallet-pin hardwallet-pin
:hardwallet-setup hardwallet-setup
:hardwallet-success hardwallet-success)))
{:headerMode "none" {:headerMode "none"
:initialRouteName "my-profile"})} :initialRouteName "my-profile"})}
:profile-qr-viewer :profile-qr-viewer