Skip to content

Commit d1f9a4f

Browse files
committed
try fix
1 parent 14c225d commit d1f9a4f

File tree

2 files changed

+14
-25
lines changed

2 files changed

+14
-25
lines changed

packages/round-manager/src/features/api/payoutStrategy/payoutStrategy.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,17 @@ export const useGroupProjectsByPaymentStatus = (
6060

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

63+
const matchingDistribution = round.matchingDistribution;
64+
65+
// filter out matchingDistribution with projectId "0x0DD5CC8755C6e4247364012Bb0AC99Cd5ED136D2"
66+
const filteredMatchingDistribution = matchingDistribution?.filter(
67+
(project) =>
68+
project.projectId !== "0x0DD5CC8755C6e4247364012Bb0AC99Cd5ED136D2"
69+
);
70+
6371
const allProjects: MatchingStatsData[] = useMemo(
6472
() =>
65-
round.matchingDistribution?.map((matchingStatsData) => {
73+
filteredMatchingDistribution?.map((matchingStatsData) => {
6674
const anchorAddress = applications?.find(
6775
(application) => application.projectId === matchingStatsData.projectId
6876
)?.anchorAddress;
@@ -83,7 +91,7 @@ export const useGroupProjectsByPaymentStatus = (
8391
projectPayoutAddress: matchingStatsData.projectPayoutAddress,
8492
};
8593
}) ?? [],
86-
[round.matchingDistribution, applications]
94+
[filteredMatchingDistribution, applications]
8795
);
8896

8997
useEffect(() => {

packages/round-manager/src/features/round/ViewFundGrantees.tsx

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ export function PayProjectsTable(props: {
257257
}, [selectedProjects, props.projects]);
258258

259259
function toggleAll() {
260+
console.log("toggleAll", checked, indeterminate);
261+
console.log("props.projects", props.projects);
260262
setSelectedProjects(checked || indeterminate ? [] : props.projects);
261263
setChecked(!checked && !indeterminate);
262264
setIndeterminate(false);
@@ -295,13 +297,6 @@ export function PayProjectsTable(props: {
295297
</div>
296298
);
297299

298-
const getAnchorAddress = async (chainId?: number, poolId?: string) => {
299-
if (chainId === 42220 && poolId === "27") {
300-
return "0x91F824424Ec66F129E0DaCA8151eaD5e3bD89E5F";
301-
}
302-
return "";
303-
};
304-
305300
const handleFundGrantees = async () => {
306301
setShowConfirmationModal(false);
307302
setOpenReadyForDistributionProgressModal(true);
@@ -311,22 +306,6 @@ export function PayProjectsTable(props: {
311306
}
312307

313308
if (roundId) {
314-
// check if all anchoraddresses are set, if undefined, console.log please
315-
const anchorAddresses = selectedProjects.map((p) => p.anchorAddress);
316-
if (anchorAddresses.some((address) => address === undefined)) {
317-
const anchorAddress = await getAnchorAddress(
318-
props.round.chainId,
319-
props.round.payoutStrategy.id
320-
);
321-
322-
const updatedProjects = selectedProjects.map((p) => ({
323-
...p,
324-
anchorAddress: anchorAddress,
325-
}));
326-
327-
setSelectedProjects(updatedProjects);
328-
}
329-
330309
const result = await allo
331310
.batchDistributeFunds({
332311
payoutStrategyOrPoolId:
@@ -388,6 +367,8 @@ export function PayProjectsTable(props: {
388367
}
389368
};
390369

370+
console.log("selectedProjects", selectedProjects);
371+
391372
return (
392373
<div>
393374
<div className="sm:flex sm:items-center">

0 commit comments

Comments
 (0)