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-20 10:19:10 +01:00
parent f345a12c76
commit 9125186590
4 changed files with 9 additions and 3 deletions

View File

@ -9,7 +9,7 @@
# This env var is a shortcut for a set of Ocean network component endpoints. # This env var is a shortcut for a set of Ocean network component endpoints.
# #
# Possible values: pacific, nile, duero, spree # Possible values: pacific, nile, duero, spree
REACT_APP_OCEAN_NETWORK=spree REACT_APP_OCEAN_NETWORK=pacific
# #
# APP CONFIG # APP CONFIG

View File

@ -43,7 +43,7 @@ export function NetworkSwitcher() {
return return
} }
return !isBurner ? null : ( return (
<div <div
ref={node} ref={node}
className={`${styles.networkListWrapper} ${ className={`${styles.networkListWrapper} ${

View File

@ -20,6 +20,8 @@ export default class Web3message extends PureComponent<{ extended?: boolean }> {
private Message = () => { private Message = () => {
const { networkMatch, network } = this.context const { networkMatch, network } = this.context
console.log(networkMatch)
return ( return (
<User.Consumer> <User.Consumer>
{user => ( {user => (

View File

@ -82,6 +82,8 @@ export default class UserProvider extends PureComponent<{}, UserProviderState> {
const metamaskProvider = new MetamaskProvider() const metamaskProvider = new MetamaskProvider()
await metamaskProvider.startLogin() await metamaskProvider.startLogin()
const web3 = metamaskProvider.getProvider() const web3 = metamaskProvider.getProvider()
console.log(web3.currentProvider)
console.log(web3)
this.setState( this.setState(
{ {
isLogged: true, isLogged: true,
@ -260,7 +262,9 @@ export default class UserProvider extends PureComponent<{}, UserProviderState> {
if (ocean.keeper) { if (ocean.keeper) {
network = await ocean.keeper.getNetworkName() network = await ocean.keeper.getNetworkName()
} }
network !== this.state.network && this.setState({ network }) if (network !== this.state.network) {
this.setState({ network })
}
console.log(await ocean.keeper.getNetworkName()) console.log(await ocean.keeper.getNetworkName())
} }