Skip to content

Quick celo fix #3827

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

Open
wants to merge 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,17 @@ export const useGroupProjectsByPaymentStatus = (

const paidProjectIds = paidProjects?.map((project) => project.projectId);

const matchingDistribution = round.matchingDistribution;

// filter out matchingDistribution with projectId "0x0DD5CC8755C6e4247364012Bb0AC99Cd5ED136D2"
const filteredMatchingDistribution = matchingDistribution?.filter(
(project) =>
project.projectId !== "0x0DD5CC8755C6e4247364012Bb0AC99Cd5ED136D2"
);

const allProjects: MatchingStatsData[] = useMemo(
() =>
round.matchingDistribution?.map((matchingStatsData) => {
filteredMatchingDistribution?.map((matchingStatsData) => {
const anchorAddress = applications?.find(
(application) => application.projectId === matchingStatsData.projectId
)?.anchorAddress;
Expand All @@ -83,7 +91,7 @@ export const useGroupProjectsByPaymentStatus = (
projectPayoutAddress: matchingStatsData.projectPayoutAddress,
};
}) ?? [],
[round.matchingDistribution, applications]
[filteredMatchingDistribution, applications]
);

useEffect(() => {
Expand Down
26 changes: 18 additions & 8 deletions packages/round-manager/src/features/round/ViewFundGrantees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ export function PayProjectsTable(props: {
}, [selectedProjects, props.projects]);

function toggleAll() {
console.log("toggleAll", checked, indeterminate);
console.log("props.projects", props.projects);
setSelectedProjects(checked || indeterminate ? [] : props.projects);
setChecked(!checked && !indeterminate);
setIndeterminate(false);
Expand Down Expand Up @@ -365,6 +367,8 @@ export function PayProjectsTable(props: {
}
};

console.log("selectedProjects", selectedProjects);

return (
<div>
<div className="sm:flex sm:items-center">
Expand Down Expand Up @@ -424,28 +428,32 @@ export function PayProjectsTable(props: {
<tr
key={project.projectId}
className={
selectedProjects.includes(project)
selectedProjects.some(
(p) => p.projectId === project.projectId
)
? "bg-gray-50"
: undefined
}
>
<td className="relative px-7 sm:w-12 sm:px-6">
{selectedProjects.includes(project) && (
{selectedProjects.some(
(p) => p.projectId === project.projectId
) && (
<div className="absolute inset-y-0 left-0 w-0.5 bg-indigo-600" />
)}
<input
type="checkbox"
data-testid="project-checkbox"
className="absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"
checked={selectedProjects.includes(project)}
checked={selectedProjects.some(
(p) => p.projectId === project.projectId
)}
onChange={(e) => {
setSelectedProjects(
e.target.checked
? [...selectedProjects, project]
: selectedProjects.filter(
(p) =>
p.projectPayoutAddress !==
project.projectPayoutAddress
(p) => p.projectId !== project.projectId
)
);
}}
Expand All @@ -454,7 +462,9 @@ export function PayProjectsTable(props: {
<td
className={classNames(
"whitespace-nowrap py-4 pr-3 text-sm font-medium",
selectedProjects.includes(project)
selectedProjects.some(
(p) => p.projectId === project.projectId
)
? "text-indigo-600"
: "text-gray-900"
)}
Expand Down Expand Up @@ -530,7 +540,7 @@ export function PayProjectsTable(props: {
title="Warning!"
body={
<div className="text-gray-400 text-sm font-['Libre_Franklin']">
You dont have enough funds in the contract to pay out the selected
You don't have enough funds in the contract to pay out the selected
grantees. Please either add more funds to the contract or select
fewer grantees.
</div>
Expand Down