Skip to content

Commit

Permalink
Merge branch 'master' of github.com:RevokeCash/revoke.cash into web-v…
Browse files Browse the repository at this point in the history
…itals
  • Loading branch information
Dozie2001 committed Jan 23, 2025
2 parents 4d734c2 + 67d4cb2 commit c39e041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/allowances/dashboard/cells/AllowanceCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
getAllowanceI18nValues,
isErc20Allowance,
} from 'lib/utils/allowances';
import { SECOND } from 'lib/utils/time';
import { DAY, SECOND, YEAR } from 'lib/utils/time';
import { useLocale, useTranslations } from 'next-intl';
import { useState } from 'react';
import { twMerge } from 'tailwind-merge';
Expand Down Expand Up @@ -45,7 +45,7 @@ const AllowanceCell = ({ allowance, onUpdate }: Props) => {

const inTime =
allowance.payload?.type === AllowanceType.PERMIT2
? timeago.format(allowance.payload.expiration * SECOND, locale)
? timeago.format(Math.min(allowance.payload.expiration * SECOND, Date.now() + 1000 * YEAR + 1 * DAY), locale)
: null;

return (
Expand Down

0 comments on commit c39e041

Please sign in to comment.