mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
replace FIleMetadata to fix build
This commit is contained in:
parent
fe06c2eb2c
commit
cc2e179d29
@ -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<FileMetadata[]> {
|
||||
): Promise<FileInfoData[]> {
|
||||
try {
|
||||
const response = await ProviderInstance.checkDidFiles(
|
||||
did,
|
||||
@ -85,7 +85,7 @@ export async function getFileDidInfo(
|
||||
export async function getFileUrlInfo(
|
||||
url: string,
|
||||
providerUrl: string
|
||||
): Promise<FileMetadata[]> {
|
||||
): Promise<FileInfoData[]> {
|
||||
try {
|
||||
const response = await ProviderInstance.checkFileUrl(url, providerUrl)
|
||||
return response
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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<boolean>()
|
||||
const [dtBalance, setDtBalance] = useState<string>()
|
||||
const [fileMetadata, setFileMetadata] = useState<FileMetadata>()
|
||||
const [fileMetadata, setFileMetadata] = useState<FileInfoData>()
|
||||
const [fileIsLoading, setFileIsLoading] = useState<boolean>(false)
|
||||
const isCompute = Boolean(
|
||||
asset?.services.filter((service) => service.type === 'compute')[0]
|
||||
|
Loading…
Reference in New Issue
Block a user