From 3b8ecd16d1544546c740e10db5b6e465981771de Mon Sep 17 00:00:00 2001 From: prasadgkalamkar Date: Mon, 9 Dec 2024 17:12:29 +0530 Subject: [PATCH 1/2] org did not foud issue resolved in issuance flow Signed-off-by: prasadgkalamkar --- src/components/Issuance/IssuedCrdentials.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/Issuance/IssuedCrdentials.tsx b/src/components/Issuance/IssuedCrdentials.tsx index 95ebd77c0..c9f84becb 100644 --- a/src/components/Issuance/IssuedCrdentials.tsx +++ b/src/components/Issuance/IssuedCrdentials.tsx @@ -170,14 +170,17 @@ 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 orgAgentsList = data?.data?.org_agents; + if (orgAgentsList && orgAgentsList.length > 0) { + const did = orgAgentsList[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); + } } } setLoading(false); From 75f19485e05fe4d39dcc822eb354d558b0265584 Mon Sep 17 00:00:00 2001 From: prasadgkalamkar Date: Mon, 9 Dec 2024 17:45:47 +0530 Subject: [PATCH 2/2] org did not found check Signed-off-by: prasadgkalamkar --- src/components/Issuance/IssuedCrdentials.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/Issuance/IssuedCrdentials.tsx b/src/components/Issuance/IssuedCrdentials.tsx index c9f84becb..b10b846d6 100644 --- a/src/components/Issuance/IssuedCrdentials.tsx +++ b/src/components/Issuance/IssuedCrdentials.tsx @@ -170,10 +170,8 @@ const CredentialList = () => { const response = await getOrganizationById(orgId); const { data } = response as AxiosResponse; if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { - const orgAgentsList = data?.data?.org_agents; - if (orgAgentsList && orgAgentsList.length > 0) { - const did = orgAgentsList[0].orgDid; - + 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);