diff --git a/src/@utils/provider.ts b/src/@utils/provider.ts index c55f54eea..ec3863e73 100644 --- a/src/@utils/provider.ts +++ b/src/@utils/provider.ts @@ -3,7 +3,7 @@ import { ComputeAsset, ComputeEnvironment, downloadFileBrowser, - FileMetadata, + FileInfo as FileInfoData, LoggerInstance, ProviderComputeInitializeResults, ProviderInstance @@ -69,7 +69,7 @@ export async function getFileDidInfo( did: string, serviceId: string, providerUrl: string -): Promise { +): Promise { try { const response = await ProviderInstance.checkDidFiles( did, @@ -85,7 +85,7 @@ export async function getFileDidInfo( export async function getFileUrlInfo( url: string, providerUrl: string -): Promise { +): Promise { try { const response = await ProviderInstance.checkFileUrl(url, providerUrl) return response diff --git a/src/components/@shared/FileIcon/index.tsx b/src/components/@shared/FileIcon/index.tsx index 95429f6c5..ce95f0643 100644 --- a/src/components/@shared/FileIcon/index.tsx +++ b/src/components/@shared/FileIcon/index.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames/bind' import cleanupContentType from '@utils/cleanupContentType' import styles from './index.module.css' import Loader from '@shared/atoms/Loader' -import { FileMetadata } from '@oceanprotocol/lib' +import { FileInfo as FileInfoData } from '@oceanprotocol/lib' const cx = classNames.bind(styles) @@ -22,7 +22,7 @@ export default function FileIcon({ small, isLoading }: { - file: FileMetadata + file: FileInfoData className?: string small?: boolean isLoading?: boolean diff --git a/src/components/@shared/FormFields/FilesInput/Info.tsx b/src/components/@shared/FormFields/FilesInput/Info.tsx index 1971760f5..2f1e8b782 100644 --- a/src/components/@shared/FormFields/FilesInput/Info.tsx +++ b/src/components/@shared/FormFields/FilesInput/Info.tsx @@ -2,13 +2,13 @@ import React, { ReactElement } from 'react' import { prettySize } from './utils' import cleanupContentType from '@utils/cleanupContentType' import styles from './Info.module.css' -import { FileMetadata } from '@oceanprotocol/lib' +import { FileInfo as FileInfoData } from '@oceanprotocol/lib' export default function FileInfo({ file, handleClose }: { - file: FileMetadata + file: FileInfoData handleClose(): void }): ReactElement { const contentTypeCleaned = file.contentType diff --git a/src/components/Asset/AssetActions/Compute/index.tsx b/src/components/Asset/AssetActions/Compute/index.tsx index 5e2261e63..51230e65b 100644 --- a/src/components/Asset/AssetActions/Compute/index.tsx +++ b/src/components/Asset/AssetActions/Compute/index.tsx @@ -2,7 +2,7 @@ import React, { useState, ReactElement, useEffect, useCallback } from 'react' import { Asset, DDO, - FileMetadata, + FileInfo as FileInfoData, Datatoken, ProviderInstance, ComputeAsset, @@ -60,7 +60,7 @@ export default function Compute({ }: { asset: AssetExtended dtBalance: string - file: FileMetadata + file: FileInfoData fileIsLoading?: boolean isConsumable?: boolean consumableFeedback?: string diff --git a/src/components/Asset/AssetActions/Download.tsx b/src/components/Asset/AssetActions/Download.tsx index 8e9a5820a..73cd16676 100644 --- a/src/components/Asset/AssetActions/Download.tsx +++ b/src/components/Asset/AssetActions/Download.tsx @@ -7,7 +7,11 @@ import ButtonBuy from '@shared/ButtonBuy' import { secondsToString } from '@utils/ddo' import AlgorithmDatasetsListForCompute from './Compute/AlgorithmDatasetsListForCompute' import styles from './Download.module.css' -import { FileMetadata, LoggerInstance, ZERO_ADDRESS } from '@oceanprotocol/lib' +import { + FileInfo as FileInfoData, + LoggerInstance, + ZERO_ADDRESS +} from '@oceanprotocol/lib' import { order } from '@utils/order' import { AssetExtended } from 'src/@types/AssetExtended' import { buyDtFromPool } from '@utils/pool' @@ -29,7 +33,7 @@ export default function Download({ consumableFeedback }: { asset: AssetExtended - file: FileMetadata + file: FileInfoData isBalanceSufficient: boolean dtBalance: string fileIsLoading?: boolean diff --git a/src/components/Asset/AssetActions/index.tsx b/src/components/Asset/AssetActions/index.tsx index 2fd19b333..9b28821ad 100644 --- a/src/components/Asset/AssetActions/index.tsx +++ b/src/components/Asset/AssetActions/index.tsx @@ -1,7 +1,11 @@ import React, { ReactElement, useState, useEffect } from 'react' import Compute from './Compute' import Consume from './Download' -import { FileMetadata, LoggerInstance, Datatoken } from '@oceanprotocol/lib' +import { + FileInfo as FileInfoData, + LoggerInstance, + Datatoken +} from '@oceanprotocol/lib' import Tabs, { TabsItem } from '@shared/atoms/Tabs' import { compareAsBN } from '@utils/numbers' import Pool from './Pool' @@ -37,7 +41,7 @@ export default function AssetActions({ const [isBalanceSufficient, setIsBalanceSufficient] = useState() const [dtBalance, setDtBalance] = useState() - const [fileMetadata, setFileMetadata] = useState() + const [fileMetadata, setFileMetadata] = useState() const [fileIsLoading, setFileIsLoading] = useState(false) const isCompute = Boolean( asset?.services.filter((service) => service.type === 'compute')[0]