diff --git a/src/@context/Asset.tsx b/src/@context/Asset.tsx index d6e78a654..689d6ef22 100644 --- a/src/@context/Asset.tsx +++ b/src/@context/Asset.tsx @@ -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] diff --git a/src/@utils/aquarius.ts b/src/@utils/aquarius.ts index a7fea4977..4c8d0866c 100644 --- a/src/@utils/aquarius.ts +++ b/src/@utils/aquarius.ts @@ -48,7 +48,7 @@ export function generateBaseQuery( getFilterTerm('_index', 'aquarius'), ...(baseQueryParams.ignorePurgatory ? [] - : [getFilterTerm('purgatory.state', 'false')]) + : [getFilterTerm('purgatory.state', false)]) ] } }