From b0215da00f5ce28b7a570b49ac4dff8db401e9a7 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Thu, 19 Jan 2023 14:26:40 +0200 Subject: [PATCH] null check --- src/components/Asset/OwnerActions/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Asset/OwnerActions/index.tsx b/src/components/Asset/OwnerActions/index.tsx index fb0021690..ad90d82f7 100644 --- a/src/components/Asset/OwnerActions/index.tsx +++ b/src/components/Asset/OwnerActions/index.tsx @@ -13,6 +13,7 @@ export default function OwnerActions() { const [calicaUri, setCalicaUri] = useState() const newCancelToken = useCancelToken() useEffect(() => { + if (!asset.paymentCollector) return checkCalicaContractAddress( asset.paymentCollector, asset.chainId, @@ -24,7 +25,7 @@ export default function OwnerActions() { calicaUri, asset?.paymentCollector ) - }, [asset?.paymentCollector, calicaUri]) + }, [asset.chainId, asset.paymentCollector, calicaUri, newCancelToken]) // {ddo?.paymentCollector && ddo?.paymentCollector !== ddo?.nft?.owner && ( return isOwner ? (