From b2fa5dc5387c4959fe76a8ccd29c6eb293305a9c Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 27 Jan 2023 14:29:02 +0200 Subject: [PATCH] fix is owned and valid tx (#1869) --- src/components/Asset/AssetActions/Download.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Asset/AssetActions/Download.tsx b/src/components/Asset/AssetActions/Download.tsx index abaa35559..7c1daab6e 100644 --- a/src/components/Asset/AssetActions/Download.tsx +++ b/src/components/Asset/AssetActions/Download.tsx @@ -55,12 +55,12 @@ export default function Download({ useEffect(() => { Number(asset?.nft.state) === 4 && setIsOrderDisabled(true) }, [asset?.nft.state]) + useEffect(() => { if (!asset?.accessDetails || isUnsupportedPricing) return - asset.accessDetails.isOwned && setIsOwned(asset?.accessDetails?.isOwned) - asset.accessDetails.validOrderTx && - setValidOrderTx(asset?.accessDetails?.validOrderTx) + setIsOwned(asset?.accessDetails?.isOwned || false) + setValidOrderTx(asset?.accessDetails?.validOrderTx || '') // get full price and fees async function init() {