1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

update ocean.js to v2.4.0 (#1751)

This commit is contained in:
mihaisc 2022-10-25 12:16:28 +03:00 committed by GitHub
parent 508d615855
commit 51b167fb14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 18 deletions

30
package-lock.json generated
View File

@ -13,7 +13,7 @@
"@coingecko/cryptoformat": "^0.5.4", "@coingecko/cryptoformat": "^0.5.4",
"@loadable/component": "^5.15.2", "@loadable/component": "^5.15.2",
"@oceanprotocol/art": "^3.2.0", "@oceanprotocol/art": "^3.2.0",
"@oceanprotocol/lib": "^2.2.3", "@oceanprotocol/lib": "^2.4.0",
"@oceanprotocol/typographies": "^0.1.0", "@oceanprotocol/typographies": "^0.1.0",
"@oceanprotocol/use-dark-mode": "^2.4.3", "@oceanprotocol/use-dark-mode": "^2.4.3",
"@tippyjs/react": "^4.2.6", "@tippyjs/react": "^4.2.6",
@ -4534,16 +4534,16 @@
"integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA==" "integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA=="
}, },
"node_modules/@oceanprotocol/contracts": { "node_modules/@oceanprotocol/contracts": {
"version": "1.1.7", "version": "1.1.8",
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.7.tgz", "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.8.tgz",
"integrity": "sha512-Oe+oBRiu1dlco9PQ7eUYcTYi2Nua69S3TiSw62H46AIpwnFK8ORuO0Ny20No++KisBA9F+84b5lDn6kQy5Lt/Q==" "integrity": "sha512-I6xoADZpP/8EyN3VWZ+dLYv24DbJj3xzmSDcYv0FolXeAUF3FluzminL5AgQtAaoyUtlHl1D3ij1B++KupWcQQ=="
}, },
"node_modules/@oceanprotocol/lib": { "node_modules/@oceanprotocol/lib": {
"version": "2.2.3", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-2.2.3.tgz", "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-2.4.0.tgz",
"integrity": "sha512-jBD6bD1dPd7MHiiMA0V2hBntHM0vhmYpzeuv2dNj/2i1FNvTzpQO3v4a5V+Ahxs6L6YirBBfzT3HHtGKOghc5w==", "integrity": "sha512-4p2eaDZ2fOna3dEOLGpdzA/46UMCXuktw2JMfUIDMZ+3gRGFg8JzRDJ6w5qAYF8Omm+JkRCZnmEzKJtvlrNIvg==",
"dependencies": { "dependencies": {
"@oceanprotocol/contracts": "^1.1.7", "@oceanprotocol/contracts": "^1.1.8",
"bignumber.js": "^9.1.0", "bignumber.js": "^9.1.0",
"cross-fetch": "^3.1.5", "cross-fetch": "^3.1.5",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
@ -44798,16 +44798,16 @@
"integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA==" "integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA=="
}, },
"@oceanprotocol/contracts": { "@oceanprotocol/contracts": {
"version": "1.1.7", "version": "1.1.8",
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.7.tgz", "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.8.tgz",
"integrity": "sha512-Oe+oBRiu1dlco9PQ7eUYcTYi2Nua69S3TiSw62H46AIpwnFK8ORuO0Ny20No++KisBA9F+84b5lDn6kQy5Lt/Q==" "integrity": "sha512-I6xoADZpP/8EyN3VWZ+dLYv24DbJj3xzmSDcYv0FolXeAUF3FluzminL5AgQtAaoyUtlHl1D3ij1B++KupWcQQ=="
}, },
"@oceanprotocol/lib": { "@oceanprotocol/lib": {
"version": "2.2.3", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-2.2.3.tgz", "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-2.4.0.tgz",
"integrity": "sha512-jBD6bD1dPd7MHiiMA0V2hBntHM0vhmYpzeuv2dNj/2i1FNvTzpQO3v4a5V+Ahxs6L6YirBBfzT3HHtGKOghc5w==", "integrity": "sha512-4p2eaDZ2fOna3dEOLGpdzA/46UMCXuktw2JMfUIDMZ+3gRGFg8JzRDJ6w5qAYF8Omm+JkRCZnmEzKJtvlrNIvg==",
"requires": { "requires": {
"@oceanprotocol/contracts": "^1.1.7", "@oceanprotocol/contracts": "^1.1.8",
"bignumber.js": "^9.1.0", "bignumber.js": "^9.1.0",
"cross-fetch": "^3.1.5", "cross-fetch": "^3.1.5",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",

View File

@ -26,7 +26,7 @@
"@coingecko/cryptoformat": "^0.5.4", "@coingecko/cryptoformat": "^0.5.4",
"@loadable/component": "^5.15.2", "@loadable/component": "^5.15.2",
"@oceanprotocol/art": "^3.2.0", "@oceanprotocol/art": "^3.2.0",
"@oceanprotocol/lib": "^2.2.3", "@oceanprotocol/lib": "^2.4.0",
"@oceanprotocol/typographies": "^0.1.0", "@oceanprotocol/typographies": "^0.1.0",
"@oceanprotocol/use-dark-mode": "^2.4.3", "@oceanprotocol/use-dark-mode": "^2.4.3",
"@tippyjs/react": "^4.2.6", "@tippyjs/react": "^4.2.6",

View File

@ -6,7 +6,8 @@ import {
FileInfo, FileInfo,
LoggerInstance, LoggerInstance,
ProviderComputeInitializeResults, ProviderComputeInitializeResults,
ProviderInstance ProviderInstance,
UrlFile
} from '@oceanprotocol/lib' } from '@oceanprotocol/lib'
import Web3 from 'web3' import Web3 from 'web3'
import { getValidUntilTime } from './compute' import { getValidUntilTime } from './compute'
@ -87,7 +88,13 @@ export async function getFileUrlInfo(
providerUrl: string providerUrl: string
): Promise<FileInfo[]> { ): Promise<FileInfo[]> {
try { try {
const response = await ProviderInstance.checkFileUrl(url, providerUrl) const fileUrl: UrlFile = {
type: 'url',
index: 0,
url,
method: 'get'
}
const response = await ProviderInstance.getFileInfo(fileUrl, providerUrl)
return response return response
} catch (error) { } catch (error) {
LoggerInstance.error(error.message) LoggerInstance.error(error.message)