From e9214df56c8ff959792f45efaf109956d37a96de Mon Sep 17 00:00:00 2001 From: Nick Lionis Date: Thu, 17 Oct 2024 19:39:05 +0300 Subject: [PATCH 1/2] migrates new impact image creation workflow --- .../grant-explorer/src/attestationStore.ts | 103 +-------- packages/grant-explorer/src/checkoutStore.ts | 2 +- .../grant-explorer/src/features/api/types.ts | 24 -- .../attestations/MintYourImpactComponents.tsx | 217 +----------------- .../utils/getRoundsToFetchNames.ts | 15 -- .../Buttons/MintDonationImpactAction.tsx | 50 +--- .../utils/getContributionFrameProps.ts | 79 ------- .../src/features/round/ThankYou.tsx | 77 +------ .../attestations/useGetAttestationData.ts | 21 +- 9 files changed, 29 insertions(+), 559 deletions(-) delete mode 100644 packages/grant-explorer/src/features/attestations/utils/getRoundsToFetchNames.ts delete mode 100644 packages/grant-explorer/src/features/contributors/utils/getContributionFrameProps.ts diff --git a/packages/grant-explorer/src/attestationStore.ts b/packages/grant-explorer/src/attestationStore.ts index 4b2e9c3b3..eebd5f04a 100644 --- a/packages/grant-explorer/src/attestationStore.ts +++ b/packages/grant-explorer/src/attestationStore.ts @@ -1,117 +1,34 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import { create } from "zustand"; import { devtools } from "zustand/middleware"; -import { CartProject, AttestationFrameProps } from "./features/api/types"; import { persist } from "zustand/middleware"; import { Hex } from "viem"; interface AttestationState { - checkedOutProjectsByTx: Record; - setCheckedOutProjectsByTx: (tx: Hex, projects: CartProject[]) => void; - getCheckedOutProjectsByTx: (tx: Hex) => CartProject[]; - cleanCheckedOutProjects: () => void; + checkedOutTransactions: Hex[]; + addCheckedOutTransaction: (tx: Hex) => void; getCheckedOutTransactions: () => Hex[]; - getFrameProps: (txHashes: Hex[]) => AttestationFrameProps; + cleanCheckedOutTransactions: () => void; } export const useAttestationStore = create()( persist( devtools((set, get) => ({ - checkedOutProjectsByTx: {}, - setCheckedOutProjectsByTx: (tx: Hex, projects: CartProject[]) => { + checkedOutTransactions: [], + addCheckedOutTransaction: (tx: Hex) => { set((oldState) => ({ - checkedOutProjectsByTx: { - ...oldState.checkedOutProjectsByTx, - [tx]: projects, - }, + checkedOutTransactions: [...oldState.checkedOutTransactions, tx], })); }, - getCheckedOutProjectsByTx: (tx: Hex) => { - return get().checkedOutProjectsByTx[tx] || []; + getCheckedOutTransactions: () => { + return get().checkedOutTransactions; }, - cleanCheckedOutProjects: () => { + cleanCheckedOutTransactions: () => { set({ - checkedOutProjectsByTx: {}, + checkedOutTransactions: [], }); }, - // Create a function that gets an array of transactionHashes and returns the FrameProps object where projects Array - // contains the top 3 projects based on those checked out transactions max donation amount in usd - // The top round is the round with the most funds allocated in total amount of projects allocated to all transactions in total rounds in all transaction in total chains allocated in these transactions - getCheckedOutTransactions: () => { - return Object.keys(get().checkedOutProjectsByTx) as Hex[]; - }, - getFrameProps: (txHashes: Hex[]) => { - const allProjects: CartProject[] = []; - const roundsSet = new Set(); - const chainsSet = new Set(); - const amountByRound: Record< - string, - { - roundId: string; - chainId: number; - totalAmount: number; - } - > = {}; - - if (txHashes.length === 0) { - return { - selectedBackground: "", - topRound: { - roundId: "", - chainId: 0, - }, - projectsFunded: 0, - roundsSupported: 0, - checkedOutChains: 0, - projects: [], - } as AttestationFrameProps; - } - - for (const txHash of txHashes) { - const projects = get().getCheckedOutProjectsByTx(txHash); - allProjects.push(...projects); - projects.forEach((project) => { - roundsSet.add(project.roundId); - chainsSet.add(project.chainId); - amountByRound[project.roundId] = amountByRound[project.roundId] || { - roundName: project.roundId, - totalAmount: 0, - }; - // TODO CHANGE WITH ACTUAL ROUNDNAME - amountByRound[project.roundId].roundId = project.roundId; - amountByRound[project.roundId].chainId = project.chainId; - amountByRound[project.roundId].totalAmount += Number( - project.amount - ); - }); - } - const topProjects = allProjects - .sort((a, b) => Number(b.amount) - Number(a.amount)) - .slice(0, 3) - .map((project, i) => ({ - rank: i + 1, - name: project.projectMetadata.title, - round: project.roundId, - roundId: project.roundId, - image: - project.projectMetadata?.logoImg ?? - project.projectMetadata?.bannerImg ?? - "", - chainId: project.chainId, - })); - const topRound = Object.values(amountByRound).sort( - (a, b) => b.totalAmount - a.totalAmount - )[0]; - return { - selectedBackground: "", - topRound: topRound, - projectsFunded: allProjects.length, - roundsSupported: roundsSet.size, - checkedOutChains: chainsSet.size, - projects: topProjects, - } as AttestationFrameProps; - }, })), { name: "attestation-store", diff --git a/packages/grant-explorer/src/checkoutStore.ts b/packages/grant-explorer/src/checkoutStore.ts index 4b2ceee6f..5602fbd66 100644 --- a/packages/grant-explorer/src/checkoutStore.ts +++ b/packages/grant-explorer/src/checkoutStore.ts @@ -325,7 +325,7 @@ export const useCheckoutStore = create()( }); useAttestationStore .getState() - .setCheckedOutProjectsByTx(receipt.transactionHash, donations); + .addCheckedOutTransaction(receipt.transactionHash); } catch (error) { let context: Record = { chainId, diff --git a/packages/grant-explorer/src/features/api/types.ts b/packages/grant-explorer/src/features/api/types.ts index 75c4b02a1..3acb6e066 100644 --- a/packages/grant-explorer/src/features/api/types.ts +++ b/packages/grant-explorer/src/features/api/types.ts @@ -78,27 +78,3 @@ export type ChainBalances = { export type BalanceMap = { [chainId: string | number]: ChainBalances; }; - -export type AttestationProject = { - rank: number; - name: string; - round: string; - image: string; - amount?: number; - chainId?: number; - roundId?: string; -}; - -export type AttestationFrameProps = { - topRound?: { - roundId: string; - chainId: number; - }; - topRoundName?: string; - projectsFunded: number; - roundsSupported: number; - checkedOutChains: number; - projects: AttestationProject[]; - address?: string; - name?: string; -}; diff --git a/packages/grant-explorer/src/features/attestations/MintYourImpactComponents.tsx b/packages/grant-explorer/src/features/attestations/MintYourImpactComponents.tsx index 6c339d78e..5e27135b4 100755 --- a/packages/grant-explorer/src/features/attestations/MintYourImpactComponents.tsx +++ b/packages/grant-explorer/src/features/attestations/MintYourImpactComponents.tsx @@ -1,181 +1,18 @@ import React from "react"; import { Button } from "common/src/styles"; -import { AttestationFrameProps } from "../api/types"; import useColorAndBackground from "../../hooks/attestations/useColorAndBackground"; import { ShareButtons } from "../common/ShareButtons"; import { useGetImages } from "../../hooks/attestations/useGetImages"; -type Project = { - rank: number; - name: string; - round: string; - image: string; -}; - -export const AttestationFrame = ({ - frameId, - selectedBackground, - topRound, - projectsFunded, - roundsSupported, - checkedOutChains, - projects, - address, - ensName, -}: { - frameId: string; - selectedBackground: string; - topRound: string; - projectsFunded: number; - roundsSupported: number; - checkedOutChains: number; - projects: Project[]; - address: string | undefined; - ensName: string | null | undefined; -}) => { - const { attestationFrameLogo } = useColorAndBackground(); - const projectsLength = projects.length; - const padding = - projectsLength === 3 - ? "threeProjectsPadding" - : projectsLength === 2 - ? "py-11" - : "py-28"; - - return ( -
-
-
- {/* Header */} -
-
- {ensName ? ( -
- {ensName} -
- ) : ( -
- {address} -
- )} -
- Logo -
- - {/* Main Body */} -
- {/* Left Section (Top Projects and Top Round) */} -
- {/* Top Projects Header */} -
-
-

- Top Projects -

-
- - {/* Project List */} - {projects.map((project, index) => ( -
-
- {project.rank} -
- Project - -
-

- {project.name} -

-

- {project.round} -

-
-
- ))} -
- - {/* Top Round Section */} - -
-
-
- Top Round -
-
-
-
-
- {topRound} -
-
-
- - {/* Right Section (Stats) */} -
- {[ - { value: projectsFunded, label: "Projects Funded" }, - { value: roundsSupported, label: "Rounds Supported" }, - { value: checkedOutChains, label: "Chains" }, - ].map((stat, index) => ( -
-
- {stat.value} -
-
- {stat.label} -
-
- ))} -
-
-
-
-
- ); -}; - export const PreviewFrame = ({ handleSelectBackground, mint, }: { - handleSelectBackground: (background: string) => void; + handleSelectBackground: (option: string) => void; mint: () => void; }) => { - const { - backgroundAlternatives, - defaultColor, - backgroundMapper, - colorMapper, - preview_alt1, - } = useColorAndBackground(); + const { backgroundAlternatives, defaultColor, colorMapper, preview_alt1 } = + useColorAndBackground(); const [selectedColor, setSelectedColor] = React.useState("0"); const [previewBackground, setPreviewBackground] = @@ -184,9 +21,7 @@ export const PreviewFrame = ({ function selectBackground(option: string) { setSelectedColor(option); setPreviewBackground(backgroundAlternatives[Number(option)]); - handleSelectBackground( - backgroundMapper[option as keyof typeof backgroundMapper] - ); + handleSelectBackground(option); } return ( @@ -305,50 +140,6 @@ export const PreviewFrameHistoryPage = ({ ); }; -export const HiddenAttestationFrame = ({ - FrameProps, - selectedBackground, - address, - name, - imagesBase64, - frameId, -}: { - FrameProps: AttestationFrameProps; - selectedBackground: string; - address: string | undefined; - name: string | null | undefined; - imagesBase64: string[] | undefined; - frameId: string; -}) => { - return ( -
- ({ - ...project, - image: imagesBase64 ? imagesBase64[i] : "", - }))} - checkedOutChains={FrameProps.checkedOutChains} - projectsFunded={FrameProps.projectsFunded} - roundsSupported={FrameProps.roundsSupported} - topRound={FrameProps.topRoundName ?? ""} - address={address} - ensName={name} - /> -
- ); -}; import { ImageWithLoading } from "../common/components/ImageWithLoading"; export const ImpactMintingSuccess = ({ diff --git a/packages/grant-explorer/src/features/attestations/utils/getRoundsToFetchNames.ts b/packages/grant-explorer/src/features/attestations/utils/getRoundsToFetchNames.ts deleted file mode 100644 index fdf8b74c6..000000000 --- a/packages/grant-explorer/src/features/attestations/utils/getRoundsToFetchNames.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { AttestationFrameProps } from "../../api/types"; - -export const getRoundsToFetchNames = (props: AttestationFrameProps) => { - if (props.projects.length === 0) { - return {}; - } - const roundsToFetchNames: Record = {}; - props.projects.forEach((project) => { - roundsToFetchNames[project?.chainId ?? 0] = project.roundId ?? ""; - }); - roundsToFetchNames[props.topRound?.chainId ?? 0] = - props.topRound?.roundId ?? ""; - - return roundsToFetchNames; -}; diff --git a/packages/grant-explorer/src/features/contributors/components/Buttons/MintDonationImpactAction.tsx b/packages/grant-explorer/src/features/contributors/components/Buttons/MintDonationImpactAction.tsx index 9349d6e19..86d3e29ea 100644 --- a/packages/grant-explorer/src/features/contributors/components/Buttons/MintDonationImpactAction.tsx +++ b/packages/grant-explorer/src/features/contributors/components/Buttons/MintDonationImpactAction.tsx @@ -1,20 +1,13 @@ -import { HiddenAttestationFrame } from "../../../attestations/MintYourImpactComponents"; import { MintProgressModalBodyHistory } from "../../../attestations/MintProgressModalBody"; import { useGetAttestationData } from "../../../../hooks/attestations/useGetAttestationData"; import { useEASAttestation } from "../../../../hooks/attestations/useEASAttestation"; -import { useResolveENS } from "../../../../hooks/useENS"; -import { handleGetAttestationPreview } from "../../../../hooks/attestations/utils/getAttestationPreview"; -import { useParams } from "react-router-dom"; import { useAccount, useBalance } from "wagmi"; -import { useGetImages } from "../../../../hooks/attestations/useGetImages"; -import { getContributionFrameProps } from "../../utils/getContributionFrameProps"; import { Contribution } from "data-layer"; import { ProgressStatus } from "../../../../hooks/attestations/config"; import { useEstimateGas } from "../../../../hooks/attestations/useEstimateGas"; import { AttestationChainId } from "../../../attestations/utils/constants"; -import { ethers } from "ethers"; import { useAttestationFee } from "../../hooks/useMintingAttestations"; import { useMemo } from "react"; import Modal from "../../../common/components/Modal"; @@ -36,45 +29,17 @@ export function MintDonationImpactAction({ isOpen, toggleModal, toggleStartAction, - contributions, transactionHash, selectedColor, previewBackground, selectBackground, - selectedBackground, }: MintDonationImpactActionProps) { const { address } = useAccount(); - const { address: contributorAddress } = useParams(); - const { data: name, isLoading: isLoadingENS } = useResolveENS( - contributorAddress as `0x${string}` | undefined - ); - - const FrameProps = getContributionFrameProps(contributions); - - const frameId = ethers.utils.solidityKeccak256( - ["string[]"], - [[transactionHash]] - ); - - const { - data: imagesBase64, - isLoading: isLoadingImages, - isFetched: imagesFetched, - } = useGetImages( - FrameProps.projects.map((project) => project.image), - isOpen - ); const { data, isLoading, isRefetching } = useGetAttestationData( [transactionHash], - handleGetAttestationPreview, - isLoadingENS || - isLoadingImages || - !isOpen || - !startAction || - !imagesFetched, - selectedColor, - name as string | undefined + !isOpen || !startAction, + selectedColor ); const { @@ -126,8 +91,7 @@ export function MintDonationImpactAction({ return { title: newTitle, subheading: newSubheading }; }, [status]); - const loading = - isLoading || isLoadingENS || isRefetching || isRefetchingEstimate; + const loading = isLoading || isRefetching || isRefetchingEstimate; return ( <> @@ -164,14 +128,6 @@ export function MintDonationImpactAction({ impactImageCid={data?.impactImageCid} /> - ); } diff --git a/packages/grant-explorer/src/features/contributors/utils/getContributionFrameProps.ts b/packages/grant-explorer/src/features/contributors/utils/getContributionFrameProps.ts deleted file mode 100644 index 3f0dd8a08..000000000 --- a/packages/grant-explorer/src/features/contributors/utils/getContributionFrameProps.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Contribution } from "data-layer"; -import { AttestationFrameProps, AttestationProject } from "../../api/types"; - -export const getContributionFrameProps = ( - contributions: Contribution[] -): AttestationFrameProps => { - const allProjects: AttestationProject[] = []; - const roundsSet = new Set(); - const chainsSet = new Set(); - const amountByRound: Record< - string, - { - roundName: string; - totalAmount: number; - } - > = {}; - - // Process each contribution - for (const contribution of contributions) { - const projectName = contribution.application.project.name; - const roundId = contribution.round.roundMetadata.name; - const chainId = contribution.chainId; - const amount = contribution.amountInUsd; - - // Store project details - allProjects.push({ - rank: 0, // Rank will be calculated later - name: projectName, - round: roundId, - image: contribution.application.project.metadata?.logoImg || "", - }); - - roundsSet.add(roundId); - chainsSet.add(chainId); - - amountByRound[roundId] = amountByRound[roundId] || { - roundName: contribution.round.roundMetadata.name, - totalAmount: 0, - }; - amountByRound[roundId].totalAmount += amount; - } - - // Sort and rank projects by the amount in USD - const topProjects = allProjects - .sort((a, b) => Number(b.amount) - Number(a.amount)) // Sort by amount - .slice(0, 3) // Get top 3 - .map((project, i) => ({ - ...project, - rank: i + 1, // Assign rank starting from 1 - })); - - // Find the top round by total amount - const topRound = - Object.values(amountByRound).sort( - (a, b) => b.totalAmount - a.totalAmount - )[0]?.roundName || ""; - - return { - topRoundName: topRound, - projectsFunded: allProjects.length, - roundsSupported: roundsSet.size, - checkedOutChains: chainsSet.size, - projects: topProjects, - }; -}; - -export const getRoundsToFetchNames = (props: AttestationFrameProps) => { - if (props.projects.length === 0) { - return {}; - } - const roundsToFetchNames: Record = {}; - props.projects.forEach((project) => { - roundsToFetchNames[project?.chainId ?? 0] = project.roundId ?? ""; - }); - roundsToFetchNames[props.topRound?.chainId ?? 0] = - props.topRound?.roundId ?? ""; - - return roundsToFetchNames; -}; diff --git a/packages/grant-explorer/src/features/round/ThankYou.tsx b/packages/grant-explorer/src/features/round/ThankYou.tsx index 80163bece..9b5a322d9 100755 --- a/packages/grant-explorer/src/features/round/ThankYou.tsx +++ b/packages/grant-explorer/src/features/round/ThankYou.tsx @@ -6,27 +6,19 @@ import Navbar from "../common/Navbar"; import { useCartStorage } from "../../store"; import { useCheckoutStore } from "../../checkoutStore"; import { ProgressStatus } from "../api/types"; -import { useRoundById, useRoundNamesByIds } from "../../context/RoundContext"; -import image from "../../assets/gitcoinlogo-black.svg"; -import alt1 from "../../assets/alt1.svg"; +import { useRoundById } from "../../context/RoundContext"; import { useWindowSize } from "react-use"; import { ThankYouSectionButtons } from "../common/ShareButtons"; import { - HiddenAttestationFrame, ImpactMintingSuccess, PreviewFrame, } from "../attestations/MintYourImpactComponents"; -import { getRoundsToFetchNames } from "../attestations/utils/getRoundsToFetchNames"; import { MintProgressModalBodyThankYou } from "../attestations/MintProgressModalBody"; // We'll define this next import { useGetAttestationData } from "../../hooks/attestations/useGetAttestationData"; import { useEASAttestation } from "../../hooks/attestations/useEASAttestation"; -import { handleGetAttestationPreview } from "../../hooks/attestations/utils/getAttestationPreview"; -import { useResolveENS } from "../../hooks/useENS"; import { useAccount, useBalance } from "wagmi"; -import { useGetImages } from "../../hooks/attestations/useGetImages"; import { useEstimateGas } from "../../hooks/attestations/useEstimateGas"; import { AttestationChainId } from "../attestations/utils/constants"; -import { ethers } from "ethers"; import { useAttestationFee } from "../contributors/hooks/useMintingAttestations"; import { useAttestationStore } from "../../attestationStore"; import { useDebugMode } from "../api/utils"; @@ -41,7 +33,7 @@ export default function ThankYou() { const [minted, setMinted] = useState(false); const [isModalOpen, setIsModalOpen] = useState(false); - const [selectedBackground, setSelectedBackground] = useState(alt1); + const [selectedColor, setSelectedColor] = useState("0"); const [impactImageCid, setImpactImageCid] = useState(); const [attestationLink, setAttestationLink] = useState(); @@ -116,17 +108,8 @@ export default function ThankYou() { state.getCheckedOutTransactions() ); - const ImpactFrameProps = useAttestationStore((state) => { - return state.getFrameProps(transactions); - }); - - const roundsToFetchName = getRoundsToFetchNames(ImpactFrameProps); - - const { data: roundNames, isLoading: isLoadingRoundNames } = - useRoundNamesByIds(roundsToFetchName); - - const handleSelectBackground = (background: string) => { - setSelectedBackground(background); + const handleSelectBackground = (option: string) => { + setSelectedColor(option); }; const toggleModal = async () => { @@ -136,34 +119,17 @@ export default function ThankYou() { const handleSetMinted = () => { setMinted(true); setIsModalOpen(false); - attestationStore.cleanCheckedOutProjects(); + attestationStore.cleanCheckedOutTransactions(); }; const { width } = useWindowSize(); const flex = width <= 1280; - const { data: name, isLoading: isLoadingENS } = useResolveENS(address); - - const { - data: imagesBase64, - isLoading: isLoadingImages, - isFetched: imagesFetched, - } = useGetImages( - ImpactFrameProps.projects.map((project) => project.image), - isModalOpen - ); - const { data, isLoading } = useGetAttestationData( transactions, - handleGetAttestationPreview, - isLoadingENS || - isLoadingImages || - !isModalOpen || - isLoadingRoundNames || - !imagesFetched, - selectedBackground, - name as string | undefined + !isModalOpen, + selectedColor ); useEffect(() => { @@ -172,8 +138,6 @@ export default function ThankYou() { } }, [data]); - const frameId = ethers.utils.solidityKeccak256(["string[]"], [transactions]); - const { data: gasEstimation, isLoading: loadingGasEstimate, @@ -206,23 +170,6 @@ export default function ThankYou() { ? false : balance.value < attestationFee + (gasEstimation ?? 0n); - const topRoundName = roundNames - ? roundNames[ImpactFrameProps?.topRound?.chainId ?? 0][ - ImpactFrameProps?.topRound?.roundId ?? "" - ] - : ""; - - const ImpactFramePropsWithNames = { - ...ImpactFrameProps, - topRoundName, - projects: ImpactFrameProps.projects.map((project) => ({ - ...project, - round: roundNames - ? (roundNames[project?.chainId ?? 0][project?.roundId ?? ""] ?? - project.round) - : project.round, - })), - }; const debugModeEnabled = useDebugMode(); return ( @@ -328,19 +275,11 @@ export default function ThankYou() { notEnoughFunds={notEnoughFunds} handleAttest={attest} impactImageCid={data?.impactImageCid} - isLoading={isLoading || isLoadingENS || isRefetchingEstimate} + isLoading={isLoading || isRefetchingEstimate} heading="Mint your impact" subheading="Your attestation will be generated after you mint." /> - )} diff --git a/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts b/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts index 5cbdc9e40..fbf0b4d96 100644 --- a/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts +++ b/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts @@ -1,16 +1,13 @@ import { useQuery } from "@tanstack/react-query"; import { AttestationChainId } from "../../features/attestations/utils/constants"; -import { ethers } from "ethers"; /** * Hook to fetch attestation data based on a transaction hash. */ export const useGetAttestationData = ( transactionHashes: string[], - getImpactImageData: (txHash: string) => Promise, isLoading: boolean, - selectedColor: string, - donorENS?: string + selectedColor: string ) => { return useQuery({ queryKey: [ @@ -25,27 +22,15 @@ export const useGetAttestationData = ( throw new Error("TransactionHashes are required"); } - const frameId = ethers.utils.solidityKeccak256( - ["string[]"], - [transactionHashes] - ); - - const image = await getImpactImageData(frameId); - - if (!image) { - throw new Error("Image is required"); - } - // Generate a cache key from the request parameters const body = JSON.stringify({ transactionHashes, chainId: AttestationChainId, - base64Image: image, - donorENS: donorENS, + backgroundOption: selectedColor, }); try { const response = await fetch( - `https://attestation.gitcoin.co/api/getAttestation`, + `http://localhost:3000/api/getAttestation`, { method: "POST", headers: { From fd77e996f88a42ce7cc72937fbf793a333f218f7 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Fri, 18 Oct 2024 08:07:23 +0530 Subject: [PATCH 2/2] Update packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts --- .../src/hooks/attestations/useGetAttestationData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts b/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts index fbf0b4d96..4c28f6714 100644 --- a/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts +++ b/packages/grant-explorer/src/hooks/attestations/useGetAttestationData.ts @@ -30,7 +30,7 @@ export const useGetAttestationData = ( try { const response = await fetch( - `http://localhost:3000/api/getAttestation`, + `https://attestation.gitcoin.co/api/getAttestation`, { method: "POST", headers: {