1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
This commit is contained in:
Max Berman 2020-01-08 10:46:31 +01:00
parent 97ab54f4e9
commit f0e335b4da
2 changed files with 10 additions and 4 deletions

View File

@ -56,8 +56,15 @@ export function NetworkSwitcher() {
{Object.keys(CONNECTIONS).map((networkName, i) => (
<li
key={i}
style={{ cursor: 'pointer' }}
onClick={() => switchNetwork(networkName)}
style={{
cursor: 'pointer',
color:
userContext.network.toUpperCase() ===
networkName.toUpperCase()
? 'red'
: ''
}}
>
<span style={{ textTransform: 'capitalize' }}>
{networkName}
@ -65,9 +72,6 @@ export function NetworkSwitcher() {
</li>
))}
</ul>
<em style={{ textTransform: 'capitalize' }}>
{userContext.network}
</em>
</div>
)
}

View File

@ -16,6 +16,8 @@ console.log({ oceanConfig })
const { nodeUri } = oceanConfig
console.log(oceanConfig)
const POLL_ACCOUNTS = 1000 // every 1s
const POLL_NETWORK = POLL_ACCOUNTS * 60 // every 1 min
const DEFAULT_WEB3 = new Web3(new Web3.providers.HttpProvider(nodeUri)) // default web3