Skip to content

Commit

Permalink
enable sync with checker on pool creation and apply
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Nov 28, 2024
1 parent dbca8a2 commit 4986a5a
Showing 1 changed file with 26 additions and 0 deletions.
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("http://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("http://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

0 comments on commit 4986a5a

Please sign in to comment.