[#4671 #4708] mainnet_rpc as default network, no mainnet warning

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
Roman Volosovskyi 2018-06-13 11:56:52 +03:00 committed by Andrea Maria Piana
parent ef0fa75ad4
commit 77cb0c2f3d
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
8 changed files with 3 additions and 25 deletions

1
.env
View File

@ -1,7 +1,6 @@
TESTFAIRY_ENABLED=0 TESTFAIRY_ENABLED=0
STUB_STATUS_GO=0 STUB_STATUS_GO=0
ETHEREUM_DEV_CLUSTER=1 ETHEREUM_DEV_CLUSTER=1
MAINNET_WARNING_ENABLED=0
OFFLINE_INBOX_ENABLED=1 OFFLINE_INBOX_ENABLED=1
RPC_NETWORKS_ONLY=1 RPC_NETWORKS_ONLY=1
LOG_LEVEL=debug LOG_LEVEL=debug

View File

@ -1,7 +1,6 @@
TESTFAIRY_ENABLED=1 TESTFAIRY_ENABLED=1
STUB_STATUS_GO=0 STUB_STATUS_GO=0
ETHEREUM_DEV_CLUSTER=1 ETHEREUM_DEV_CLUSTER=1
MAINNET_WARNING_ENABLED=0
OFFLINE_INBOX_ENABLED=1 OFFLINE_INBOX_ENABLED=1
LOG_LEVEL=debug LOG_LEVEL=debug
LOG_LEVEL_STATUS_GO=info LOG_LEVEL_STATUS_GO=info

View File

@ -1,7 +1,6 @@
TESTFAIRY_ENABLED=1 TESTFAIRY_ENABLED=1
STUB_STATUS_GO=0 STUB_STATUS_GO=0
ETHEREUM_DEV_CLUSTER=1 ETHEREUM_DEV_CLUSTER=1
MAINNET_WARNING_ENABLED=0
OFFLINE_INBOX_ENABLED=1 OFFLINE_INBOX_ENABLED=1
LOG_LEVEL=debug LOG_LEVEL=debug
LOG_LEVEL_STATUS_GO=info LOG_LEVEL_STATUS_GO=info

View File

@ -1,7 +1,6 @@
TESTFAIRY_ENABLED=1 TESTFAIRY_ENABLED=1
STUB_STATUS_GO=0 STUB_STATUS_GO=0
ETHEREUM_DEV_CLUSTER=1 ETHEREUM_DEV_CLUSTER=1
MAINNET_NETWORKS_ENABLED=1
OFFLINE_INBOX_ENABLED=1 OFFLINE_INBOX_ENABLED=1
LOG_LEVEL=debug LOG_LEVEL=debug
LOG_LEVEL_STATUS_GO=info LOG_LEVEL_STATUS_GO=info

View File

@ -11,7 +11,7 @@ RN_BRIDGE_THRESHOLD_WARNINGS=0
POW_TARGET=0.002 POW_TARGET=0.002
POW_TIME=1 POW_TIME=1
MIXPANEL_TOKEN=2584e00100d319d12e538cc4d0fa9fc1 MIXPANEL_TOKEN=2584e00100d319d12e538cc4d0fa9fc1
DEFAULT_NETWORK=testnet_rpc DEFAULT_NETWORK=mainnet_rpc
TESTFAIRY_TOKEN=969f6c921cb435cea1d41d1ea3f5b247d6026d55 TESTFAIRY_TOKEN=969f6c921cb435cea1d41d1ea3f5b247d6026d55
INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c
DEBUG_WEBVIEW=0 DEBUG_WEBVIEW=0

View File

@ -669,10 +669,6 @@
:delete-bootnode-are-you-sure "Are you sure you want to delete this bootnode?" :delete-bootnode-are-you-sure "Are you sure you want to delete this bootnode?"
:delete-bootnode "Delete bootnode" :delete-bootnode "Delete bootnode"
:mainnet-warning-title "Warning!"
:mainnet-warning-text "While we highly appreciate your contribution as a tester of Status, wed like to point out the dangers. Youre 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" :main-networks "Main networks"
:test-networks "Test networks" :test-networks "Test networks"
:custom-networks "Custom networks" :custom-networks "Custom networks"

View File

@ -10,10 +10,7 @@
[status-im.ui.components.toolbar.view :as toolbar] [status-im.ui.components.toolbar.view :as toolbar]
[status-im.ui.components.toolbar.actions :as toolbar.actions] [status-im.ui.components.toolbar.actions :as toolbar.actions]
[status-im.ui.components.styles :as components.styles] [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.ui.screens.network-settings.styles :as styles]
[status-im.utils.utils :as utils]
[status-im.utils.config :as config]))
(defn- network-icon [connected? size] (defn- network-icon [connected? size]
[react/view (styles/network-icon connected? size) [react/view (styles/network-icon connected? size)
@ -38,20 +35,10 @@
(defn navigate-to-add-network [] (defn navigate-to-add-network []
(re-frame/dispatch [:edit-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] (defn render-network [current-network]
(fn [{:keys [id name] :as network}] (fn [{:keys [id name] :as network}]
(let [connected? (= id current-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 [react/view styles/network-item
[network-icon connected? 40] [network-icon connected? 40]
[react/view {:padding-horizontal 16} [react/view {:padding-horizontal 16}

View File

@ -20,7 +20,6 @@
(def testfairy-enabled? (enabled? (get-config :TESTFAIRY_ENABLED))) (def testfairy-enabled? (enabled? (get-config :TESTFAIRY_ENABLED)))
(def stub-status-go? (enabled? (get-config :STUB_STATUS_GO 0))) (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 offline-inbox-enabled? (enabled? (get-config :OFFLINE_INBOX_ENABLED "1")))
(def bootnodes-settings-enabled? (enabled? (get-config :BOOTNODES_SETTINGS_ENABLED "1"))) (def bootnodes-settings-enabled? (enabled? (get-config :BOOTNODES_SETTINGS_ENABLED "1")))
(def log-level (def log-level