From 7ed9e8c182b0a8d6ef32b21380076f1bdca7ce48 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Fri, 29 May 2020 17:35:43 +0300 Subject: [PATCH] getComputeItems fix did valid check --- src/hooks/useSearch/useSearch.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hooks/useSearch/useSearch.ts b/src/hooks/useSearch/useSearch.ts index 7922608..414b434 100644 --- a/src/hooks/useSearch/useSearch.ts +++ b/src/hooks/useSearch/useSearch.ts @@ -39,7 +39,7 @@ function useSearch(): UseSearch { page: number, offset: number ): Promise { - if (!ocean || !account) return + if (!ocean || !accountId) return setSearchError(undefined) @@ -95,13 +95,14 @@ function useSearch(): UseSearch { const { did } = await ocean.keeper.agreementStoreManager.getAgreement( job.agreementId ) - - const ddo = await ocean.assets.resolve(did) if ( did === '0x0000000000000000000000000000000000000000000000000000000000000000' ) return + + const ddo = await ocean.assets.resolve(did) + if (ddo) { // Since we are getting assets from chain there might be // assets from other marketplaces. So return only those assets