diff --git a/package-lock.json b/package-lock.json index 5c14421a4..fe114c488 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@coingecko/cryptoformat": "^0.5.4", "@loadable/component": "^5.15.2", "@oceanprotocol/art": "^3.2.0", - "@oceanprotocol/lib": "^2.2.3", + "@oceanprotocol/lib": "^2.4.0", "@oceanprotocol/typographies": "^0.1.0", "@oceanprotocol/use-dark-mode": "^2.4.3", "@tippyjs/react": "^4.2.6", @@ -4534,16 +4534,16 @@ "integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA==" }, "node_modules/@oceanprotocol/contracts": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.7.tgz", - "integrity": "sha512-Oe+oBRiu1dlco9PQ7eUYcTYi2Nua69S3TiSw62H46AIpwnFK8ORuO0Ny20No++KisBA9F+84b5lDn6kQy5Lt/Q==" + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.8.tgz", + "integrity": "sha512-I6xoADZpP/8EyN3VWZ+dLYv24DbJj3xzmSDcYv0FolXeAUF3FluzminL5AgQtAaoyUtlHl1D3ij1B++KupWcQQ==" }, "node_modules/@oceanprotocol/lib": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-2.2.3.tgz", - "integrity": "sha512-jBD6bD1dPd7MHiiMA0V2hBntHM0vhmYpzeuv2dNj/2i1FNvTzpQO3v4a5V+Ahxs6L6YirBBfzT3HHtGKOghc5w==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-2.4.0.tgz", + "integrity": "sha512-4p2eaDZ2fOna3dEOLGpdzA/46UMCXuktw2JMfUIDMZ+3gRGFg8JzRDJ6w5qAYF8Omm+JkRCZnmEzKJtvlrNIvg==", "dependencies": { - "@oceanprotocol/contracts": "^1.1.7", + "@oceanprotocol/contracts": "^1.1.8", "bignumber.js": "^9.1.0", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", @@ -44798,16 +44798,16 @@ "integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA==" }, "@oceanprotocol/contracts": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.7.tgz", - "integrity": "sha512-Oe+oBRiu1dlco9PQ7eUYcTYi2Nua69S3TiSw62H46AIpwnFK8ORuO0Ny20No++KisBA9F+84b5lDn6kQy5Lt/Q==" + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.8.tgz", + "integrity": "sha512-I6xoADZpP/8EyN3VWZ+dLYv24DbJj3xzmSDcYv0FolXeAUF3FluzminL5AgQtAaoyUtlHl1D3ij1B++KupWcQQ==" }, "@oceanprotocol/lib": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-2.2.3.tgz", - "integrity": "sha512-jBD6bD1dPd7MHiiMA0V2hBntHM0vhmYpzeuv2dNj/2i1FNvTzpQO3v4a5V+Ahxs6L6YirBBfzT3HHtGKOghc5w==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-2.4.0.tgz", + "integrity": "sha512-4p2eaDZ2fOna3dEOLGpdzA/46UMCXuktw2JMfUIDMZ+3gRGFg8JzRDJ6w5qAYF8Omm+JkRCZnmEzKJtvlrNIvg==", "requires": { - "@oceanprotocol/contracts": "^1.1.7", + "@oceanprotocol/contracts": "^1.1.8", "bignumber.js": "^9.1.0", "cross-fetch": "^3.1.5", "crypto-js": "^4.1.1", diff --git a/package.json b/package.json index 454d933f2..a41085f73 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@coingecko/cryptoformat": "^0.5.4", "@loadable/component": "^5.15.2", "@oceanprotocol/art": "^3.2.0", - "@oceanprotocol/lib": "^2.2.3", + "@oceanprotocol/lib": "^2.4.0", "@oceanprotocol/typographies": "^0.1.0", "@oceanprotocol/use-dark-mode": "^2.4.3", "@tippyjs/react": "^4.2.6", diff --git a/src/@utils/provider.ts b/src/@utils/provider.ts index 552b73ee0..583ca04d9 100644 --- a/src/@utils/provider.ts +++ b/src/@utils/provider.ts @@ -6,7 +6,8 @@ import { FileInfo, LoggerInstance, ProviderComputeInitializeResults, - ProviderInstance + ProviderInstance, + UrlFile } from '@oceanprotocol/lib' import Web3 from 'web3' import { getValidUntilTime } from './compute' @@ -87,7 +88,13 @@ export async function getFileUrlInfo( providerUrl: string ): Promise { 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 } catch (error) { LoggerInstance.error(error.message)