Skip to content

Commit

Permalink
fix hook deadline
Browse files Browse the repository at this point in the history
  • Loading branch information
yvesfracari committed Oct 23, 2024
1 parent 5fc6246 commit ebe8088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cow-hooks-ui/src/hooks/cowShed/useHookDeadline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function useHookDeadline({
const validToOnTimezone = context?.orderParams?.validTo || 0;
const validToTimestamp = validToOnTimezone + now.getTimezoneOffset() * 60;
const currentTimestamp = new Date().getTime() / 1000;
const oneHourAfter = BigInt(currentTimestamp.toFixed() + 60 * 60);
const oneHourAfter = Number(currentTimestamp.toFixed()) + 60 * 60;

if (validToTimestamp < oneHourAfter) return BigInt(oneHourAfter);
return BigInt(validToTimestamp);
Expand Down

0 comments on commit ebe8088

Please sign in to comment.