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:
parent
a1fdfa8a90
commit
3518abab26
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user