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() {
|
async function initFileInfo() {
|
||||||
setFileIsLoading(true)
|
setFileIsLoading(true)
|
||||||
|
const fileUrl =
|
||||||
const asset = formikState?.values?.services?.[0].files?.[0].url || ddo.id
|
formikState?.values?.services?.[0].files?.[0].url ||
|
||||||
|
(ddo.metadata?.links ? ddo.metadata?.links[0] : ' ')
|
||||||
const providerUrl =
|
const providerUrl =
|
||||||
formikState?.values?.services[0].providerUrl.url ||
|
formikState?.values?.services[0].providerUrl.url ||
|
||||||
oceanConfig.providerUri
|
oceanConfig.providerUri
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const fileInfoResponse = await getFileInfo(asset, providerUrl)
|
const fileInfoResponse = await getFileInfo(fileUrl, providerUrl)
|
||||||
fileInfoResponse && setFileMetadata(fileInfoResponse[0])
|
fileInfoResponse && setFileMetadata(fileInfoResponse[0])
|
||||||
setFileIsLoading(false)
|
setFileIsLoading(false)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user