Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Commit

Permalink
more package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kremalicious committed Mar 19, 2020
1 parent b7c6543 commit 192c541
Show file tree
Hide file tree
Showing 9 changed files with 2,109 additions and 453 deletions.
381 changes: 250 additions & 131 deletions client/package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions client/package.json
Expand Up @@ -16,7 +16,7 @@
"@oceanprotocol/art": "^2.2.0",
"@oceanprotocol/squid": "2.0.0-beta.4",
"@oceanprotocol/typographies": "^0.1.0",
"@sindresorhus/slugify": "^0.10.1",
"@sindresorhus/slugify": "^0.11.0",
"@truffle/hdwallet-provider": "^1.0.33",
"axios": "^0.19.2",
"bip39": "^3.0.2",
Expand All @@ -29,10 +29,10 @@
"moment": "^2.24.0",
"node-sass": "^4.13.1",
"query-string": "^6.11.1",
"react": "^16.13.0",
"react": "^16.13.1",
"react-collapsed": "^2.2.3",
"react-datepicker": "^2.14.0",
"react-dom": "^16.13.0",
"react-dom": "^16.13.1",
"react-dotdotdot": "^1.3.1",
"react-dropzone": "^10.2.1",
"react-ga": "^2.7.0",
Expand All @@ -49,8 +49,9 @@
},
"devDependencies": {
"@react-mock/state": "^0.1.8",
"@sheerun/mutationobserver-shim": "^0.3.3",
"@testing-library/jest-dom": "^5.1.1",
"@testing-library/react": "^9.5.0",
"@testing-library/react": "^10.0.1",
"@types/classnames": "^2.2.10",
"@types/is-url": "^1.2.28",
"@types/jest": "^25.1.4",
Expand Down
3 changes: 1 addition & 2 deletions client/src/hooks/use-ipfs-api.tsx
Expand Up @@ -24,15 +24,14 @@ export default function useIpfsApi(config: IpfsConfig) {
ipfsMessage = 'Checking IPFS gateway...'

try {
// eslint-disable-next-line require-atomic-updates
ipfs = await ipfsClient(config)
const version = await ipfs.version()
ipfsVersion = version.version
ipfsMessage = `Connected to ${config.host}`
} catch (error) {
setIpfsError(`IPFS connection error: ${error.message}`)
}
setIpfsReady(Boolean(await ipfs.id()))
setIpfsReady(Boolean(await (ipfs && ipfs.id())))
}

initIpfs()
Expand Down
6 changes: 5 additions & 1 deletion client/src/routes/Publish/Files/index.test.tsx
Expand Up @@ -70,7 +70,11 @@ describe('Files', () => {
// open
fireEvent.click(getByText('+ Add to IPFS'))
const text = await waitForElement(() =>
getByText(/Connected to / || /IPFS connection error/)
getByText(
/Checking IPFS gateway/ ||
/Connected to / ||
/IPFS connection error/
)
)
expect(text).toBeInTheDocument()

Expand Down
3 changes: 3 additions & 0 deletions client/src/setupTests.js
@@ -1 +1,4 @@
import '@testing-library/jest-dom/extend-expect'
import MutationObserver from '@sheerun/mutationobserver-shim'

window.MutationObserver = MutationObserver

0 comments on commit 192c541

Please sign in to comment.