From d6e834320da51cdffb4d16f565d422f8ed2c6c0a Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Fri, 16 Feb 2024 17:10:59 +0100 Subject: [PATCH] fix all occurrences --- packages/round-manager/src/features/common/Utils.ts | 11 ++++++++--- .../src/features/round/ViewApplicationPage.tsx | 3 +-- .../src/features/round/ViewRoundPage.tsx | 7 ++++--- .../round/__tests__/ApplicationDirectPayout.test.tsx | 2 +- .../round/__tests__/ApplicationsToReview.test.tsx | 2 +- .../round/__tests__/ViewApplicationPage.test.tsx | 2 +- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/packages/round-manager/src/features/common/Utils.ts b/packages/round-manager/src/features/common/Utils.ts index bd6fffd1d2..d9e4bf43f9 100644 --- a/packages/round-manager/src/features/common/Utils.ts +++ b/packages/round-manager/src/features/common/Utils.ts @@ -1,4 +1,9 @@ -import { ROUND_PAYOUT_DIRECT, ROUND_PAYOUT_MERKLE } from "common"; +import { + ROUND_PAYOUT_DIRECT, + ROUND_PAYOUT_MERKLE, + ROUND_PAYOUT_DIRECT_OLD, + ROUND_PAYOUT_MERKLE_OLD, +} from "common"; export const verticalTabStyles = (selected: boolean) => selected @@ -13,11 +18,11 @@ export const horizontalTabStyles = (selected: boolean) => export const getPayoutRoundDescription = (key: string) => { switch (key) { case ROUND_PAYOUT_MERKLE: + case ROUND_PAYOUT_MERKLE_OLD: return "Quadratic Funding"; - break; case ROUND_PAYOUT_DIRECT: + case ROUND_PAYOUT_DIRECT_OLD: return "Direct Grant"; - break; default: return key; break; diff --git a/packages/round-manager/src/features/round/ViewApplicationPage.tsx b/packages/round-manager/src/features/round/ViewApplicationPage.tsx index e762384a25..9d378640c9 100644 --- a/packages/round-manager/src/features/round/ViewApplicationPage.tsx +++ b/packages/round-manager/src/features/round/ViewApplicationPage.tsx @@ -68,8 +68,7 @@ import { useDebugMode } from "../../hooks"; import { getPayoutRoundDescription } from "../common/Utils"; import moment from "moment"; import ApplicationDirectPayout from "./ApplicationDirectPayout"; - -const ROUND_PAYOUT_DIRECT = "DIRECT"; +import { ROUND_PAYOUT_DIRECT_OLD as ROUND_PAYOUT_DIRECT } from "common"; type Status = "done" | "current" | "rejected" | "approved" | undefined; diff --git a/packages/round-manager/src/features/round/ViewRoundPage.tsx b/packages/round-manager/src/features/round/ViewRoundPage.tsx index 1aa62c18de..4f65a7cde8 100644 --- a/packages/round-manager/src/features/round/ViewRoundPage.tsx +++ b/packages/round-manager/src/features/round/ViewRoundPage.tsx @@ -49,9 +49,10 @@ import { RoundDates, parseRoundDates } from "../common/parseRoundDates"; import moment from "moment"; import ApplicationsToApproveReject from "./ApplicationsToApproveReject"; import ApplicationsToReview from "./ApplicationsToReview"; - -const ROUND_PAYOUT_DIRECT = "DIRECT"; -const ROUND_PAYOUT_MERKLE = "MERKLE"; +import { + ROUND_PAYOUT_DIRECT_OLD as ROUND_PAYOUT_DIRECT, + ROUND_PAYOUT_MERKLE_OLD as ROUND_PAYOUT_MERKLE, +} from "common"; export const isDirectRound = (round: Round) => round && round.payoutStrategy.strategyName === ROUND_PAYOUT_DIRECT; diff --git a/packages/round-manager/src/features/round/__tests__/ApplicationDirectPayout.test.tsx b/packages/round-manager/src/features/round/__tests__/ApplicationDirectPayout.test.tsx index bbd36b4c94..5b26e02427 100644 --- a/packages/round-manager/src/features/round/__tests__/ApplicationDirectPayout.test.tsx +++ b/packages/round-manager/src/features/round/__tests__/ApplicationDirectPayout.test.tsx @@ -9,7 +9,7 @@ import { import "@testing-library/jest-dom/extend-expect"; import ApplicationDirectPayout from "../ApplicationDirectPayout"; import { makeGrantApplicationData, makeRoundData } from "../../../test-utils"; -import { ROUND_PAYOUT_DIRECT } from "common"; +import { ROUND_PAYOUT_DIRECT_OLD as ROUND_PAYOUT_DIRECT } from "common"; import { useWallet } from "../../common/Auth"; import { useDisconnect, useNetwork, useSwitchNetwork } from "wagmi"; diff --git a/packages/round-manager/src/features/round/__tests__/ApplicationsToReview.test.tsx b/packages/round-manager/src/features/round/__tests__/ApplicationsToReview.test.tsx index f4f6a2117d..9f43e71cad 100644 --- a/packages/round-manager/src/features/round/__tests__/ApplicationsToReview.test.tsx +++ b/packages/round-manager/src/features/round/__tests__/ApplicationsToReview.test.tsx @@ -27,7 +27,7 @@ import { // eslint-disable-next-line @typescript-eslint/no-unused-vars import { ApplicationStatus, ProgressStatus } from "../../api/types"; import { errorModalDelayMs } from "../../../constants"; -import { ROUND_PAYOUT_DIRECT } from "common"; +import { ROUND_PAYOUT_DIRECT_OLD as ROUND_PAYOUT_DIRECT } from "common"; jest.mock("../../api/application"); jest.mock("../../common/Auth", () => ({ diff --git a/packages/round-manager/src/features/round/__tests__/ViewApplicationPage.test.tsx b/packages/round-manager/src/features/round/__tests__/ViewApplicationPage.test.tsx index ba1951a2c4..658624b319 100644 --- a/packages/round-manager/src/features/round/__tests__/ViewApplicationPage.test.tsx +++ b/packages/round-manager/src/features/round/__tests__/ViewApplicationPage.test.tsx @@ -36,7 +36,7 @@ import { import { GrantApplication, ProgressStatus } from "../../api/types"; import { errorModalDelayMs } from "../../../constants"; import moment from "moment"; -import { ROUND_PAYOUT_DIRECT } from "common"; +import { ROUND_PAYOUT_DIRECT_OLD as ROUND_PAYOUT_DIRECT } from "common"; jest.mock("../../api/application"); jest.mock("../../common/Auth");