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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 13 additions & 7 deletions packages/builder/src/components/grants/ApplicationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,18 @@ export default function ApplicationCard({
return null;
}

const applicationStartTime = new Date(props.round.applicationsStartTime);
const showCheckerLink =
applicationStartTime >= new Date("2024-12-01T00:00:00Z");

const applicationViewLink = showCheckerLink
? `https://beta.checker.gitcoin.co/view/application/${applicationData.chainId}/${applicationData.roundID}/${applicationData.application.id}`
: roundApplicationViewPath(
applicationData.chainId.toString(),
applicationData.roundID,
applicationData.application.metadataCid || ""
);

return (
<Box
p={2}
Expand Down Expand Up @@ -241,13 +253,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
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
20 changes: 20 additions & 0 deletions packages/round-manager/src/features/round/GrantApplications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Tab } from "@headlessui/react";
import { horizontalTabStyles } from "../common/Utils";
import { MdRateReview } from "react-icons/md";
import { TabApplicationCounter } from "../common/styles";
import { Link } from "react-router-dom";

function GrantApplications(props: {
isDirectRound?: boolean;
Expand Down Expand Up @@ -55,6 +56,25 @@ function GrantApplications(props: {
isDirectRound={props.isDirectRound!}
/>
<div className="py-5 mb-8">
<div className="w-[954px] h-[164px] p-6 bg-[#f6fcf0] rounded-2xl border border-[#eaeaea] flex-col justify-start items-start gap-6 inline-flex">
<div className="self-stretch h-[60px] flex-col justify-start items-start gap-2 flex">
<div className="self-stretch text-black text-lg font-medium font-['Modern Era'] leading-relaxed">
Checker is now in Beta
</div>
<div className="self-stretch text-black text-base font-normal font-['Modern Era'] leading-relaxed">
Use our AI-powered application assistant to process
applicants with confidence
</div>
</div>
<div className="h-8 px-3 py-2 bg-[#00433b] rounded-lg border border-[#00433b] justify-center items-center gap-1.5 inline-flex">
<Link
to={`https://beta.checker.gitcoin.co/review/${props.chainId}/${props.roundId}`}
className="text-white text-sm font-medium font-['DM Mono'] leading-none"
>
Review Applications
</Link>
</div>
</div>
<div className="my-4 flex justify-start items-center text-md font-normal font-momo">
<MdRateReview className="h-4 w-4 mr-2 text-rose-300" />
<span>Manual Review</span>
Expand Down