1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
This commit is contained in:
Jernej Pregelj 2019-07-12 10:51:43 +02:00
parent 645f79f733
commit a1fdfa8a90
2 changed files with 3 additions and 4 deletions

View File

@ -4,8 +4,6 @@ import React from 'react'
import { render } from '@testing-library/react' import { render } from '@testing-library/react'
import { DDO } from '@oceanprotocol/squid' import { DDO } from '@oceanprotocol/squid'
import AssetFilesDetails from './AssetFilesDetails' import AssetFilesDetails from './AssetFilesDetails'
import { User } from '../../../context'
import { userMockConnected } from '../../../../__mocks__/user-mock'
describe('AssetFilesDetails', () => { describe('AssetFilesDetails', () => {
it('renders without crashing', () => { it('renders without crashing', () => {

View File

@ -251,8 +251,9 @@ export default class UserProvider extends PureComponent<{}, UserProviderState> {
let network = 'Unknown' let network = 'Unknown'
try { try {
network = await ocean.keeper.getNetworkName() network = await ocean.keeper.getNetworkName()
} catch (error) {} } finally {
network !== this.state.network && this.setState({ network }) network !== this.state.network && this.setState({ network })
}
} }
public render() { public render() {