From 645f79f733fb66e90f4da8bed0784854f711f7da Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Fri, 12 Jul 2019 10:25:11 +0200 Subject: [PATCH] network name crash fix --- client/src/context/UserProvider.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/context/UserProvider.tsx b/client/src/context/UserProvider.tsx index 30aacc8..7406c0f 100644 --- a/client/src/context/UserProvider.tsx +++ b/client/src/context/UserProvider.tsx @@ -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 }) }