Skip to content

Commit

Permalink
refactored logic for orgAgentList and orgDid
Browse files Browse the repository at this point in the history
Signed-off-by: prasadgkalamkar <[email protected]>
  • Loading branch information
prasadgkalamkar committed Dec 3, 2024
1 parent f05734c commit 5a0a985
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/User/UserDashBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,17 @@ const UserDashBoard = () => {
const response = await getOrganizationById(orgId);
const { data } = response as AxiosResponse;
if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
const orgDid = data?.org_agents?.[0].orgDid;
if (data?.data?.org_agents) {
const orgAgentsList = data?.data?.org_agents;
if (orgAgentsList && orgAgentsList.length > 0) {
const orgDid = orgAgentsList[0].orgDid;
setWalletData(data?.data?.org_agents);

if(orgDid?.includes(DidMethod.INDY)){
setIsW3C(false);
}
} else {
setWalletData([]);
}
if(orgDid?.includes(DidMethod.INDY)){
setIsW3C(false);
}
}
setWalletLoading(false);
};
Expand Down

0 comments on commit 5a0a985

Please sign in to comment.