Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored and 0xKurt committed May 2, 2024
1 parent 394dcc5 commit 3c00278
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/round-manager/src/features/api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,6 @@ export const formatCurrency = (
maximumFractionDigits: fraction || 3,
});
};

export const isInfiniteDate = (roundTime: Date) =>
roundTime.getFullYear() === 2243;
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { useRoundById } from "../../context/round/RoundContext";
import { useUpdateRound } from "../../context/round/UpdateRoundContext";
import { getPayoutTokenOptions, payoutTokens } from "../api/payoutTokens";
import { ProgressStatus, ProgressStep, Round } from "../api/types";
import { CHAINS, SupportType } from "../api/utils";
import { CHAINS, SupportType, isInfiniteDate } from "../api/utils";
import ConfirmationModal from "../common/ConfirmationModal";
import ErrorModal from "../common/ErrorModal";
import FormValidationErrorList from "../common/FormValidationErrorList";
Expand All @@ -55,7 +55,7 @@ import { RoundCategory, UpdateRoundParams } from "common/dist/types";
import { ethers } from "ethers";
import { getConfig } from "common/src/config";
import { zeroAddress } from "viem";
import { NATIVE, UINT64_MAX } from "common/dist/allo/common";
import { NATIVE } from "common/dist/allo/common";

type EditMode = {
canEdit: boolean;
Expand Down Expand Up @@ -175,9 +175,10 @@ export default function ViewRoundSettings(props: { id?: string }) {
/* All DG rounds have rolling applications enabled */
useEffect(() => {
if (
round?.applicationsEndTime == new Date(UINT64_MAX.toString()) &&
round && round.applicationsEndTime &&
isInfiniteDate(round.applicationsEndTime) &&
isDirectRound(round)
) {
) {
setRollingApplicationsEnabled(true);
} else {
setRollingApplicationsEnabled(false);
Expand Down

0 comments on commit 3c00278

Please sign in to comment.