From 37ac4535b1dfed4d5eb703af6b42997258980342 Mon Sep 17 00:00:00 2001 From: Ape Fede Date: Tue, 15 Nov 2022 12:41:10 -0300 Subject: [PATCH] chore: Changed param type --- src/widgets/Navbar/NetworkButton.tsx | 4 ++-- src/widgets/NetworkModal/SelectNetworkModal.tsx | 4 ++-- src/widgets/NetworkModal/useNetworkModal.tsx | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/widgets/Navbar/NetworkButton.tsx b/src/widgets/Navbar/NetworkButton.tsx index a51db3b0..6a4a1241 100644 --- a/src/widgets/Navbar/NetworkButton.tsx +++ b/src/widgets/Navbar/NetworkButton.tsx @@ -2,7 +2,7 @@ import React from "react"; import { ArrowDropDownIcon } from "../../components/Svg"; import { useNetworkModal, SwitchNetwork } from "../NetworkModal"; -import { ChainId, NETWORK_ICON, NETWORK_LABEL } from "../NetworkModal/config"; +import { NETWORK_ICON, NETWORK_LABEL } from "../NetworkModal/config"; import { Button } from "../../components/Button"; import { Text } from "../../components/Text"; import styles from "./styles"; @@ -11,7 +11,7 @@ export interface Props { chainId: number; switchNetwork: SwitchNetwork; t: (key: string) => string; - supportedChains?: ChainId[]; + supportedChains?: number[]; } const NetworkButton: React.FC = ({ chainId, switchNetwork, t, supportedChains }) => { diff --git a/src/widgets/NetworkModal/SelectNetworkModal.tsx b/src/widgets/NetworkModal/SelectNetworkModal.tsx index 9c25a960..e26d534d 100644 --- a/src/widgets/NetworkModal/SelectNetworkModal.tsx +++ b/src/widgets/NetworkModal/SelectNetworkModal.tsx @@ -3,7 +3,7 @@ import { partition } from "lodash"; import { Modal, ModalHeader } from "../Modal"; import { SwitchNetwork } from "./types"; import { Heading } from "../../components/Heading"; -import networks, { ChainId } from "./config"; +import networks from "./config"; import NetworkCard from "./NetworkCard"; import { Svg } from "../../components/Svg"; import { Flex } from "../../components/Flex"; @@ -14,7 +14,7 @@ export interface Props { chainId: number; t: (key: string) => string; onDismiss?: () => void; - supportedChains?: ChainId[]; + supportedChains?: number[]; } const SelectNetworkModal: React.FC = ({ switchNetwork, chainId, t, onDismiss, supportedChains }) => { diff --git a/src/widgets/NetworkModal/useNetworkModal.tsx b/src/widgets/NetworkModal/useNetworkModal.tsx index 58c70ee9..49d3472a 100644 --- a/src/widgets/NetworkModal/useNetworkModal.tsx +++ b/src/widgets/NetworkModal/useNetworkModal.tsx @@ -2,7 +2,6 @@ import React from "react"; import { useModal } from "../Modal"; import { SwitchNetwork } from "./types"; import SelectNetworkModal from "./SelectNetworkModal"; -import { ChainId } from "./config"; interface ReturnType { onPresentNetworkModal: () => void; @@ -12,7 +11,7 @@ const useNetworkModal = ( switchNetwork: SwitchNetwork, chainId: number, t: (key: string) => string, - supportedChains?: ChainId[] + supportedChains?: number[] ): ReturnType => { const [onPresentNetworkModal] = useModal( ,