From a1fdfa8a90455db82fcb8d48cd9faff75596d3b7 Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Fri, 12 Jul 2019 10:51:43 +0200 Subject: [PATCH] linting --- .../components/templates/Asset/AssetFilesDetails.test.tsx | 2 -- client/src/context/UserProvider.tsx | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/components/templates/Asset/AssetFilesDetails.test.tsx b/client/src/components/templates/Asset/AssetFilesDetails.test.tsx index 5420c13..2b9f085 100644 --- a/client/src/components/templates/Asset/AssetFilesDetails.test.tsx +++ b/client/src/components/templates/Asset/AssetFilesDetails.test.tsx @@ -4,8 +4,6 @@ import React from 'react' import { render } from '@testing-library/react' import { DDO } from '@oceanprotocol/squid' import AssetFilesDetails from './AssetFilesDetails' -import { User } from '../../../context' -import { userMockConnected } from '../../../../__mocks__/user-mock' describe('AssetFilesDetails', () => { it('renders without crashing', () => { diff --git a/client/src/context/UserProvider.tsx b/client/src/context/UserProvider.tsx index 7406c0f..a7895af 100644 --- a/client/src/context/UserProvider.tsx +++ b/client/src/context/UserProvider.tsx @@ -251,8 +251,9 @@ export default class UserProvider extends PureComponent<{}, UserProviderState> { let network = 'Unknown' try { network = await ocean.keeper.getNetworkName() - } catch (error) {} - network !== this.state.network && this.setState({ network }) + } finally { + network !== this.state.network && this.setState({ network }) + } } public render() {