Skip to content

Commit

Permalink
Fix format of totalAmount and value to bigint
Browse files Browse the repository at this point in the history
  • Loading branch information
Pabl0cks committed Jun 29, 2024
1 parent 7ef451c commit 235544c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/nextjs/app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,12 @@ const AdminPage = () => {
});
const builders = selectedGrantsWithMetaData.map(grant => grant.builder);
const buildersAmount = selectedGrantsWithMetaData.map(grant => parseEther((grant.askAmount / 2).toString()));
const totalAmount = selectedGrantsWithMetaData.reduce((acc, grant) => acc + grant.askAmount, 0);
const totalAmount = selectedGrantsWithMetaData.reduce((acc, grant) => {
return acc + parseEther(grant.askAmount.toString());
}, BigInt(0));

const value = totalAmount / BigInt(2);

const value = parseEther((totalAmount / 2).toString());
const hash = await splitEqualETH({
args: [builders, buildersAmount],
value: value,
Expand Down

0 comments on commit 235544c

Please sign in to comment.