From 08a1d6d9620a0c5d17671e6595a6e4390467f46b Mon Sep 17 00:00:00 2001 From: denis6421 Date: Sun, 27 Aug 2023 16:01:43 +0300 Subject: [PATCH] imports fix --- packages/dapp-example/src/Components.tsx | 12 ++---------- packages/pangolin/src/index.tsx | 3 +-- packages/pangolin/src/styles.ts | 4 ++-- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/packages/dapp-example/src/Components.tsx b/packages/dapp-example/src/Components.tsx index 2212987f..5d6054a6 100644 --- a/packages/dapp-example/src/Components.tsx +++ b/packages/dapp-example/src/Components.tsx @@ -31,7 +31,7 @@ import { eqIgnoreCase } from "@defi.org/web3-candies"; import { BsFillSunFill, BsFillMoonFill } from "react-icons/bs"; import { dapps } from "./config"; import { Status } from "./Status"; -import { useBalance, useDebounce, useDisconnectWallet, useNetwork, useSelectedDapp, useTheme } from "./hooks"; +import { useBalance, useDebounce, useDisconnectWallet, useSelectedDapp, useTheme } from "./hooks"; import { FixedSizeList as List } from "react-window"; import AutoSizer from "react-virtualized-auto-sizer"; import { TokenData } from "@orbs-network/twap"; @@ -39,7 +39,6 @@ import { SelectorOption, TokenListItem } from "./types"; import _ from "lodash"; import { useNavigate } from "react-router-dom"; import { network } from "@defi.org/web3-candies"; -import { useFormatNumber } from "@orbs-network/twap-ui/dist/hooks"; const FAVICON = "https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/64.png"; @@ -209,7 +208,7 @@ const Row = (props: any) => { const item: TokenListItem = data.tokens[index]; const { balance, isLoading } = useBalance(item.token); - const formattedValue = useFormatNumber({ value: balance, decimalScale: 6 }); + const formattedValue = hooks.useFormatNumber({ value: balance, decimalScale: 6 }); if (!item) return null; return ( @@ -276,19 +275,12 @@ export const TokensList = ({ tokens = [], onClick }: TokensListProps) => { ); }; -interface UIOption { - title: string; - component?: ReactNode; -} - export const UISelector = ({ - options, className = "", select, limit, selected, }: { - options?: UIOption[]; className?: string; select?: (value: SelectorOption) => void; limit?: boolean; diff --git a/packages/pangolin/src/index.tsx b/packages/pangolin/src/index.tsx index 7fc4353b..e10c931c 100644 --- a/packages/pangolin/src/index.tsx +++ b/packages/pangolin/src/index.tsx @@ -7,7 +7,6 @@ import React from "react"; import { ThemeProvider, createTheme } from "@mui/material/styles"; import { ThemeProvider as Emotion10ThemeProvider } from "@emotion/react"; import { AiOutlineHistory } from "react-icons/ai"; -import { useFormatNumber } from "@orbs-network/twap-ui/dist/hooks"; import { TokenData, Configs } from "@orbs-network/twap"; import Web3 from "web3"; import { configureStyles } from "./styles"; @@ -278,7 +277,7 @@ const TokenPanel = ({ isSrcToken }: { isSrcToken?: boolean }) => { const [tokenListOpen, setTokenListOpen] = useState(false); const translations = useTwapContext().translations; const marketPrice = hooks.useMarketPrice().marketPrice; - const formattedMarketPrice = useFormatNumber({ value: marketPrice }); + const formattedMarketPrice = hooks.useFormatNumber({ value: marketPrice }); const onClose = useCallback(() => { setTokenListOpen(false); diff --git a/packages/pangolin/src/styles.ts b/packages/pangolin/src/styles.ts index 9f2e55d6..6860dd90 100644 --- a/packages/pangolin/src/styles.ts +++ b/packages/pangolin/src/styles.ts @@ -9,7 +9,7 @@ interface PangolinStyles extends StylesConfig { } export const StyledOrdersContainer = styled(Components.Base.SwipeContainer)({ - zIndex: 99 + zIndex: 99, }); const parseTheme = (theme: any): PangolinStyles => { @@ -401,7 +401,7 @@ export const configureStyles = (theme: any) => { color: `black!important`, fontWeight: 500, minHeight: "unset", - border:'unset' + border: "unset", }, ".twap-button-disabled": { background: "rgb(229, 229, 229)",