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

fix network error v2

This commit is contained in:
Jernej Pregelj 2019-07-12 11:18:43 +02:00
parent a1fdfa8a90
commit 3518abab26

View File

@ -249,11 +249,10 @@ export default class UserProvider extends PureComponent<{}, UserProviderState> {
private fetchNetwork = async () => {
const { ocean } = this.state
let network = 'Unknown'
try {
if (ocean.keeper) {
network = await ocean.keeper.getNetworkName()
} finally {
network !== this.state.network && this.setState({ network })
}
network !== this.state.network && this.setState({ network })
}
public render() {