From c3f25bc141fb887ac9f4da2dd3e291a24960e6fd Mon Sep 17 00:00:00 2001 From: prasadgkalamkar Date: Mon, 9 Dec 2024 17:54:39 +0530 Subject: [PATCH] fix:org did not found issue resolved in issuance flow (#835) * org did not foud issue resolved in issuance flow Signed-off-by: prasadgkalamkar * org did not found check Signed-off-by: prasadgkalamkar --------- Signed-off-by: prasadgkalamkar --- src/components/Issuance/IssuedCrdentials.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/Issuance/IssuedCrdentials.tsx b/src/components/Issuance/IssuedCrdentials.tsx index 95ebd77c0..b10b846d6 100644 --- a/src/components/Issuance/IssuedCrdentials.tsx +++ b/src/components/Issuance/IssuedCrdentials.tsx @@ -170,14 +170,15 @@ const CredentialList = () => { const response = await getOrganizationById(orgId); const { data } = response as AxiosResponse; if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { - const did = data?.data?.org_agents?.[0]?.orgDid; - - await setToLocalStorage(storageKeys.ORG_DID, did) - if (did.includes(DidMethod.POLYGON) || did.includes(DidMethod.KEY) || did.includes(DidMethod.WEB)) { - setW3CSchema(true); - } - if (did.includes(DidMethod.INDY)) { - setW3CSchema(false); + const did = data?.data?.org_agents[0]?.orgDid; + if (did) { + await setToLocalStorage(storageKeys.ORG_DID, did) + if (did.includes(DidMethod.POLYGON) || did.includes(DidMethod.KEY) || did.includes(DidMethod.WEB)) { + setW3CSchema(true); + } + if (did.includes(DidMethod.INDY)) { + setW3CSchema(false); + } } } setLoading(false);