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:
parent
e113ba5300
commit
c0f87410c5
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user