Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrate checker #3730

Merged
merged 5 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions packages/builder/src/components/grants/ApplicationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import { Link } from "react-router-dom";
import { loadRound } from "../../actions/rounds";
import { roundApplicationViewPath } from "../../routes";
import { ApplicationCardType, RoundSupport } from "../../types";
import {
formatDate,
Expand Down Expand Up @@ -196,6 +195,9 @@ export default function ApplicationCard({
return null;
}

const applicationViewLink = `https://beta.checker.gitcoin.co/view/application/
${applicationData.chainId}/${applicationData.roundID}/${applicationData.application.id}`;

return (
<Box
p={2}
Expand Down Expand Up @@ -241,13 +243,7 @@ export default function ApplicationCard({
</a>
</p>
)}
<Link
to={roundApplicationViewPath(
applicationData.chainId.toString(),
applicationData.roundID,
applicationData.application.metadataCid || ""
)}
>
<Link to={applicationViewLink} target="_blank">
<Button
backgroundColor="purple.100"
color="purple.600"
Expand Down
262 changes: 0 additions & 262 deletions packages/builder/src/components/rounds/ViewApplication.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions packages/builder/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import NewProject from "./components/grants/New";
import Project from "./components/grants/Show";
import RoundApply from "./components/rounds/Apply";
import RoundShow from "./components/rounds/Show";
import ViewApplication from "./components/rounds/ViewApplication";
import history from "./history";
import reportWebVitals from "./reportWebVitals";
import { slugs } from "./routes";
Expand Down Expand Up @@ -138,10 +137,6 @@ root.render(
path={slugs.roundApplication}
element={<RoundApply />}
/>
<Route
path={slugs.roundApplicationView}
element={<ViewApplication />}
/>
<Route path="*" element={<PageNotFound />} />
</Routes>
</Layout>
Expand Down
7 changes: 0 additions & 7 deletions packages/builder/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const slugs = {
newGrant: `/projects/new`,
round: `/chains/:chainId/rounds/:roundId`,
roundApplication: `/chains/:chainId/rounds/:roundId/apply`,
roundApplicationView: `/chains/:chainId/rounds/:roundId/view/:ipfsHash`,
};

export const rootPath = () => slugs.root;
Expand Down Expand Up @@ -39,9 +38,3 @@ export const roundApplicationPathForProject = (
roundId: string,
projectId: string
) => `/round/${chainId}/${roundId}/${projectId}`;

export const roundApplicationViewPath = (
chainId: string,
roundId: string,
ipfsHash: string
) => `/chains/${chainId}/rounds/${roundId}/view/${ipfsHash}`;
26 changes: 26 additions & 0 deletions packages/common/src/allo/backends/allo-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,19 @@ export class AlloV2 implements Allo {
blockNumber: receipt.blockNumber,
});

// sync pool with checker
await fetch("https://api.checker.gitcoin.co/api/pools", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
alloPoolId: parseInt(poolCreatedEvent.poolId, 10).toString(),
chainId: this.chainId,
skipEvaluation: false,
}),
});

emit("indexingStatus", success(void 0));

return success({
Expand Down Expand Up @@ -749,6 +762,19 @@ export class AlloV2 implements Allo {
blockNumber: receipt.blockNumber,
});

// sync pool with checker
await fetch("https://api.checker.gitcoin.co/api/pools", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
alloPoolId: args.roundId.toString(),
chainId: this.chainId,
skipEvaluation: false,
}),
});

emit("indexingStatus", success(null));

return success(args.projectId);
Expand Down
Loading
Loading