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:
parent
69d7295f57
commit
645f79f733
@ -248,7 +248,10 @@ export default class UserProvider extends PureComponent<{}, UserProviderState> {
|
|||||||
|
|
||||||
private fetchNetwork = async () => {
|
private fetchNetwork = async () => {
|
||||||
const { ocean } = this.state
|
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 })
|
network !== this.state.network && this.setState({ network })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user