From 2cdf5dc262ff2c0533721619d5ab004f1700efd8 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 14 May 2024 20:41:29 +0700 Subject: [PATCH] update params --- packages/common/src/allo/allo.ts | 2 +- packages/common/src/allo/backends/allo-v1.ts | 8 ++++---- packages/common/src/allo/backends/allo-v2.ts | 4 ++-- .../round-manager/src/features/round/ViewFundGrantees.tsx | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/common/src/allo/allo.ts b/packages/common/src/allo/allo.ts index 6f923664fe..f38f63ac99 100644 --- a/packages/common/src/allo/allo.ts +++ b/packages/common/src/allo/allo.ts @@ -203,7 +203,7 @@ export interface Allo { >; batchDistributeFunds: (args: { - payoutStrategy: Address; + payoutStrategyOrPoolId: string; allProjects: MatchingStatsData[]; projectIdsToBePaid: string[]; }) => AlloOperation< diff --git a/packages/common/src/allo/backends/allo-v1.ts b/packages/common/src/allo/backends/allo-v1.ts index 39a0b087fd..085de427c8 100644 --- a/packages/common/src/allo/backends/allo-v1.ts +++ b/packages/common/src/allo/backends/allo-v1.ts @@ -491,8 +491,8 @@ export class AlloV1 implements Allo { args.roundData.applicationsEndTime ? dateToEthereumTimestamp(args.roundData.applicationsEndTime) : args.roundData.roundEndTime - ? dateToEthereumTimestamp(args.roundData.roundEndTime) - : maxUint256, + ? dateToEthereumTimestamp(args.roundData.roundEndTime) + : maxUint256, dateToEthereumTimestamp(args.roundData.roundStartTime), args.roundData.roundEndTime ? dateToEthereumTimestamp(args.roundData.roundEndTime) @@ -984,7 +984,7 @@ export class AlloV1 implements Allo { } batchDistributeFunds(args: { - payoutStrategy: Address; + payoutStrategyOrPoolId: string; allProjects: MatchingStatsData[]; projectIdsToBePaid: string[]; }): AlloOperation< @@ -1029,7 +1029,7 @@ export class AlloV1 implements Allo { }); const txResult = await sendTransaction(this.transactionSender, { - address: args.payoutStrategy, + address: getAddress(args.payoutStrategyOrPoolId), abi: MerklePayoutStrategyImplementationABI, functionName: "payout", args: [projectsWithMerkleProof], diff --git a/packages/common/src/allo/backends/allo-v2.ts b/packages/common/src/allo/backends/allo-v2.ts index 2743f992c4..c27d874b88 100644 --- a/packages/common/src/allo/backends/allo-v2.ts +++ b/packages/common/src/allo/backends/allo-v2.ts @@ -1163,7 +1163,7 @@ export class AlloV2 implements Allo { } batchDistributeFunds(args: { - payoutStrategy: Address; + payoutStrategyOrPoolId: string; allProjects: MatchingStatsData[]; projectIdsToBePaid: string[]; }): AlloOperation< @@ -1175,7 +1175,7 @@ export class AlloV2 implements Allo { } > { return new AlloOperation(async ({ emit }) => { - const poolId = BigInt(args.payoutStrategy); + const poolId = BigInt(args.payoutStrategyOrPoolId); const recipientIds: Address[] = args.projectIdsToBePaid.map((id) => getAddress(id) ); diff --git a/packages/round-manager/src/features/round/ViewFundGrantees.tsx b/packages/round-manager/src/features/round/ViewFundGrantees.tsx index 28315ede2e..2eff363608 100644 --- a/packages/round-manager/src/features/round/ViewFundGrantees.tsx +++ b/packages/round-manager/src/features/round/ViewFundGrantees.tsx @@ -307,10 +307,10 @@ export function PayProjectsTable(props: { if (roundId) { const result = await allo .batchDistributeFunds({ - payoutStrategy: + payoutStrategyOrPoolId: alloVersion === "allo-v1" - ? getAddress(props.round.id) - : getAddress(props.round.payoutStrategy.id), + ? getAddress(props.round.payoutStrategy.id) + : props.round.id, allProjects: props.allProjects, projectIdsToBePaid: selectedProjects.map((p) => p.projectId), })