mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
wip
This commit is contained in:
parent
97ab54f4e9
commit
f0e335b4da
@ -56,8 +56,15 @@ export function NetworkSwitcher() {
|
|||||||
{Object.keys(CONNECTIONS).map((networkName, i) => (
|
{Object.keys(CONNECTIONS).map((networkName, i) => (
|
||||||
<li
|
<li
|
||||||
key={i}
|
key={i}
|
||||||
style={{ cursor: 'pointer' }}
|
|
||||||
onClick={() => switchNetwork(networkName)}
|
onClick={() => switchNetwork(networkName)}
|
||||||
|
style={{
|
||||||
|
cursor: 'pointer',
|
||||||
|
color:
|
||||||
|
userContext.network.toUpperCase() ===
|
||||||
|
networkName.toUpperCase()
|
||||||
|
? 'red'
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span style={{ textTransform: 'capitalize' }}>
|
<span style={{ textTransform: 'capitalize' }}>
|
||||||
{networkName}
|
{networkName}
|
||||||
@ -65,9 +72,6 @@ export function NetworkSwitcher() {
|
|||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
<em style={{ textTransform: 'capitalize' }}>
|
|
||||||
{userContext.network}
|
|
||||||
</em>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ console.log({ oceanConfig })
|
|||||||
|
|
||||||
const { nodeUri } = oceanConfig
|
const { nodeUri } = oceanConfig
|
||||||
|
|
||||||
|
console.log(oceanConfig)
|
||||||
|
|
||||||
const POLL_ACCOUNTS = 1000 // every 1s
|
const POLL_ACCOUNTS = 1000 // every 1s
|
||||||
const POLL_NETWORK = POLL_ACCOUNTS * 60 // every 1 min
|
const POLL_NETWORK = POLL_ACCOUNTS * 60 // every 1 min
|
||||||
const DEFAULT_WEB3 = new Web3(new Web3.providers.HttpProvider(nodeUri)) // default web3
|
const DEFAULT_WEB3 = new Web3(new Web3.providers.HttpProvider(nodeUri)) // default web3
|
||||||
|
Loading…
Reference in New Issue
Block a user