diff --git a/src/hooks/useDaoDetails.tsx b/src/hooks/useDaoDetails.tsx index 8210dd8b7..fd04cdba7 100644 --- a/src/hooks/useDaoDetails.tsx +++ b/src/hooks/useDaoDetails.tsx @@ -108,9 +108,6 @@ async function fetchDaoDetails( redirectDaoToAddress(address); } - // Note: SDK doesn't support ens names in L2 chains so we need to resolve the address first - // const daoDetails = await client.methods.getDao(daoAddressOrEns.toLowerCase()); - const {dao} = await request<{dao: SubgraphDao}>( SUBGRAPH_API_URL[network]!, QueryDao, @@ -120,7 +117,6 @@ async function fetchDaoDetails( ); const metadata = await ipfsService.getData(dao.metadata); - const daoDetails = toDaoDetails(dao, metadata); const avatar = daoDetails?.metadata.avatar; diff --git a/src/services/ipfs/ipfsService.ts b/src/services/ipfs/ipfsService.ts index 7ee0bc9ad..2bd07d62f 100644 --- a/src/services/ipfs/ipfsService.ts +++ b/src/services/ipfs/ipfsService.ts @@ -1,5 +1,6 @@ import {resolveIpfsCid} from '@aragon/sdk-client-common'; import {IPinDataProps} from './ipfsService.api'; +import {pinataAPI} from 'utils/constants'; class IpfsService { constructor( @@ -23,7 +24,7 @@ class IpfsService { pinData = async (data: IPinDataProps) => { const processedData = await this.processData(data); - const res = await fetch('https://api.pinata.cloud/pinning/pinJSONToIPFS', { + const res = await fetch(pinataAPI, { method: 'POST', headers: { Authorization: 'Bearer ' + this.apiKey, diff --git a/src/utils/constants/api.ts b/src/utils/constants/api.ts index e4e243355..d5ec3cbea 100644 --- a/src/utils/constants/api.ts +++ b/src/utils/constants/api.ts @@ -17,6 +17,8 @@ export const AppMetadata = { export const FEEDBACK_FORM = 'https://aragonassociation.atlassian.net/servicedesk/customer/portal/3'; +export const pinataAPI = 'https://api.pinata.cloud/pinning/pinJSONToIPFS'; + export const SUBGRAPH_API_URL: SubgraphNetworkUrl = { arbitrum: 'https://subgraph.satsuma-prod.com/qHR2wGfc5RLi6/aragon/osx-arbitrum/version/v1.4.0/api', diff --git a/src/utils/types.ts b/src/utils/types.ts index a3754660e..e1be2e1f6 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -730,8 +730,6 @@ export type SubgraphMultisigProposalBase = SubgraphProposalBase & { minApprovals: number; approvalReached: boolean; approvers: {id: string}[]; - // TODO change on subgraph fix - // approvers: SubgraphMultisigApproversListItem[]; }; export type SubgraphMultisigProposalListItem = SubgraphMultisigProposalBase;