mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Remove asset purgatory workaround (#1056)
* revert asset purgatory workaround * reverts #1016 * asset loading fix
This commit is contained in:
parent
8074a6143c
commit
64255f2b37
@ -77,18 +77,17 @@ function AssetProvider({
|
|||||||
LoggerInstance.error(`[asset] Failed getting asset for ${did}`, asset)
|
LoggerInstance.error(`[asset] Failed getting asset for ${did}`, asset)
|
||||||
} else {
|
} else {
|
||||||
setError(undefined)
|
setError(undefined)
|
||||||
|
setAsset((prevState) => ({
|
||||||
|
...prevState,
|
||||||
|
...asset
|
||||||
|
}))
|
||||||
|
setTitle(asset.metadata?.name)
|
||||||
|
setOwner(asset.nft?.owner)
|
||||||
|
setIsInPurgatory(asset.purgatory?.state)
|
||||||
|
setPurgatoryData(asset.purgatory)
|
||||||
|
LoggerInstance.log('[asset] Got asset', asset)
|
||||||
}
|
}
|
||||||
|
|
||||||
setAsset((prevState) => ({
|
|
||||||
...prevState,
|
|
||||||
...asset
|
|
||||||
}))
|
|
||||||
setTitle(asset.metadata.name)
|
|
||||||
setOwner(asset.nft.owner)
|
|
||||||
setIsInPurgatory((asset.purgatory?.state as unknown as string) === 'true')
|
|
||||||
setPurgatoryData(asset.purgatory)
|
|
||||||
LoggerInstance.log('[asset] Got asset', asset)
|
|
||||||
|
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
},
|
},
|
||||||
[did]
|
[did]
|
||||||
|
@ -48,7 +48,7 @@ export function generateBaseQuery(
|
|||||||
getFilterTerm('_index', 'aquarius'),
|
getFilterTerm('_index', 'aquarius'),
|
||||||
...(baseQueryParams.ignorePurgatory
|
...(baseQueryParams.ignorePurgatory
|
||||||
? []
|
? []
|
||||||
: [getFilterTerm('purgatory.state', 'false')])
|
: [getFilterTerm('purgatory.state', false)])
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user