1
0
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:
Matthias Kretschmann 2022-02-03 15:26:49 +00:00 committed by GitHub
parent 8074a6143c
commit 64255f2b37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 11 deletions

View File

@ -77,18 +77,17 @@ function AssetProvider({
LoggerInstance.error(`[asset] Failed getting asset for ${did}`, asset)
} else {
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)
},
[did]

View File

@ -48,7 +48,7 @@ export function generateBaseQuery(
getFilterTerm('_index', 'aquarius'),
...(baseQueryParams.ignorePurgatory
? []
: [getFilterTerm('purgatory.state', 'false')])
: [getFilterTerm('purgatory.state', false)])
]
}
}