Skip to content

Commit bed36d0

Browse files
feat: add getDirectAllocationPoolId
1 parent ace5b61 commit bed36d0

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

packages/common/src/allo/backends/allo-v2.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ export function getAlloAddress(chainId: number) {
8383
return allo.address();
8484
}
8585

86+
export function getDirectAllocationPoolId(chainId: number) {
87+
switch (chainId) {
88+
case 11155111:
89+
return 375;
90+
default:
91+
return undefined;
92+
}
93+
}
94+
8695
export class AlloV2 implements Allo {
8796
private transactionSender: TransactionSender;
8897
private ipfsUploader: IpfsUploader;

packages/grant-explorer/src/features/projects/hooks/useDirectAllocation.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export type DirectAllocationParams = {
3131
fundAmount: number;
3232
payoutToken: TToken;
3333
recipient: string;
34-
nonce: number;
34+
nonce: bigint;
3535
requireTokenApproval?: boolean;
3636
};
3737

@@ -163,7 +163,6 @@ async function _directAllocation({
163163
.toBigInt();
164164

165165
const recipientAddress = getAddress(recipient);
166-
const projectNonce = BigInt(nonce);
167166

168167
context.setTokenApprovalStatus(ProgressStatus.IN_PROGRESS);
169168

@@ -173,7 +172,7 @@ async function _directAllocation({
173172
tokenAddress: payoutToken.address,
174173
amount,
175174
recipient: recipientAddress,
176-
nonce: projectNonce,
175+
nonce,
177176
requireTokenApproval,
178177
})
179178
.on("tokenApprovalStatus", (tx) => {

0 commit comments

Comments
 (0)