From 75ba6f3d7dfe94f7379b012c0aa7eeee3b64eb9d Mon Sep 17 00:00:00 2001 From: sepehr sanaee Date: Fri, 17 May 2024 11:35:15 +0330 Subject: [PATCH 1/2] removed all old IPFS resolvements --- src/components/membersList/actionItemMembership.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/membersList/actionItemMembership.tsx b/src/components/membersList/actionItemMembership.tsx index b7cbfcc99..2d90848ed 100644 --- a/src/components/membersList/actionItemMembership.tsx +++ b/src/components/membersList/actionItemMembership.tsx @@ -4,7 +4,7 @@ import {shortenAddress, AvatarDao} from '@aragon/ods-old'; import {Icon, IconType} from '@aragon/ods'; import {resolveIpfsCid} from '@aragon/sdk-client-common'; import {useClient} from 'hooks/useClient'; -import {Client, DaoListItem} from '@aragon/sdk-client'; +import {DaoListItem} from '@aragon/sdk-client'; import {toDisplayEns} from 'utils/library'; import {generatePath, useNavigate} from 'react-router-dom'; import {DaoMember} from 'utils/paths'; @@ -12,6 +12,7 @@ import {useResolveDaoAvatar} from 'hooks/useResolveDaoAvatar'; import {useQueryClient} from '@tanstack/react-query'; import {aragonSdkQueryKeys} from 'services/aragon-sdk/query-keys'; import {SupportedNetworks} from 'utils/constants'; +import {ipfsService} from 'services/ipfs/ipfsService'; /** * Type declarations for `ActionItemAddressProps`. */ @@ -68,8 +69,8 @@ export const ActionItemMembership: React.FC = props => { if (!metadata || !client) return null; const cid = resolveIpfsCid(metadata); - const ipfsClientString = await (client as Client)?.ipfs.fetchString(cid); - const ipfsClient = JSON.parse(ipfsClientString); + const ipfsClientString = await ipfsService.getData(cid); + const ipfsClient = ipfsClientString; setMetadataObject(ipfsClient); } @@ -120,3 +121,4 @@ const Address = styled.span.attrs({ // const Activity = styled.div.attrs({ // className: 'ft-text-sm text-neutral-500 mt-2' as string, // })``; +g \ No newline at end of file From bb7eaf8c9daa96caaca30f0a077b9fbc565442a5 Mon Sep 17 00:00:00 2001 From: sepehr sanaee Date: Fri, 17 May 2024 12:35:49 +0330 Subject: [PATCH 2/2] fix lint errors --- src/components/membersList/actionItemMembership.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/membersList/actionItemMembership.tsx b/src/components/membersList/actionItemMembership.tsx index 2d90848ed..05fcf89e7 100644 --- a/src/components/membersList/actionItemMembership.tsx +++ b/src/components/membersList/actionItemMembership.tsx @@ -121,4 +121,3 @@ const Address = styled.span.attrs({ // const Activity = styled.div.attrs({ // className: 'ft-text-sm text-neutral-500 mt-2' as string, // })``; -g \ No newline at end of file