diff --git a/packages/common/src/types.ts b/packages/common/src/types.ts index 3e3992d65a..57fea088ed 100644 --- a/packages/common/src/types.ts +++ b/packages/common/src/types.ts @@ -1,5 +1,4 @@ import { Round } from "data-layer"; -import { Hex } from "viem"; import { AnyJson } from "."; import { BigNumber } from "ethers"; diff --git a/packages/grant-explorer/src/cartStore.test.tsx b/packages/grant-explorer/src/cartStore.test.tsx index 0e6440cb3c..1240ca3889 100644 --- a/packages/grant-explorer/src/cartStore.test.tsx +++ b/packages/grant-explorer/src/cartStore.test.tsx @@ -87,7 +87,7 @@ describe("useCartStorage Zustand store", () => { }); test("should set payout token for a specific chain", () => { - const chainId: number = 1; + const chainId = 1; const payoutToken: TToken = defaultVotingTokens[1]; useCartStorage.getState().setVotingTokenForChain(chainId, payoutToken); @@ -114,7 +114,7 @@ describe("useCartStorage Zustand store", () => { }); test("should update donations for all projects with a specific chain", () => { - const chainId: number = 1; + const chainId = 1; const project1: CartProject = makeApprovedProjectData(); const project2: CartProject = makeApprovedProjectData(); @@ -146,7 +146,7 @@ describe("useCartStorage Zustand store", () => { }); test("should override voting token for a specific chain", () => { - const chainId: number = 1; + const chainId = 1; const initialVotingToken: TToken = defaultVotingTokens[1]; const newVotingToken: TToken = defaultVotingTokens[1]; diff --git a/packages/grant-explorer/src/checkoutStore.test.tsx b/packages/grant-explorer/src/checkoutStore.test.tsx index b8c2a37c69..9ee5b9484d 100644 --- a/packages/grant-explorer/src/checkoutStore.test.tsx +++ b/packages/grant-explorer/src/checkoutStore.test.tsx @@ -14,7 +14,7 @@ describe("Checkout Store", () => { it("permitStatus manipulation", async () => { const store = useCheckoutStore; - const chain: number = 1; + const chain = 1; // Initially, the status should be NOT_STARTED for all chains expect(store.getState().permitStatus[chain]).toEqual( @@ -29,7 +29,7 @@ describe("Checkout Store", () => { }); it("voteStatus manipulation", async () => { - const chain: number = 1; + const chain = 1; expect(store.getState().voteStatus[chain]).toEqual( ProgressStatus.NOT_STARTED @@ -42,7 +42,7 @@ describe("Checkout Store", () => { }); it("chainSwitchStatus manipulation", async () => { - const chain: number = 1; + const chain = 1; expect(store.getState().chainSwitchStatus[chain]).toEqual( ProgressStatus.NOT_STARTED diff --git a/packages/grant-explorer/src/features/discovery/hooks/__tests__/useFilterRounds.test.tsx b/packages/grant-explorer/src/features/discovery/hooks/__tests__/useFilterRounds.test.tsx index 2f85512d78..fdf4db4f7b 100644 --- a/packages/grant-explorer/src/features/discovery/hooks/__tests__/useFilterRounds.test.tsx +++ b/packages/grant-explorer/src/features/discovery/hooks/__tests__/useFilterRounds.test.tsx @@ -77,7 +77,7 @@ describe("useFilterRounds", () => { ); await waitFor(() => - expect(result?.current.data?.length!).toBe( + expect(result?.current.data?.length).toBe( mockedRoundsOverAllChains.length ) ); diff --git a/packages/grant-explorer/src/features/discovery/hooks/useFilterRounds.ts b/packages/grant-explorer/src/features/discovery/hooks/useFilterRounds.ts index be2855c419..689b1ac0b8 100644 --- a/packages/grant-explorer/src/features/discovery/hooks/useFilterRounds.ts +++ b/packages/grant-explorer/src/features/discovery/hooks/useFilterRounds.ts @@ -1,4 +1,3 @@ -import { Chain } from "wagmi/chains"; import { useRounds } from "../../api/rounds"; import { createRoundsStatusFilter } from "../utils/createRoundsStatusFilter"; import { SWRResponse } from "swr"; diff --git a/packages/round-manager/src/features/api/__tests__/program.test.ts b/packages/round-manager/src/features/api/__tests__/program.test.ts index 5a596294c1..bee46d2705 100644 --- a/packages/round-manager/src/features/api/__tests__/program.test.ts +++ b/packages/round-manager/src/features/api/__tests__/program.test.ts @@ -16,7 +16,10 @@ describe("listPrograms", () => { it("calls the indexer endpoint", async () => { // const address = "0x0" let expectedProgram = makeProgramData({ - chain: getChainById(1), + chain: { + id: 1, + name: "Ethereum", + }, }); expectedProgram = { ...expectedProgram, @@ -61,7 +64,10 @@ describe("listPrograms", () => { describe("getProgramById", () => { it("calls the graphql endpoint and maps the metadata from IPFS", async () => { const expectedProgram = makeProgramData({ - chain: getChainById(1), + chain: { + name: "Ethereum", + id: 1, + }, }); const programId = expectedProgram.id; diff --git a/packages/round-manager/src/features/common/__tests__/AddQuestionModal.test.tsx b/packages/round-manager/src/features/common/__tests__/AddQuestionModal.test.tsx index 27c9990182..7cce04e136 100644 --- a/packages/round-manager/src/features/common/__tests__/AddQuestionModal.test.tsx +++ b/packages/round-manager/src/features/common/__tests__/AddQuestionModal.test.tsx @@ -17,7 +17,7 @@ const mockWallet = { }, }, chain: { - id: "1", + id: 1, name: "Ethereum", }, }; diff --git a/packages/round-manager/src/features/round/ApplicationDirectPayout.tsx b/packages/round-manager/src/features/round/ApplicationDirectPayout.tsx index 6b396ffac7..a961e2d441 100644 --- a/packages/round-manager/src/features/round/ApplicationDirectPayout.tsx +++ b/packages/round-manager/src/features/round/ApplicationDirectPayout.tsx @@ -83,7 +83,7 @@ export default function ApplicationDirectPayout({ round, application }: Props) { const [tokenInfo, setTokenInfo] = useState(tokensByChainInfo[0]); const [selectedToken, setSelectedToken] = useState( - tokenInfo.address + tokenInfo.address || "custom" ); const [customTokenInput, setCustomTokenInput] = useState(""); const [payoutTokensMap, setPayoutTokensMap] = useState< 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 733b5dfb19..ed5ac2c49c 100644 --- a/packages/round-manager/src/features/round/__tests__/ApplicationDirectPayout.test.tsx +++ b/packages/round-manager/src/features/round/__tests__/ApplicationDirectPayout.test.tsx @@ -46,6 +46,7 @@ const mockWallet = { }, chain: { name: "abc", + id: 1, }, }; const mockNetwork = { 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 2048d8d524..b748b0c3d2 100644 --- a/packages/round-manager/src/features/round/__tests__/ViewApplicationPage.test.tsx +++ b/packages/round-manager/src/features/round/__tests__/ViewApplicationPage.test.tsx @@ -67,6 +67,7 @@ const mockWallet = { }, chain: { name: "abc", + id: 1, }, };