1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

network name crash fix

This commit is contained in:
Jernej Pregelj 2019-07-12 10:25:11 +02:00
parent 69d7295f57
commit 645f79f733

View File

@ -248,7 +248,10 @@ export default class UserProvider extends PureComponent<{}, UserProviderState> {
private fetchNetwork = async () => {
const { ocean } = this.state
const network = await ocean.keeper.getNetworkName()
let network = 'Unknown'
try {
network = await ocean.keeper.getNetworkName()
} catch (error) {}
network !== this.state.network && this.setState({ network })
}