Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
ef0fa75ad4
commit
77cb0c2f3d
1
.env
1
.env
|
@ -1,7 +1,6 @@
|
|||
TESTFAIRY_ENABLED=0
|
||||
STUB_STATUS_GO=0
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
MAINNET_WARNING_ENABLED=0
|
||||
OFFLINE_INBOX_ENABLED=1
|
||||
RPC_NETWORKS_ONLY=1
|
||||
LOG_LEVEL=debug
|
||||
|
|
1
.env.e2e
1
.env.e2e
|
@ -1,7 +1,6 @@
|
|||
TESTFAIRY_ENABLED=1
|
||||
STUB_STATUS_GO=0
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
MAINNET_WARNING_ENABLED=0
|
||||
OFFLINE_INBOX_ENABLED=1
|
||||
LOG_LEVEL=debug
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
TESTFAIRY_ENABLED=1
|
||||
STUB_STATUS_GO=0
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
MAINNET_WARNING_ENABLED=0
|
||||
OFFLINE_INBOX_ENABLED=1
|
||||
LOG_LEVEL=debug
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
TESTFAIRY_ENABLED=1
|
||||
STUB_STATUS_GO=0
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
MAINNET_NETWORKS_ENABLED=1
|
||||
OFFLINE_INBOX_ENABLED=1
|
||||
LOG_LEVEL=debug
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
|
|
|
@ -11,7 +11,7 @@ RN_BRIDGE_THRESHOLD_WARNINGS=0
|
|||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
MIXPANEL_TOKEN=2584e00100d319d12e538cc4d0fa9fc1
|
||||
DEFAULT_NETWORK=testnet_rpc
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
TESTFAIRY_TOKEN=969f6c921cb435cea1d41d1ea3f5b247d6026d55
|
||||
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
|
||||
DEBUG_WEBVIEW=0
|
||||
|
|
|
@ -669,10 +669,6 @@
|
|||
:delete-bootnode-are-you-sure "Are you sure you want to delete this bootnode?"
|
||||
:delete-bootnode "Delete bootnode"
|
||||
|
||||
:mainnet-warning-title "Warning!"
|
||||
:mainnet-warning-text "While we highly appreciate your contribution as a tester of Status, we’d like to point out the dangers. You’re switching to Mainnet mode which is still in Alpha. This means it is still in development and has not been audited yet. Some of the risks you may be exposed to include:\n\n- Accounts may be unrecoverable due to breaking changes\n- Loss of ETH and tokens\n- Failure to send or receive messages\n\nSwitching to Mainnet should be done for testing purposes only. By tapping \"I understand\", you confirm that you assume the full responsibility for all risks concerning your data and funds. "
|
||||
:mainnet-warning-ok-text "I understand"
|
||||
|
||||
:main-networks "Main networks"
|
||||
:test-networks "Test networks"
|
||||
:custom-networks "Custom networks"
|
||||
|
|
|
@ -10,10 +10,7 @@
|
|||
[status-im.ui.components.toolbar.view :as toolbar]
|
||||
[status-im.ui.components.toolbar.actions :as toolbar.actions]
|
||||
[status-im.ui.components.styles :as components.styles]
|
||||
[status-im.ui.components.common.common :as components.common]
|
||||
[status-im.ui.screens.network-settings.styles :as styles]
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im.utils.config :as config]))
|
||||
[status-im.ui.screens.network-settings.styles :as styles]))
|
||||
|
||||
(defn- network-icon [connected? size]
|
||||
[react/view (styles/network-icon connected? size)
|
||||
|
@ -38,20 +35,10 @@
|
|||
(defn navigate-to-add-network []
|
||||
(re-frame/dispatch [:edit-network]))
|
||||
|
||||
(defn wrap-mainnet-warning [network cb]
|
||||
(fn []
|
||||
(if (and config/mainnet-warning-enabled?
|
||||
(mainnet? (:id network)))
|
||||
(utils/show-confirmation (i18n/label :t/mainnet-warning-title)
|
||||
(i18n/label :t/mainnet-warning-text)
|
||||
(i18n/label :t/mainnet-warning-ok-text)
|
||||
#(cb network))
|
||||
(cb network))))
|
||||
|
||||
(defn render-network [current-network]
|
||||
(fn [{:keys [id name] :as network}]
|
||||
(let [connected? (= id current-network)]
|
||||
[list/touchable-item (wrap-mainnet-warning network navigate-to-network)
|
||||
[list/touchable-item #(navigate-to-network network)
|
||||
[react/view styles/network-item
|
||||
[network-icon connected? 40]
|
||||
[react/view {:padding-horizontal 16}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
(def testfairy-enabled? (enabled? (get-config :TESTFAIRY_ENABLED)))
|
||||
(def stub-status-go? (enabled? (get-config :STUB_STATUS_GO 0)))
|
||||
(def mainnet-warning-enabled? (enabled? (get-config :MAINNET_WARNING_ENABLED 0)))
|
||||
(def offline-inbox-enabled? (enabled? (get-config :OFFLINE_INBOX_ENABLED "1")))
|
||||
(def bootnodes-settings-enabled? (enabled? (get-config :BOOTNODES_SETTINGS_ENABLED "1")))
|
||||
(def log-level
|
||||
|
|
Loading…
Reference in New Issue