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

No file info shown for valid files (#1029)

* get asset file info

* additional verification, logs deleted

* fixes

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
This commit is contained in:
claudiaHash 2022-01-28 13:49:14 +02:00 committed by GitHub
parent e113ba5300
commit c0f87410c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,14 +73,15 @@ export default function AssetActions({
async function initFileInfo() {
setFileIsLoading(true)
const asset = formikState?.values?.services?.[0].files?.[0].url || ddo.id
const fileUrl =
formikState?.values?.services?.[0].files?.[0].url ||
(ddo.metadata?.links ? ddo.metadata?.links[0] : ' ')
const providerUrl =
formikState?.values?.services[0].providerUrl.url ||
oceanConfig.providerUri
try {
const fileInfoResponse = await getFileInfo(asset, providerUrl)
const fileInfoResponse = await getFileInfo(fileUrl, providerUrl)
fileInfoResponse && setFileMetadata(fileInfoResponse[0])
setFileIsLoading(false)
} catch (error) {