mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 19:16:59 +00:00
hide mainnet networks in prod build
This commit is contained in:
parent
576ece4032
commit
7dd0ba21a2
1
.env
1
.env
@ -4,3 +4,4 @@ DEBUG_LOGS_ENABLED=1
|
|||||||
STUB_STATUS_GO=0
|
STUB_STATUS_GO=0
|
||||||
NETWORK_SWITCHING=1
|
NETWORK_SWITCHING=1
|
||||||
ETHEREUM_DEV_CLUSTER=1
|
ETHEREUM_DEV_CLUSTER=1
|
||||||
|
MAINNET_NETWORKS_ENABLED=1
|
||||||
|
@ -4,3 +4,4 @@ DEBUG_LOGS_ENABLED=1
|
|||||||
STUB_STATUS_GO=0
|
STUB_STATUS_GO=0
|
||||||
NETWORK_SWITCHING=1
|
NETWORK_SWITCHING=1
|
||||||
ETHEREUM_DEV_CLUSTER=1
|
ETHEREUM_DEV_CLUSTER=1
|
||||||
|
MAINNET_NETWORKS_ENABLED=1
|
||||||
|
@ -4,3 +4,4 @@ DEBUG_LOGS_ENABLED=0
|
|||||||
STUB_STATUS_GO=0
|
STUB_STATUS_GO=0
|
||||||
NETWORK_SWITCHING=0
|
NETWORK_SWITCHING=0
|
||||||
ETHEREUM_DEV_CLUSTER=0
|
ETHEREUM_DEV_CLUSTER=0
|
||||||
|
MAINNET_NETWORKS_ENABLED=0
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
(ns status-im.constants
|
(ns status-im.constants
|
||||||
(:require [status-im.utils.types :as types]))
|
(:require [status-im.utils.types :as types]
|
||||||
|
[status-im.utils.config :as config]))
|
||||||
|
|
||||||
(def ethereum-rpc-url "http://localhost:8545")
|
(def ethereum-rpc-url "http://localhost:8545")
|
||||||
|
|
||||||
@ -42,38 +43,43 @@
|
|||||||
(= testnet-id rinkeby-id) "Rinkeby"
|
(= testnet-id rinkeby-id) "Rinkeby"
|
||||||
:else "Unknown"))
|
:else "Unknown"))
|
||||||
|
|
||||||
|
(def mainnet-networks
|
||||||
|
{"mainnet" {:id "mainnet",
|
||||||
|
:name "Mainnet",
|
||||||
|
:config {:NetworkId mainnet-id
|
||||||
|
:DataDir "/ethereum/mainnet"}}
|
||||||
|
"mainnet_rpc" {:id "mainnet_rpc",
|
||||||
|
:name "Mainnet with upstream RPC",
|
||||||
|
:config {:NetworkId mainnet-id
|
||||||
|
:DataDir "/ethereum/mainnet_rpc"
|
||||||
|
:UpstreamConfig {:Enabled true
|
||||||
|
:URL "https://mainnet.infura.io/z6GCTmjdP3FETEJmMBI4"}}}})
|
||||||
|
|
||||||
|
(def testnet-networks
|
||||||
|
{"testnet" {:id "testnet",
|
||||||
|
:name "Ropsten",
|
||||||
|
:config {:NetworkId ropsten-id
|
||||||
|
:DataDir "/ethereum/testnet"}}
|
||||||
|
"testnet_rpc" {:id "testnet_rpc",
|
||||||
|
:name "Ropsten with upstream RPC",
|
||||||
|
:config {:NetworkId ropsten-id
|
||||||
|
:DataDir "/ethereum/testnet_rpc"
|
||||||
|
:UpstreamConfig {:Enabled true
|
||||||
|
:URL "https://ropsten.infura.io/z6GCTmjdP3FETEJmMBI4"}}}
|
||||||
|
"rinkeby" {:id "rinkeby",
|
||||||
|
:name "Rinkeby",
|
||||||
|
:config {:NetworkId rinkeby-id
|
||||||
|
:DataDir "/ethereum/rinkeby"}}
|
||||||
|
"rinkeby_rpc" {:id "rinkeby_rpc",
|
||||||
|
:name "Rinkeby with upstream RPC",
|
||||||
|
:config {:NetworkId rinkeby-id
|
||||||
|
:DataDir "/ethereum/rinkeby_rpc"
|
||||||
|
:UpstreamConfig {:Enabled true
|
||||||
|
:URL "https://rinkeby.infura.io/z6GCTmjdP3FETEJmMBI4"}}}})
|
||||||
(def default-networks
|
(def default-networks
|
||||||
(transform-config
|
(transform-config
|
||||||
{"testnet" {:id "testnet",
|
(merge testnet-networks
|
||||||
:name "Ropsten",
|
(when config/mainnet-networks-enabled? mainnet-networks))))
|
||||||
:config {:NetworkId ropsten-id
|
|
||||||
:DataDir "/ethereum/testnet"}}
|
|
||||||
"testnet_rpc" {:id "testnet_rpc",
|
|
||||||
:name "Ropsten with upstream RPC",
|
|
||||||
:config {:NetworkId ropsten-id
|
|
||||||
:DataDir "/ethereum/testnet_rpc"
|
|
||||||
:UpstreamConfig {:Enabled true
|
|
||||||
:URL "https://ropsten.infura.io/z6GCTmjdP3FETEJmMBI4"}}}
|
|
||||||
"rinkeby" {:id "rinkeby",
|
|
||||||
:name "Rinkeby",
|
|
||||||
:config {:NetworkId rinkeby-id
|
|
||||||
:DataDir "/ethereum/rinkeby"}}
|
|
||||||
"rinkeby_rpc" {:id "rinkeby_rpc",
|
|
||||||
:name "Rinkeby with upstream RPC",
|
|
||||||
:config {:NetworkId rinkeby-id
|
|
||||||
:DataDir "/ethereum/rinkeby_rpc"
|
|
||||||
:UpstreamConfig {:Enabled true
|
|
||||||
:URL "https://rinkeby.infura.io/z6GCTmjdP3FETEJmMBI4"}}}
|
|
||||||
"mainnet" {:id "mainnet",
|
|
||||||
:name "Mainnet",
|
|
||||||
:config {:NetworkId mainnet-id
|
|
||||||
:DataDir "/ethereum/mainnet"}}
|
|
||||||
"mainnet_rpc" {:id "mainnet_rpc",
|
|
||||||
:name "Mainnet with upstream RPC",
|
|
||||||
:config {:NetworkId mainnet-id
|
|
||||||
:DataDir "/ethereum/mainnet_rpc"
|
|
||||||
:UpstreamConfig {:Enabled true
|
|
||||||
:URL "https://mainnet.infura.io/z6GCTmjdP3FETEJmMBI4 "}}}}))
|
|
||||||
|
|
||||||
(def ^:const send-transaction-no-error-code "0")
|
(def ^:const send-transaction-no-error-code "0")
|
||||||
(def ^:const send-transaction-default-error-code "1")
|
(def ^:const send-transaction-default-error-code "1")
|
||||||
|
@ -21,4 +21,5 @@
|
|||||||
(def notifications-wip-enabled? (enabled? (get-config :NOTIFICATIONS_WIP_ENABLED 0)))
|
(def notifications-wip-enabled? (enabled? (get-config :NOTIFICATIONS_WIP_ENABLED 0)))
|
||||||
(def stub-status-go? (enabled? (get-config :STUB_STATUS_GO 0)))
|
(def stub-status-go? (enabled? (get-config :STUB_STATUS_GO 0)))
|
||||||
(def network-switching-enabled? (enabled? (get-config :NETWORK_SWITCHING 0)))
|
(def network-switching-enabled? (enabled? (get-config :NETWORK_SWITCHING 0)))
|
||||||
|
(def mainnet-networks-enabled? (enabled? (get-config :MAINNET_NETWORKS_ENABLED 0)))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user