Skip to content

Commit

Permalink
fix: bigint serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
brancoder committed Dec 17, 2024
1 parent 7b3e80b commit 29a46ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/wallet-dashboard/hooks/useNewStakeTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export function useNewStakeTimelockedTransaction(
groupedTimelockObjects: GroupedTimelockObject[],
) {
const amount = groupedTimelockObjects.reduce(
(acc, obj) => acc + (obj.totalLockedAmount - (obj.splitAmount ?? BigInt(0))),
BigInt(0),
(acc, obj) => acc + (obj.totalLockedAmount - (obj.splitAmount ?? 0n)),
0n,
);
const client = useIotaClient();
return useQuery({
Expand All @@ -47,7 +47,7 @@ export function useNewStakeTimelockedTransaction(
'stake-timelocked-transaction',
validator,
senderAddress,
amount,
amount.toString(),
groupedTimelockObjects.length,
],
queryFn: async () => {
Expand Down

0 comments on commit 29a46ac

Please sign in to comment.