Commit 53da48b6 authored by Moody Salem's avatar Moody Salem Committed by GitHub

refactor: add an import sorting plugin (#2417)

* refactor: add an import sorting plugin

* Fix code style issues with ESLint
Co-authored-by: default avatarLint Action <lint-action@samuelmeuli.com>
parent 19c39833
...@@ -21,7 +21,10 @@ ...@@ -21,7 +21,10 @@
"prettier/@typescript-eslint", "prettier/@typescript-eslint",
"plugin:prettier/recommended" "plugin:prettier/recommended"
], ],
"plugins": ["simple-import-sort"],
"rules": { "rules": {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/explicit-function-return-type": "off",
"prettier/prettier": "error", "prettier/prettier": "error",
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
......
import { CyHttpMessages } from 'cypress/types/net-stubbing' import { CyHttpMessages } from 'cypress/types/net-stubbing'
import { aliasQuery, hasQuery } from '../utils/graphql-test-utils' import { aliasQuery, hasQuery } from '../utils/graphql-test-utils'
describe('Add Liquidity', () => { describe('Add Liquidity', () => {
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
// https://on.cypress.io/custom-commands // https://on.cypress.io/custom-commands
// *********************************************** // ***********************************************
import { Eip1193Bridge } from '@ethersproject/experimental/lib/eip1193-bridge'
import { JsonRpcProvider } from '@ethersproject/providers' import { JsonRpcProvider } from '@ethersproject/providers'
import { Wallet } from '@ethersproject/wallet' import { Wallet } from '@ethersproject/wallet'
import { Eip1193Bridge } from '@ethersproject/experimental/lib/eip1193-bridge'
// todo: figure out how env vars actually work in CI // todo: figure out how env vars actually work in CI
// const TEST_PRIVATE_KEY = Cypress.env('INTEGRATION_TEST_PRIVATE_KEY') // const TEST_PRIVATE_KEY = Cypress.env('INTEGRATION_TEST_PRIVATE_KEY')
......
import { Trans } from '@lingui/macro'
import React from 'react' import React from 'react'
import { CheckCircle, Copy } from 'react-feather'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import useCopyClipboard from '../../hooks/useCopyClipboard'
import useCopyClipboard from '../../hooks/useCopyClipboard'
import { LinkStyledButton } from '../../theme' import { LinkStyledButton } from '../../theme'
import { CheckCircle, Copy } from 'react-feather'
import { Trans } from '@lingui/macro'
const CopyIcon = styled(LinkStyledButton)` const CopyIcon = styled(LinkStyledButton)`
color: ${({ theme }) => theme.text3}; color: ${({ theme }) => theme.text3};
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Fraction, TradeType } from '@uniswap/sdk-core' import { Fraction, TradeType } from '@uniswap/sdk-core'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { useCurrency, useToken } from '../../hooks/Tokens' import { useCurrency, useToken } from '../../hooks/Tokens'
import useENSName from '../../hooks/useENSName' import useENSName from '../../hooks/useENSName'
import { VoteOption } from '../../state/governance/types' import { VoteOption } from '../../state/governance/types'
......
import { Trans } from '@lingui/macro'
import { useCallback, useContext } from 'react' import { useCallback, useContext } from 'react'
import { ExternalLink as LinkIcon } from 'react-feather'
import { useAppDispatch } from 'state/hooks'
import styled, { ThemeContext } from 'styled-components/macro' import styled, { ThemeContext } from 'styled-components/macro'
import CoinbaseWalletIcon from '../../assets/images/coinbaseWalletIcon.svg'
import FortmaticIcon from '../../assets/images/fortmaticIcon.png'
import PortisIcon from '../../assets/images/portisIcon.png'
import WalletConnectIcon from '../../assets/images/walletConnectIcon.svg'
import { ReactComponent as Close } from '../../assets/images/x.svg'
import { fortmatic, injected, portis, walletconnect, walletlink } from '../../connectors'
import { SUPPORTED_WALLETS } from '../../constants/wallet' import { SUPPORTED_WALLETS } from '../../constants/wallet'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { clearAllTransactions } from '../../state/transactions/actions' import { clearAllTransactions } from '../../state/transactions/actions'
import { ExternalLink, LinkStyledButton, TYPE } from '../../theme'
import { shortenAddress } from '../../utils' import { shortenAddress } from '../../utils'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink' import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { ButtonSecondary } from '../Button'
import Identicon from '../Identicon'
import { AutoRow } from '../Row' import { AutoRow } from '../Row'
import Copy from './Copy' import Copy from './Copy'
import Transaction from './Transaction' import Transaction from './Transaction'
import { ReactComponent as Close } from '../../assets/images/x.svg'
import { injected, walletconnect, walletlink, fortmatic, portis } from '../../connectors'
import CoinbaseWalletIcon from '../../assets/images/coinbaseWalletIcon.svg'
import WalletConnectIcon from '../../assets/images/walletConnectIcon.svg'
import FortmaticIcon from '../../assets/images/fortmaticIcon.png'
import PortisIcon from '../../assets/images/portisIcon.png'
import Identicon from '../Identicon'
import { ButtonSecondary } from '../Button'
import { ExternalLink as LinkIcon } from 'react-feather'
import { ExternalLink, LinkStyledButton, TYPE } from '../../theme'
import { Trans } from '@lingui/macro'
import { useAppDispatch } from 'state/hooks'
const HeaderRow = styled.div` const HeaderRow = styled.div`
${({ theme }) => theme.flexRowNoWrap}; ${({ theme }) => theme.flexRowNoWrap};
padding: 1rem 1rem; padding: 1rem 1rem;
......
import { t, Trans } from '@lingui/macro' import { t, Trans } from '@lingui/macro'
import { useContext, useCallback, ReactNode } from 'react' import { ReactNode, useCallback, useContext } from 'react'
import styled, { ThemeContext } from 'styled-components/macro' import styled, { ThemeContext } from 'styled-components/macro'
import useENS from '../../hooks/useENS' import useENS from '../../hooks/useENS'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { ExternalLink, TYPE } from '../../theme' import { ExternalLink, TYPE } from '../../theme'
......
import { Trans } from '@lingui/macro'
import Badge, { BadgeVariant } from 'components/Badge' import Badge, { BadgeVariant } from 'components/Badge'
import { AlertCircle } from 'react-feather'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { MouseoverTooltip } from '../../components/Tooltip' import { MouseoverTooltip } from '../../components/Tooltip'
import { Trans } from '@lingui/macro'
import { AlertCircle } from 'react-feather'
const BadgeWrapper = styled.div` const BadgeWrapper = styled.div`
font-size: 14px; font-size: 14px;
......
import { Trans } from '@lingui/macro'
import { ReactNode, useMemo } from 'react' import { ReactNode, useMemo } from 'react'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { Trans } from '@lingui/macro'
// SDN OFAC addresses // SDN OFAC addresses
const BLOCKED_ADDRESSES: string[] = [ const BLOCKED_ADDRESSES: string[] = [
......
import styled from 'styled-components/macro' import useTheme from 'hooks/useTheme'
import { darken } from 'polished' import { darken } from 'polished'
import { Check, ChevronDown } from 'react-feather'
import { Button as RebassButton, ButtonProps as ButtonPropsOriginal } from 'rebass/styled-components'
import styled from 'styled-components/macro'
import { RowBetween } from '../Row' import { RowBetween } from '../Row'
import { ChevronDown, Check } from 'react-feather'
import { Button as RebassButton, ButtonProps as ButtonPropsOriginal } from 'rebass/styled-components'
import useTheme from 'hooks/useTheme'
type ButtonProps = Omit<ButtonPropsOriginal, 'css'> type ButtonProps = Omit<ButtonPropsOriginal, 'css'>
......
import styled from 'styled-components/macro'
import { Box } from 'rebass/styled-components' import { Box } from 'rebass/styled-components'
import styled from 'styled-components/macro'
const Card = styled(Box)<{ width?: string; padding?: string; border?: string; $borderRadius?: string }>` const Card = styled(Box)<{ width?: string; padding?: string; border?: string; $borderRadius?: string }>`
width: ${({ width }) => width ?? '100%'}; width: ${({ width }) => width ?? '100%'};
......
import ReactConfetti from 'react-confetti' import ReactConfetti from 'react-confetti'
import { useWindowSize } from '../../hooks/useWindowSize' import { useWindowSize } from '../../hooks/useWindowSize'
// eslint-disable-next-line react/prop-types // eslint-disable-next-line react/prop-types
......
import { Trans } from '@lingui/macro'
import { Currency, CurrencyAmount, Percent } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Percent } from '@uniswap/sdk-core'
import HoverInlineText from 'components/HoverInlineText'
import { useMemo } from 'react' import { useMemo } from 'react'
import useTheme from '../../hooks/useTheme' import useTheme from '../../hooks/useTheme'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { warningSeverity } from '../../utils/prices' import { warningSeverity } from '../../utils/prices'
import HoverInlineText from 'components/HoverInlineText'
import { Trans } from '@lingui/macro'
export function FiatValue({ export function FiatValue({
fiatValue, fiatValue,
......
...@@ -2,12 +2,13 @@ import { Trans } from '@lingui/macro' ...@@ -2,12 +2,13 @@ import { Trans } from '@lingui/macro'
import { Currency, CurrencyAmount, Percent, Token } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Percent, Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk' import { Pair } from '@uniswap/v2-sdk'
import { AutoColumn } from 'components/Column' import { AutoColumn } from 'components/Column'
import { loadingOpacityMixin, LoadingOpacityContainer } from 'components/Loader/styled' import { LoadingOpacityContainer, loadingOpacityMixin } from 'components/Loader/styled'
import { darken } from 'polished' import { darken } from 'polished'
import { ReactNode, useCallback, useState } from 'react' import { ReactNode, useCallback, useState } from 'react'
import { Lock } from 'react-feather' import { Lock } from 'react-feather'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { formatCurrencyAmount } from 'utils/formatCurrencyAmount' import { formatCurrencyAmount } from 'utils/formatCurrencyAmount'
import { ReactComponent as DropDown } from '../../assets/images/dropdown.svg' import { ReactComponent as DropDown } from '../../assets/images/dropdown.svg'
import useTheme from '../../hooks/useTheme' import useTheme from '../../hooks/useTheme'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
......
import { Currency } from '@uniswap/sdk-core' import { Currency } from '@uniswap/sdk-core'
import React, { useMemo } from 'react' import React, { useMemo } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import EthereumLogo from '../../assets/images/ethereum-logo.png' import EthereumLogo from '../../assets/images/ethereum-logo.png'
import useHttpLocations from '../../hooks/useHttpLocations' import useHttpLocations from '../../hooks/useHttpLocations'
import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo' import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo'
......
import { Currency } from '@uniswap/sdk-core' import { Currency } from '@uniswap/sdk-core'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import CurrencyLogo from '../CurrencyLogo' import CurrencyLogo from '../CurrencyLogo'
const Wrapper = styled.div<{ margin: boolean; sizeraw: number }>` const Wrapper = styled.div<{ margin: boolean; sizeraw: number }>`
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import React, { ErrorInfo } from 'react' import React, { ErrorInfo } from 'react'
import ReactGA from 'react-ga'
import styled from 'styled-components/macro'
import store, { AppState } from '../../state' import store, { AppState } from '../../state'
import { ExternalLink, TYPE } from '../../theme' import { ExternalLink, TYPE } from '../../theme'
import { AutoColumn } from '../Column'
import styled from 'styled-components/macro'
import ReactGA from 'react-ga'
import { getUserAgent } from '../../utils/getUserAgent' import { getUserAgent } from '../../utils/getUserAgent'
import { AutoColumn } from '../Column'
import { AutoRow } from '../Row' import { AutoRow } from '../Row'
const FallbackWrapper = styled.div` const FallbackWrapper = styled.div`
......
import React, { useCallback, useEffect, useRef, useState } from 'react'
import { FeeAmount } from '@uniswap/v3-sdk'
import { Currency } from '@uniswap/sdk-core'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { AutoColumn } from 'components/Column' import { Currency } from '@uniswap/sdk-core'
import { DynamicSection } from 'pages/AddLiquidity/styled' import { FeeAmount } from '@uniswap/v3-sdk'
import { TYPE } from 'theme'
import { RowBetween } from 'components/Row'
import { ButtonGray, ButtonRadioChecked } from 'components/Button'
import styled, { keyframes } from 'styled-components/macro'
import Badge from 'components/Badge' import Badge from 'components/Badge'
import { ButtonGray, ButtonRadioChecked } from 'components/Button'
import Card from 'components/Card' import Card from 'components/Card'
import usePrevious from 'hooks/usePrevious' import { AutoColumn } from 'components/Column'
import { RowBetween } from 'components/Row'
import { useFeeTierDistribution } from 'hooks/useFeeTierDistribution' import { useFeeTierDistribution } from 'hooks/useFeeTierDistribution'
import usePrevious from 'hooks/usePrevious'
import { DynamicSection } from 'pages/AddLiquidity/styled'
import React, { useCallback, useEffect, useRef, useState } from 'react'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
import { Box } from 'rebass' import { Box } from 'rebass'
import styled, { keyframes } from 'styled-components/macro'
import { TYPE } from 'theme'
const pulse = (color: string) => keyframes` const pulse = (color: string) => keyframes`
0% { 0% {
......
import JSBI from 'jsbi'
import { Currency, CurrencyAmount, Fraction } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Fraction } from '@uniswap/sdk-core'
import JSBI from 'jsbi'
const CURRENCY_AMOUNT_MIN = new Fraction(JSBI.BigInt(1), JSBI.BigInt(1000000)) const CURRENCY_AMOUNT_MIN = new Fraction(JSBI.BigInt(1), JSBI.BigInt(1000000))
......
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { useAppSelector } from 'state/hooks' import { useAppSelector } from 'state/hooks'
import styled, { keyframes } from 'styled-components/macro' import styled, { keyframes } from 'styled-components/macro'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { useBlockNumber } from '../../state/application/hooks' import { useBlockNumber } from '../../state/application/hooks'
import { ExternalLink, TYPE } from '../../theme' import { ExternalLink, TYPE } from '../../theme'
......
...@@ -4,6 +4,7 @@ import { CHAIN_INFO, SupportedChainId } from 'constants/chains' ...@@ -4,6 +4,7 @@ import { CHAIN_INFO, SupportedChainId } from 'constants/chains'
import { useMemo } from 'react' import { useMemo } from 'react'
import { X } from 'react-feather' import { X } from 'react-feather'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import tokenLogo from '../../assets/images/token-logo.png' import tokenLogo from '../../assets/images/token-logo.png'
import { UNI } from '../../constants/tokens' import { UNI } from '../../constants/tokens'
import { useMerkleDistributorContract } from '../../hooks/useContract' import { useMerkleDistributorContract } from '../../hooks/useContract'
......
...@@ -11,6 +11,7 @@ import { useUserHasSubmittedClaim } from 'state/transactions/hooks' ...@@ -11,6 +11,7 @@ import { useUserHasSubmittedClaim } from 'state/transactions/hooks'
import { useDarkModeManager } from 'state/user/hooks' import { useDarkModeManager } from 'state/user/hooks'
import { useETHBalances } from 'state/wallet/hooks' import { useETHBalances } from 'state/wallet/hooks'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { ReactComponent as Logo } from '../../assets/svg/logo.svg' import { ReactComponent as Logo } from '../../assets/svg/logo.svg'
import { ReactComponent as LogoDark } from '../../assets/svg/logo_white.svg' import { ReactComponent as LogoDark } from '../../assets/svg/logo_white.svg'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
......
import Davatar from '@davatar/react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import Davatar from '@davatar/react'
const StyledIdenticonContainer = styled.div` const StyledIdenticonContainer = styled.div`
height: 1rem; height: 1rem;
......
import { useState, useCallback, useEffect, ReactNode } from 'react' import { Trans } from '@lingui/macro'
import { FeeAmount } from '@uniswap/v3-sdk'
import { ButtonGray } from 'components/Button'
import { OutlineCard } from 'components/Card' import { OutlineCard } from 'components/Card'
import { Input as NumericalInput } from '../NumericalInput' import { AutoColumn } from 'components/Column'
import { ReactNode, useCallback, useEffect, useState } from 'react'
import { Minus, Plus } from 'react-feather'
import styled, { keyframes } from 'styled-components/macro' import styled, { keyframes } from 'styled-components/macro'
import { TYPE } from 'theme' import { TYPE } from 'theme'
import { AutoColumn } from 'components/Column'
import { ButtonGray } from 'components/Button' import { Input as NumericalInput } from '../NumericalInput'
import { FeeAmount } from '@uniswap/v3-sdk'
import { Trans } from '@lingui/macro'
import { Plus, Minus } from 'react-feather'
const pulse = (color: string) => keyframes` const pulse = (color: string) => keyframes`
0% { 0% {
......
import React, { useMemo } from 'react'
import { area, curveStepAfter, ScaleLinear } from 'd3' import { area, curveStepAfter, ScaleLinear } from 'd3'
import inRange from 'lodash/inRange'
import React, { useMemo } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { ChartEntry } from './types' import { ChartEntry } from './types'
import inRange from 'lodash/inRange'
const Path = styled.path<{ fill: string | undefined }>` const Path = styled.path<{ fill: string | undefined }>`
opacity: 0.5; opacity: 0.5;
......
import React, { useMemo } from 'react'
import { Axis as d3Axis, axisBottom, NumberValue, ScaleLinear, select } from 'd3' import { Axis as d3Axis, axisBottom, NumberValue, ScaleLinear, select } from 'd3'
import React, { useMemo } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
const StyledGroup = styled.g` const StyledGroup = styled.g`
......
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { BrushBehavior, brushX, D3BrushEvent, ScaleLinear, select } from 'd3'
import styled from 'styled-components/macro'
import { brushHandleAccentPath, brushHandlePath, OffScreenHandle } from 'components/LiquidityChartRangeInput/svg' import { brushHandleAccentPath, brushHandlePath, OffScreenHandle } from 'components/LiquidityChartRangeInput/svg'
import { BrushBehavior, brushX, D3BrushEvent, ScaleLinear, select } from 'd3'
import usePrevious from 'hooks/usePrevious' import usePrevious from 'hooks/usePrevious'
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import styled from 'styled-components/macro'
const Handle = styled.path<{ color: string }>` const Handle = styled.path<{ color: string }>`
cursor: ew-resize; cursor: ew-resize;
......
import { max, scaleLinear, ZoomTransform } from 'd3' import { max, scaleLinear, ZoomTransform } from 'd3'
import { useEffect, useMemo, useRef, useState } from 'react' import { useEffect, useMemo, useRef, useState } from 'react'
import { Bound } from 'state/mint/v3/actions' import { Bound } from 'state/mint/v3/actions'
import { Area } from './Area' import { Area } from './Area'
import { AxisBottom } from './AxisBottom' import { AxisBottom } from './AxisBottom'
import { Brush } from './Brush' import { Brush } from './Brush'
......
import React, { useMemo } from 'react'
import { ScaleLinear } from 'd3' import { ScaleLinear } from 'd3'
import React, { useMemo } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
const StyledLine = styled.line` const StyledLine = styled.line`
......
import React, { useEffect, useMemo, useRef } from 'react'
import { ButtonGray } from 'components/Button' import { ButtonGray } from 'components/Button'
import styled from 'styled-components/macro' import { ScaleLinear, select, zoom, ZoomBehavior, zoomIdentity, ZoomTransform } from 'd3'
import { ScaleLinear, select, ZoomBehavior, zoom, ZoomTransform, zoomIdentity } from 'd3' import React, { useEffect, useMemo, useRef } from 'react'
import { RefreshCcw, ZoomIn, ZoomOut } from 'react-feather' import { RefreshCcw, ZoomIn, ZoomOut } from 'react-feather'
import styled from 'styled-components/macro'
import { ZoomLevels } from './types' import { ZoomLevels } from './types'
const Wrapper = styled.div<{ count: number }>` const Wrapper = styled.div<{ count: number }>`
......
import { useCallback, useMemo } from 'react'
import { Currency } from '@uniswap/sdk-core' import { Currency } from '@uniswap/sdk-core'
import { FeeAmount } from '@uniswap/v3-sdk' import { FeeAmount } from '@uniswap/v3-sdk'
import { usePoolActiveLiquidity } from 'hooks/usePoolTickData' import { usePoolActiveLiquidity } from 'hooks/usePoolTickData'
import { ChartEntry } from './types'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { useCallback, useMemo } from 'react'
import { ChartEntry } from './types'
export interface TickProcessed { export interface TickProcessed {
liquidityActive: JSBI liquidityActive: JSBI
......
import React, { ReactNode, useCallback, useMemo } from 'react'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Currency, Price, Token } from '@uniswap/sdk-core' import { Currency, Price, Token } from '@uniswap/sdk-core'
import { FeeAmount } from '@uniswap/v3-sdk'
import { AutoColumn, ColumnCenter } from 'components/Column' import { AutoColumn, ColumnCenter } from 'components/Column'
import Loader from 'components/Loader' import Loader from 'components/Loader'
import { format } from 'd3'
import { useColor } from 'hooks/useColor' import { useColor } from 'hooks/useColor'
import useTheme from 'hooks/useTheme' import useTheme from 'hooks/useTheme'
import { saturate } from 'polished' import { saturate } from 'polished'
import { BarChart2, Inbox, CloudOff } from 'react-feather' import React, { ReactNode, useCallback, useMemo } from 'react'
import { BarChart2, CloudOff, Inbox } from 'react-feather'
import ReactGA from 'react-ga'
import { batch } from 'react-redux' import { batch } from 'react-redux'
import { Bound } from 'state/mint/v3/actions'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { Chart } from './Chart' import { Chart } from './Chart'
import { useDensityChartData } from './hooks' import { useDensityChartData } from './hooks'
import { format } from 'd3'
import { Bound } from 'state/mint/v3/actions'
import { FeeAmount } from '@uniswap/v3-sdk'
import ReactGA from 'react-ga'
import { ZoomLevels } from './types' import { ZoomLevels } from './types'
const ZOOM_LEVELS: Record<FeeAmount, ZoomLevels> = { const ZOOM_LEVELS: Record<FeeAmount, ZoomLevels> = {
......
import React from 'react' import React from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import useHttpLocations from '../../hooks/useHttpLocations'
import useHttpLocations from '../../hooks/useHttpLocations'
import Logo from '../Logo' import Logo from '../Logo'
const StyledListLogo = styled(Logo)<{ size: string }>` const StyledListLogo = styled(Logo)<{ size: string }>`
......
import { useState } from 'react' import { useState } from 'react'
import { Slash } from 'react-feather' import { Slash } from 'react-feather'
import { ImageProps } from 'rebass' import { ImageProps } from 'rebass'
import useTheme from '../../hooks/useTheme' import useTheme from '../../hooks/useTheme'
const BAD_SRCS: { [tokenAddress: string]: true } = {} const BAD_SRCS: { [tokenAddress: string]: true } = {}
......
import { t } from '@lingui/macro' import { t } from '@lingui/macro'
import { Trans } from '@lingui/macro'
import { CHAIN_INFO, L2_CHAIN_IDS, SupportedChainId } from 'constants/chains'
import { LOCALE_LABEL, SUPPORTED_LOCALES, SupportedLocale } from 'constants/locales'
import { useActiveLocale } from 'hooks/useActiveLocale'
import { useLocationLinkProps } from 'hooks/useLocationLinkProps'
import React, { useEffect, useRef, useState } from 'react' import React, { useEffect, useRef, useState } from 'react'
import { BookOpen, Code, Info, MessageCircle, PieChart, Moon, Sun, Globe, ChevronLeft, Check } from 'react-feather' import { BookOpen, Check, ChevronLeft, Code, Globe, Info, MessageCircle, Moon, PieChart, Sun } from 'react-feather'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { useDarkModeManager } from 'state/user/hooks'
import styled, { css } from 'styled-components/macro' import styled, { css } from 'styled-components/macro'
import { ReactComponent as MenuIcon } from '../../assets/images/menu.svg' import { ReactComponent as MenuIcon } from '../../assets/images/menu.svg'
import { useActiveWeb3React } from '../../hooks/web3'
import { useOnClickOutside } from '../../hooks/useOnClickOutside' import { useOnClickOutside } from '../../hooks/useOnClickOutside'
import { useActiveWeb3React } from '../../hooks/web3'
import { ApplicationModal } from '../../state/application/actions' import { ApplicationModal } from '../../state/application/actions'
import { useModalOpen, useToggleModal } from '../../state/application/hooks' import { useModalOpen, useToggleModal } from '../../state/application/hooks'
import { Trans } from '@lingui/macro'
import { ExternalLink } from '../../theme' import { ExternalLink } from '../../theme'
import { ButtonPrimary } from '../Button' import { ButtonPrimary } from '../Button'
import { useDarkModeManager } from 'state/user/hooks'
import { L2_CHAIN_IDS, CHAIN_INFO, SupportedChainId } from 'constants/chains'
import { LOCALE_LABEL, SupportedLocale, SUPPORTED_LOCALES } from 'constants/locales'
import { useLocationLinkProps } from 'hooks/useLocationLinkProps'
import { useActiveLocale } from 'hooks/useActiveLocale'
export enum FlyoutAlignment { export enum FlyoutAlignment {
LEFT = 'LEFT', LEFT = 'LEFT',
......
import { DialogContent, DialogOverlay } from '@reach/dialog'
import { transparentize } from 'polished'
import React from 'react' import React from 'react'
import styled, { css } from 'styled-components/macro'
import { animated, useTransition, useSpring } from 'react-spring'
import { DialogOverlay, DialogContent } from '@reach/dialog'
import { isMobile } from 'react-device-detect' import { isMobile } from 'react-device-detect'
import { transparentize } from 'polished' import { animated, useSpring, useTransition } from 'react-spring'
import { useGesture } from 'react-use-gesture' import { useGesture } from 'react-use-gesture'
import styled, { css } from 'styled-components/macro'
const AnimatedDialogOverlay = animated(DialogOverlay) const AnimatedDialogOverlay = animated(DialogOverlay)
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
......
import { Trans } from '@lingui/macro'
import { useContext } from 'react' import { useContext } from 'react'
import { useActiveWeb3React } from '../../hooks/web3'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { AutoColumn, ColumnCenter } from '../Column'
import styled, { ThemeContext } from 'styled-components/macro'
import { RowBetween } from '../Row'
import { TYPE, CloseIcon, CustomLightSpinner } from '../../theme'
import { ArrowUpCircle } from 'react-feather' import { ArrowUpCircle } from 'react-feather'
import { Trans } from '@lingui/macro' import styled, { ThemeContext } from 'styled-components/macro'
import Circle from '../../assets/images/blue-loader.svg' import Circle from '../../assets/images/blue-loader.svg'
import { useActiveWeb3React } from '../../hooks/web3'
import { CloseIcon, CustomLightSpinner, TYPE } from '../../theme'
import { ExternalLink } from '../../theme/components' import { ExternalLink } from '../../theme/components'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { AutoColumn, ColumnCenter } from '../Column'
import { RowBetween } from '../Row'
const ConfirmOrLoadingWrapper = styled.div` const ConfirmOrLoadingWrapper = styled.div`
width: 100%; width: 100%;
......
import styled from 'styled-components/macro'
import { darken } from 'polished'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { NavLink, Link as HistoryLink, useLocation } from 'react-router-dom'
import { Percent } from '@uniswap/sdk-core' import { Percent } from '@uniswap/sdk-core'
import useTheme from 'hooks/useTheme'
import { darken } from 'polished'
import { ReactNode } from 'react'
import { ArrowLeft } from 'react-feather' import { ArrowLeft } from 'react-feather'
import Row, { RowBetween } from '../Row' import { Link as HistoryLink, NavLink, useLocation } from 'react-router-dom'
import SettingsTab from '../Settings' import { Box } from 'rebass'
import { useAppDispatch } from 'state/hooks' import { useAppDispatch } from 'state/hooks'
import { resetMintState } from 'state/mint/actions' import { resetMintState } from 'state/mint/actions'
import { resetMintState as resetMintV3State } from 'state/mint/v3/actions' import { resetMintState as resetMintV3State } from 'state/mint/v3/actions'
import styled from 'styled-components/macro'
import { TYPE } from 'theme' import { TYPE } from 'theme'
import useTheme from 'hooks/useTheme'
import { ReactNode } from 'react' import Row, { RowBetween } from '../Row'
import { Box } from 'rebass' import SettingsTab from '../Settings'
const Tabs = styled.div` const Tabs = styled.div`
${({ theme }) => theme.flexRowNoWrap} ${({ theme }) => theme.flexRowNoWrap}
......
...@@ -13,6 +13,7 @@ import { useArbitrumAlphaAlert, useDarkModeManager, useOptimismAlphaAlert } from ...@@ -13,6 +13,7 @@ import { useArbitrumAlphaAlert, useDarkModeManager, useOptimismAlphaAlert } from
import { useETHBalances } from 'state/wallet/hooks' import { useETHBalances } from 'state/wallet/hooks'
import styled, { css } from 'styled-components/macro' import styled, { css } from 'styled-components/macro'
import { ExternalLink, MEDIA_WIDTHS } from 'theme' import { ExternalLink, MEDIA_WIDTHS } from 'theme'
import { CHAIN_INFO } from '../../constants/chains' import { CHAIN_INFO } from '../../constants/chains'
export const DesktopTextBreak = styled.div` export const DesktopTextBreak = styled.div`
......
import React from 'react' import React from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { escapeRegExp } from '../../utils' import { escapeRegExp } from '../../utils'
const StyledInput = styled.input<{ error?: boolean; fontSize?: string; align?: string }>` const StyledInput = styled.input<{ error?: boolean; fontSize?: string; align?: string }>`
......
...@@ -3,6 +3,7 @@ import Portal from '@reach/portal' ...@@ -3,6 +3,7 @@ import Portal from '@reach/portal'
import React, { useCallback, useMemo, useState } from 'react' import React, { useCallback, useMemo, useState } from 'react'
import { usePopper } from 'react-popper' import { usePopper } from 'react-popper'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import useInterval from '../../hooks/useInterval' import useInterval from '../../hooks/useInterval'
const PopoverContainer = styled.div<{ show: boolean }>` const PopoverContainer = styled.div<{ show: boolean }>`
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { useCallback, useEffect } from 'react' import { useCallback, useEffect } from 'react'
import ReactGA from 'react-ga'
import { Heart, X } from 'react-feather' import { Heart, X } from 'react-feather'
import ReactGA from 'react-ga'
import styled, { keyframes } from 'styled-components/macro' import styled, { keyframes } from 'styled-components/macro'
import tokenLogo from '../../assets/images/token-logo.png' import tokenLogo from '../../assets/images/token-logo.png'
import { ButtonPrimary } from '../../components/Button' import { ButtonPrimary } from '../../components/Button'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
...@@ -14,7 +15,6 @@ import { ...@@ -14,7 +15,6 @@ import {
useToggleSelfClaimModal, useToggleSelfClaimModal,
useToggleShowClaimPopup, useToggleShowClaimPopup,
} from '../../state/application/hooks' } from '../../state/application/hooks'
import { useUserHasAvailableClaim, useUserUnclaimedAmount } from '../../state/claim/hooks' import { useUserHasAvailableClaim, useUserUnclaimedAmount } from '../../state/claim/hooks'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
......
import { useCallback, useContext, useEffect } from 'react' import { useCallback, useContext, useEffect } from 'react'
import { X } from 'react-feather' import { X } from 'react-feather'
import { animated } from 'react-spring'
import { useSpring } from 'react-spring/web' import { useSpring } from 'react-spring/web'
import styled, { ThemeContext } from 'styled-components/macro' import styled, { ThemeContext } from 'styled-components/macro'
import { animated } from 'react-spring'
import { PopupContent } from '../../state/application/actions' import { PopupContent } from '../../state/application/actions'
import { useRemovePopup } from '../../state/application/hooks' import { useRemovePopup } from '../../state/application/hooks'
import TransactionPopup from './TransactionPopup' import TransactionPopup from './TransactionPopup'
......
import { useContext } from 'react' import { useContext } from 'react'
import { AlertCircle, CheckCircle } from 'react-feather' import { AlertCircle, CheckCircle } from 'react-feather'
import styled, { ThemeContext } from 'styled-components/macro' import styled, { ThemeContext } from 'styled-components/macro'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { useTransaction } from '../../state/transactions/hooks' import { useTransaction } from '../../state/transactions/hooks'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
......
import { SupportedChainId } from 'constants/chains'
import { useActiveWeb3React } from 'hooks/web3'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { MEDIA_WIDTHS } from 'theme'
import { useActivePopups } from '../../state/application/hooks' import { useActivePopups } from '../../state/application/hooks'
import { useURLWarningVisible } from '../../state/user/hooks'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
import PopupItem from './PopupItem'
import ClaimPopup from './ClaimPopup' import ClaimPopup from './ClaimPopup'
import { useURLWarningVisible } from '../../state/user/hooks' import PopupItem from './PopupItem'
import { useActiveWeb3React } from 'hooks/web3'
import { SupportedChainId } from 'constants/chains'
import { MEDIA_WIDTHS } from 'theme'
const MobilePopupWrapper = styled.div<{ height: string | number }>` const MobilePopupWrapper = styled.div<{ height: string | number }>`
position: relative; position: relative;
......
import { Trans } from '@lingui/macro'
import { Token } from '@uniswap/sdk-core' import { Token } from '@uniswap/sdk-core'
import Badge, { BadgeVariant } from 'components/Badge'
import { transparentize } from 'polished'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { Text } from 'rebass' import { Text } from 'rebass'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { Trans } from '@lingui/macro'
import { useColor } from '../../hooks/useColor'
import { unwrappedToken } from '../../utils/unwrappedToken' import { unwrappedToken } from '../../utils/unwrappedToken'
import { ButtonEmpty } from '../Button' import { ButtonEmpty } from '../Button'
import { transparentize } from 'polished'
import { CardNoise } from '../earn/styled'
import { useColor } from '../../hooks/useColor'
import { LightCard } from '../Card' import { LightCard } from '../Card'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
import DoubleCurrencyLogo from '../DoubleLogo' import DoubleCurrencyLogo from '../DoubleLogo'
import { RowFixed, AutoRow } from '../Row' import { CardNoise } from '../earn/styled'
import { AutoRow, RowFixed } from '../Row'
import { Dots } from '../swap/styleds' import { Dots } from '../swap/styleds'
import { FixedHeightRow } from '.' import { FixedHeightRow } from '.'
import Badge, { BadgeVariant } from 'components/Badge'
const StyledPositionCard = styled(LightCard)<{ bgColor: any }>` const StyledPositionCard = styled(LightCard)<{ bgColor: any }>`
border: none; border: none;
......
import { Trans } from '@lingui/macro'
import { CurrencyAmount, Percent, Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { transparentize } from 'polished'
import { useState } from 'react' import { useState } from 'react'
import { Percent, CurrencyAmount, Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk'
import { ChevronDown, ChevronUp } from 'react-feather' import { ChevronDown, ChevronUp } from 'react-feather'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { Text } from 'rebass' import { Text } from 'rebass'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { useTotalSupply } from '../../hooks/useTotalSupply'
import { Trans } from '@lingui/macro'
import { BIG_INT_ZERO } from '../../constants/misc'
import { useColor } from '../../hooks/useColor'
import { useTotalSupply } from '../../hooks/useTotalSupply'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { useTokenBalance } from '../../state/wallet/hooks' import { useTokenBalance } from '../../state/wallet/hooks'
import { currencyId } from '../../utils/currencyId' import { currencyId } from '../../utils/currencyId'
import { unwrappedToken } from '../../utils/unwrappedToken' import { unwrappedToken } from '../../utils/unwrappedToken'
import { ButtonPrimary, ButtonSecondary, ButtonEmpty } from '../Button' import { ButtonEmpty, ButtonPrimary, ButtonSecondary } from '../Button'
import { transparentize } from 'polished'
import { CardNoise } from '../earn/styled'
import { useColor } from '../../hooks/useColor'
import { LightCard } from '../Card' import { LightCard } from '../Card'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
import CurrencyLogo from '../CurrencyLogo' import CurrencyLogo from '../CurrencyLogo'
import DoubleCurrencyLogo from '../DoubleLogo' import DoubleCurrencyLogo from '../DoubleLogo'
import { RowBetween, RowFixed, AutoRow } from '../Row' import { CardNoise } from '../earn/styled'
import { AutoRow, RowBetween, RowFixed } from '../Row'
import { Dots } from '../swap/styleds' import { Dots } from '../swap/styleds'
import { BIG_INT_ZERO } from '../../constants/misc'
import { FixedHeightRow } from '.' import { FixedHeightRow } from '.'
const StyledPositionCard = styled(LightCard)<{ bgColor: any }>` const StyledPositionCard = styled(LightCard)<{ bgColor: any }>`
......
import JSBI from 'jsbi' import { Trans } from '@lingui/macro'
import { Percent, CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Percent, Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk' import { Pair } from '@uniswap/v2-sdk'
import JSBI from 'jsbi'
import { transparentize } from 'polished'
import { useState } from 'react' import { useState } from 'react'
import { ChevronDown, ChevronUp } from 'react-feather' import { ChevronDown, ChevronUp } from 'react-feather'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { Text } from 'rebass' import { Text } from 'rebass'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { useTotalSupply } from '../../hooks/useTotalSupply'
import { Trans } from '@lingui/macro'
import { BIG_INT_ZERO } from '../../constants/misc'
import { useColor } from '../../hooks/useColor'
import { useTotalSupply } from '../../hooks/useTotalSupply'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { useTokenBalance } from '../../state/wallet/hooks' import { useTokenBalance } from '../../state/wallet/hooks'
import { ExternalLink, TYPE } from '../../theme' import { ExternalLink, TYPE } from '../../theme'
import { currencyId } from '../../utils/currencyId' import { currencyId } from '../../utils/currencyId'
import { unwrappedToken } from '../../utils/unwrappedToken' import { unwrappedToken } from '../../utils/unwrappedToken'
import { ButtonPrimary, ButtonSecondary, ButtonEmpty } from '../Button' import { ButtonEmpty, ButtonPrimary, ButtonSecondary } from '../Button'
import { transparentize } from 'polished'
import { CardNoise } from '../earn/styled'
import { useColor } from '../../hooks/useColor'
import { GreyCard, LightCard } from '../Card' import { GreyCard, LightCard } from '../Card'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
import CurrencyLogo from '../CurrencyLogo' import CurrencyLogo from '../CurrencyLogo'
import DoubleCurrencyLogo from '../DoubleLogo' import DoubleCurrencyLogo from '../DoubleLogo'
import { RowBetween, RowFixed, AutoRow } from '../Row' import { CardNoise } from '../earn/styled'
import { AutoRow, RowBetween, RowFixed } from '../Row'
import { Dots } from '../swap/styleds' import { Dots } from '../swap/styleds'
import { BIG_INT_ZERO } from '../../constants/misc'
export const FixedHeightRow = styled(RowBetween)` export const FixedHeightRow = styled(RowBetween)`
height: 24px; height: 24px;
......
import { Trans } from '@lingui/macro'
import PositionListItem from 'components/PositionListItem' import PositionListItem from 'components/PositionListItem'
import React from 'react' import React from 'react'
import { Trans } from '@lingui/macro'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { MEDIA_WIDTHS } from 'theme' import { MEDIA_WIDTHS } from 'theme'
import { PositionDetails } from 'types/position' import { PositionDetails } from 'types/position'
......
import { useMemo } from 'react' import { Trans } from '@lingui/macro'
import { Percent, Price, Token } from '@uniswap/sdk-core'
import { Position } from '@uniswap/v3-sdk' import { Position } from '@uniswap/v3-sdk'
import Badge from 'components/Badge' import Badge from 'components/Badge'
import RangeBadge from 'components/Badge/RangeBadge'
import DoubleCurrencyLogo from 'components/DoubleLogo' import DoubleCurrencyLogo from 'components/DoubleLogo'
import { usePool } from 'hooks/usePools' import HoverInlineText from 'components/HoverInlineText'
import Loader from 'components/Loader'
import { RowBetween } from 'components/Row'
import { useToken } from 'hooks/Tokens' import { useToken } from 'hooks/Tokens'
import useIsTickAtLimit from 'hooks/useIsTickAtLimit'
import { usePool } from 'hooks/usePools'
import { useMemo } from 'react'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { Bound } from 'state/mint/v3/actions'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { HideSmall, MEDIA_WIDTHS, SmallOnly } from 'theme' import { HideSmall, MEDIA_WIDTHS, SmallOnly } from 'theme'
import { PositionDetails } from 'types/position' import { PositionDetails } from 'types/position'
import { Price, Token, Percent } from '@uniswap/sdk-core'
import { formatTickPrice } from 'utils/formatTickPrice' import { formatTickPrice } from 'utils/formatTickPrice'
import Loader from 'components/Loader'
import { unwrappedToken } from 'utils/unwrappedToken' import { unwrappedToken } from 'utils/unwrappedToken'
import RangeBadge from 'components/Badge/RangeBadge'
import { RowBetween } from 'components/Row'
import HoverInlineText from 'components/HoverInlineText'
import { DAI, USDC, USDT, WBTC, WETH9_EXTENDED } from '../../constants/tokens' import { DAI, USDC, USDT, WBTC, WETH9_EXTENDED } from '../../constants/tokens'
import { Trans } from '@lingui/macro'
import useIsTickAtLimit from 'hooks/useIsTickAtLimit'
import { Bound } from 'state/mint/v3/actions'
const LinkRow = styled(Link)` const LinkRow = styled(Link)`
align-items: center; align-items: center;
......
import { useState, useCallback, useContext, ReactNode } from 'react' import { Trans } from '@lingui/macro'
import { Currency } from '@uniswap/sdk-core'
import { Position } from '@uniswap/v3-sdk' import { Position } from '@uniswap/v3-sdk'
import RangeBadge from 'components/Badge/RangeBadge'
import { LightCard } from 'components/Card' import { LightCard } from 'components/Card'
import { AutoColumn } from 'components/Column' import { AutoColumn } from 'components/Column'
import { TYPE } from 'theme'
import { RowBetween, RowFixed } from 'components/Row'
import CurrencyLogo from 'components/CurrencyLogo' import CurrencyLogo from 'components/CurrencyLogo'
import { unwrappedToken } from 'utils/unwrappedToken' import DoubleCurrencyLogo from 'components/DoubleLogo'
import { Break } from 'components/earn/styled' import { Break } from 'components/earn/styled'
import { Trans } from '@lingui/macro'
import { Currency } from '@uniswap/sdk-core'
import RateToggle from 'components/RateToggle' import RateToggle from 'components/RateToggle'
import DoubleCurrencyLogo from 'components/DoubleLogo' import { RowBetween, RowFixed } from 'components/Row'
import RangeBadge from 'components/Badge/RangeBadge'
import { ThemeContext } from 'styled-components/macro'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { ReactNode, useCallback, useContext, useState } from 'react'
import { Bound } from 'state/mint/v3/actions' import { Bound } from 'state/mint/v3/actions'
import { ThemeContext } from 'styled-components/macro'
import { TYPE } from 'theme'
import { formatTickPrice } from 'utils/formatTickPrice' import { formatTickPrice } from 'utils/formatTickPrice'
import { unwrappedToken } from 'utils/unwrappedToken'
export const PositionPreview = ({ export const PositionPreview = ({
position, position,
......
import { useContext } from 'react' import { useContext } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { AutoColumn } from '../Column'
import { ThemeContext } from 'styled-components/macro' import { ThemeContext } from 'styled-components/macro'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { AutoColumn } from '../Column'
const Wrapper = styled(AutoColumn)` const Wrapper = styled(AutoColumn)`
margin-right: 8px; margin-right: 8px;
......
import { ReactNode, useCallback, useState } from 'react' import { ReactNode, useCallback, useState } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import Tooltip from '../Tooltip' import Tooltip from '../Tooltip'
const QuestionWrapper = styled.div` const QuestionWrapper = styled.div`
......
import React from 'react' import { Trans } from '@lingui/macro'
import { ButtonOutlined } from 'components/Button' import { ButtonOutlined } from 'components/Button'
import { AutoRow } from 'components/Row' import { AutoRow } from 'components/Row'
import { TYPE } from 'theme' import React from 'react'
import styled from 'styled-components/macro'
import { Trans } from '@lingui/macro'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
import styled from 'styled-components/macro'
import { TYPE } from 'theme'
const Button = styled(ButtonOutlined).attrs(() => ({ const Button = styled(ButtonOutlined).attrs(() => ({
padding: '8px', padding: '8px',
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Currency, Price, Token } from '@uniswap/sdk-core' import { Currency, Price, Token } from '@uniswap/sdk-core'
import { AutoColumn } from 'components/Column'
import StepCounter from 'components/InputStepCounter/InputStepCounter' import StepCounter from 'components/InputStepCounter/InputStepCounter'
import { RowBetween } from 'components/Row' import { RowBetween } from 'components/Row'
import { AutoColumn } from 'components/Column'
import { Bound } from 'state/mint/v3/actions' import { Bound } from 'state/mint/v3/actions'
// currencyA is the base token // currencyA is the base token
......
...@@ -2,6 +2,7 @@ import { Currency, Percent } from '@uniswap/sdk-core' ...@@ -2,6 +2,7 @@ import { Currency, Percent } from '@uniswap/sdk-core'
import { FeeAmount } from '@uniswap/v3-sdk' import { FeeAmount } from '@uniswap/v3-sdk'
import { DAI, USDC, WBTC } from 'constants/tokens' import { DAI, USDC, WBTC } from 'constants/tokens'
import { render } from 'test-utils' import { render } from 'test-utils'
import RoutingDiagram, { RoutingDiagramEntry } from './RoutingDiagram' import RoutingDiagram, { RoutingDiagramEntry } from './RoutingDiagram'
const percent = (strings: TemplateStringsArray) => new Percent(parseInt(strings[0]), 100) const percent = (strings: TemplateStringsArray) => new Percent(parseInt(strings[0]), 100)
......
import styled from 'styled-components/macro'
import { Box } from 'rebass/styled-components' import { Box } from 'rebass/styled-components'
import styled from 'styled-components/macro'
const Row = styled(Box)<{ const Row = styled(Box)<{
width?: string width?: string
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Text } from 'rebass'
import { Currency } from '@uniswap/sdk-core' import { Currency } from '@uniswap/sdk-core'
import { Text } from 'rebass'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { COMMON_BASES } from '../../constants/routing' import { COMMON_BASES } from '../../constants/routing'
import { currencyId } from '../../utils/currencyId' import { currencyId } from '../../utils/currencyId'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
import CurrencyLogo from '../CurrencyLogo'
import QuestionHelper from '../QuestionHelper' import QuestionHelper from '../QuestionHelper'
import { AutoRow } from '../Row' import { AutoRow } from '../Row'
import CurrencyLogo from '../CurrencyLogo'
const MobileWrapper = styled(AutoColumn)` const MobileWrapper = styled(AutoColumn)`
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.mediaWidth.upToSmall`
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core'
import { LightGreyCard } from 'components/Card'
import QuestionHelper from 'components/QuestionHelper'
import useTheme from 'hooks/useTheme'
import { CSSProperties, MutableRefObject, useCallback, useMemo } from 'react' import { CSSProperties, MutableRefObject, useCallback, useMemo } from 'react'
import { FixedSizeList } from 'react-window' import { FixedSizeList } from 'react-window'
import { Text } from 'rebass' import { Text } from 'rebass'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import TokenListLogo from '../../assets/svg/tokenlist.svg'
import { useIsUserAddedToken } from '../../hooks/Tokens'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { useCombinedActiveList } from '../../state/lists/hooks' import { useCombinedActiveList } from '../../state/lists/hooks'
import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo' import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo'
import { useCurrencyBalance } from '../../state/wallet/hooks' import { useCurrencyBalance } from '../../state/wallet/hooks'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { useIsUserAddedToken } from '../../hooks/Tokens' import { isTokenOnList } from '../../utils'
import Column from '../Column' import Column from '../Column'
import { RowFixed, RowBetween } from '../Row'
import CurrencyLogo from '../CurrencyLogo' import CurrencyLogo from '../CurrencyLogo'
import { MouseoverTooltip } from '../Tooltip'
import { MenuItem } from './styleds'
import Loader from '../Loader' import Loader from '../Loader'
import { isTokenOnList } from '../../utils' import { RowBetween, RowFixed } from '../Row'
import { MouseoverTooltip } from '../Tooltip'
import ImportRow from './ImportRow' import ImportRow from './ImportRow'
import { LightGreyCard } from 'components/Card' import { MenuItem } from './styleds'
import TokenListLogo from '../../assets/svg/tokenlist.svg'
import QuestionHelper from 'components/QuestionHelper'
import useTheme from 'hooks/useTheme'
function currencyKey(currency: Currency): string { function currencyKey(currency: Currency): string {
return currency.isToken ? currency.address : 'ETHER' return currency.isToken ? currency.address : 'ETHER'
......
import { t, Trans } from '@lingui/macro'
import { Currency, Token } from '@uniswap/sdk-core' import { Currency, Token } from '@uniswap/sdk-core'
import useDebounce from 'hooks/useDebounce'
import { useOnClickOutside } from 'hooks/useOnClickOutside'
import useTheme from 'hooks/useTheme'
import useToggle from 'hooks/useToggle'
import { KeyboardEvent, RefObject, useCallback, useEffect, useMemo, useRef, useState } from 'react' import { KeyboardEvent, RefObject, useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { Edit } from 'react-feather'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
import { t, Trans } from '@lingui/macro' import AutoSizer from 'react-virtualized-auto-sizer'
import { FixedSizeList } from 'react-window' import { FixedSizeList } from 'react-window'
import { Text } from 'rebass' import { Text } from 'rebass'
import styled from 'styled-components/macro'
import { ExtendedEther } from '../../constants/tokens' import { ExtendedEther } from '../../constants/tokens'
import { useAllTokens, useIsUserAddedToken, useSearchInactiveTokenLists, useToken } from '../../hooks/Tokens'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { useAllTokens, useToken, useIsUserAddedToken, useSearchInactiveTokenLists } from '../../hooks/Tokens' import { ButtonText, CloseIcon, IconWrapper, TYPE } from '../../theme'
import { CloseIcon, TYPE, ButtonText, IconWrapper } from '../../theme'
import { isAddress } from '../../utils' import { isAddress } from '../../utils'
import Column from '../Column' import Column from '../Column'
import Row, { RowBetween, RowFixed } from '../Row' import Row, { RowBetween, RowFixed } from '../Row'
import CommonBases from './CommonBases' import CommonBases from './CommonBases'
import CurrencyList from './CurrencyList' import CurrencyList from './CurrencyList'
import { filterTokens, useSortedTokensByQuery } from './filtering' import { filterTokens, useSortedTokensByQuery } from './filtering'
import ImportRow from './ImportRow'
import { useTokenComparator } from './sorting' import { useTokenComparator } from './sorting'
import { PaddedColumn, SearchInput, Separator } from './styleds' import { PaddedColumn, SearchInput, Separator } from './styleds'
import AutoSizer from 'react-virtualized-auto-sizer'
import styled from 'styled-components/macro'
import useToggle from 'hooks/useToggle'
import { useOnClickOutside } from 'hooks/useOnClickOutside'
import useTheme from 'hooks/useTheme'
import ImportRow from './ImportRow'
import { Edit } from 'react-feather'
import useDebounce from 'hooks/useDebounce'
const ContentWrapper = styled(Column)` const ContentWrapper = styled(Column)`
width: 100%; width: 100%;
......
import { Currency, Token } from '@uniswap/sdk-core' import { Currency, Token } from '@uniswap/sdk-core'
import { TokenList } from '@uniswap/token-lists'
import usePrevious from 'hooks/usePrevious'
import { useCallback, useEffect, useState } from 'react' import { useCallback, useEffect, useState } from 'react'
import useLast from '../../hooks/useLast' import useLast from '../../hooks/useLast'
import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo' import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo'
import Modal from '../Modal' import Modal from '../Modal'
import { CurrencySearch } from './CurrencySearch' import { CurrencySearch } from './CurrencySearch'
import { ImportList } from './ImportList'
import { ImportToken } from './ImportToken' import { ImportToken } from './ImportToken'
import usePrevious from 'hooks/usePrevious'
import Manage from './Manage' import Manage from './Manage'
import { TokenList } from '@uniswap/token-lists'
import { ImportList } from './ImportList'
interface CurrencySearchModalProps { interface CurrencySearchModalProps {
isOpen: boolean isOpen: boolean
......
import { useState, useCallback } from 'react' import { Trans } from '@lingui/macro'
import styled from 'styled-components/macro' import { TokenList } from '@uniswap/token-lists'
import ReactGA from 'react-ga' import { ButtonPrimary } from 'components/Button'
import { TYPE, CloseIcon } from 'theme'
import Card from 'components/Card' import Card from 'components/Card'
import { AutoColumn } from 'components/Column' import { AutoColumn } from 'components/Column'
import { RowBetween, RowFixed, AutoRow } from 'components/Row' import ListLogo from 'components/ListLogo'
import { ArrowLeft, AlertTriangle } from 'react-feather' import { AutoRow, RowBetween, RowFixed } from 'components/Row'
import { SectionBreak } from 'components/swap/styleds'
import { useFetchListCallback } from 'hooks/useFetchListCallback'
import useTheme from 'hooks/useTheme' import useTheme from 'hooks/useTheme'
import { transparentize } from 'polished' import { transparentize } from 'polished'
import { ButtonPrimary } from 'components/Button' import { useCallback, useState } from 'react'
import { SectionBreak } from 'components/swap/styleds' import { AlertTriangle, ArrowLeft } from 'react-feather'
import { ExternalLink } from '../../theme/components' import ReactGA from 'react-ga'
import ListLogo from 'components/ListLogo'
import { PaddedColumn, Checkbox, TextDot } from './styleds'
import { TokenList } from '@uniswap/token-lists'
import { useAppDispatch } from 'state/hooks' import { useAppDispatch } from 'state/hooks'
import { useFetchListCallback } from 'hooks/useFetchListCallback' import { enableList, removeList } from 'state/lists/actions'
import { removeList, enableList } from 'state/lists/actions'
import { CurrencyModalView } from './CurrencySearchModal'
import { useAllLists } from 'state/lists/hooks' import { useAllLists } from 'state/lists/hooks'
import { Trans } from '@lingui/macro' import styled from 'styled-components/macro'
import { CloseIcon, TYPE } from 'theme'
import { ExternalLink } from '../../theme/components'
import { CurrencyModalView } from './CurrencySearchModal'
import { Checkbox, PaddedColumn, TextDot } from './styleds'
const Wrapper = styled.div` const Wrapper = styled.div`
position: relative; position: relative;
......
import { CSSProperties } from 'react' import { Trans } from '@lingui/macro'
import { Token } from '@uniswap/sdk-core' import { Token } from '@uniswap/sdk-core'
import { AutoRow, RowFixed } from 'components/Row' import { ButtonPrimary } from 'components/Button'
import { AutoColumn } from 'components/Column' import { AutoColumn } from 'components/Column'
import CurrencyLogo from 'components/CurrencyLogo' import CurrencyLogo from 'components/CurrencyLogo'
import { TYPE } from 'theme'
import ListLogo from 'components/ListLogo' import ListLogo from 'components/ListLogo'
import { AutoRow, RowFixed } from 'components/Row'
import { useIsTokenActive, useIsUserAddedToken } from 'hooks/Tokens'
import useTheme from 'hooks/useTheme' import useTheme from 'hooks/useTheme'
import { ButtonPrimary } from 'components/Button' import { CSSProperties } from 'react'
import styled from 'styled-components/macro'
import { useIsUserAddedToken, useIsTokenActive } from 'hooks/Tokens'
import { CheckCircle } from 'react-feather' import { CheckCircle } from 'react-feather'
import styled from 'styled-components/macro'
import { TYPE } from 'theme'
import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo' import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo'
import { Trans } from '@lingui/macro'
const TokenSection = styled.div<{ dim?: boolean }>` const TokenSection = styled.div<{ dim?: boolean }>`
padding: 4px 20px; padding: 4px 20px;
......
import { Plural, Trans } from '@lingui/macro'
import { Currency, Token } from '@uniswap/sdk-core'
import { TokenList } from '@uniswap/token-lists/dist/types' import { TokenList } from '@uniswap/token-lists/dist/types'
import { Token, Currency } from '@uniswap/sdk-core' import { ButtonPrimary } from 'components/Button'
import styled from 'styled-components/macro'
import { TYPE, CloseIcon } from 'theme'
import Card from 'components/Card' import Card from 'components/Card'
import { AutoColumn } from 'components/Column' import { AutoColumn } from 'components/Column'
import { RowBetween, RowFixed } from 'components/Row'
import CurrencyLogo from 'components/CurrencyLogo' import CurrencyLogo from 'components/CurrencyLogo'
import { ArrowLeft, AlertCircle } from 'react-feather' import ListLogo from 'components/ListLogo'
import { transparentize } from 'polished' import { RowBetween, RowFixed } from 'components/Row'
import useTheme from 'hooks/useTheme'
import { ButtonPrimary } from 'components/Button'
import { SectionBreak } from 'components/swap/styleds' import { SectionBreak } from 'components/swap/styleds'
import { useAddUserToken } from 'state/user/hooks' import useTheme from 'hooks/useTheme'
import { useActiveWeb3React } from 'hooks/web3' import { useActiveWeb3React } from 'hooks/web3'
import { transparentize } from 'polished'
import { AlertCircle, ArrowLeft } from 'react-feather'
import { useAddUserToken } from 'state/user/hooks'
import styled from 'styled-components/macro'
import { CloseIcon, TYPE } from 'theme'
import { ExternalLink } from '../../theme/components' import { ExternalLink } from '../../theme/components'
import ListLogo from 'components/ListLogo'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink' import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { PaddedColumn } from './styleds' import { PaddedColumn } from './styleds'
import { Plural, Trans } from '@lingui/macro'
const Wrapper = styled.div` const Wrapper = styled.div`
position: relative; position: relative;
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { useState } from 'react' import { Token } from '@uniswap/sdk-core'
import { PaddedColumn, Separator } from './styleds' import { TokenList } from '@uniswap/token-lists'
import { RowBetween } from 'components/Row' import { RowBetween } from 'components/Row'
import { useState } from 'react'
import { ArrowLeft } from 'react-feather' import { ArrowLeft } from 'react-feather'
import { Text } from 'rebass' import { Text } from 'rebass'
import { CloseIcon } from 'theme'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { Token } from '@uniswap/sdk-core' import { CloseIcon } from 'theme'
import { CurrencyModalView } from './CurrencySearchModal'
import { ManageLists } from './ManageLists' import { ManageLists } from './ManageLists'
import ManageTokens from './ManageTokens' import ManageTokens from './ManageTokens'
import { TokenList } from '@uniswap/token-lists' import { PaddedColumn, Separator } from './styleds'
import { CurrencyModalView } from './CurrencySearchModal'
const Wrapper = styled.div` const Wrapper = styled.div`
width: 100%; width: 100%;
......
...@@ -10,6 +10,7 @@ import ReactGA from 'react-ga' ...@@ -10,6 +10,7 @@ import ReactGA from 'react-ga'
import { usePopper } from 'react-popper' import { usePopper } from 'react-popper'
import { useAppDispatch, useAppSelector } from 'state/hooks' import { useAppDispatch, useAppSelector } from 'state/hooks'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { useFetchListCallback } from '../../hooks/useFetchListCallback' import { useFetchListCallback } from '../../hooks/useFetchListCallback'
import { useOnClickOutside } from '../../hooks/useOnClickOutside' import { useOnClickOutside } from '../../hooks/useOnClickOutside'
import useTheme from '../../hooks/useTheme' import useTheme from '../../hooks/useTheme'
......
import { useRef, RefObject, useCallback, useState, useMemo } from 'react' import { Trans } from '@lingui/macro'
import { Token } from '@uniswap/sdk-core'
import Card from 'components/Card'
import Column from 'components/Column' import Column from 'components/Column'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink' import CurrencyLogo from 'components/CurrencyLogo'
import { PaddedColumn, Separator, SearchInput } from './styleds'
import Row, { RowBetween, RowFixed } from 'components/Row' import Row, { RowBetween, RowFixed } from 'components/Row'
import { TYPE, ExternalLinkIcon, TrashIcon, ButtonText, ExternalLink } from 'theme'
import { useToken } from 'hooks/Tokens' import { useToken } from 'hooks/Tokens'
import { useActiveWeb3React } from 'hooks/web3'
import { RefObject, useCallback, useMemo, useRef, useState } from 'react'
import { useRemoveUserAddedToken, useUserAddedTokens } from 'state/user/hooks'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { useUserAddedTokens, useRemoveUserAddedToken } from 'state/user/hooks' import { ButtonText, ExternalLink, ExternalLinkIcon, TrashIcon, TYPE } from 'theme'
import { Token } from '@uniswap/sdk-core'
import CurrencyLogo from 'components/CurrencyLogo'
import { isAddress } from 'utils' import { isAddress } from 'utils'
import { useActiveWeb3React } from 'hooks/web3'
import Card from 'components/Card'
import ImportRow from './ImportRow'
import useTheme from '../../hooks/useTheme'
import { Trans } from '@lingui/macro'
import useTheme from '../../hooks/useTheme'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { CurrencyModalView } from './CurrencySearchModal' import { CurrencyModalView } from './CurrencySearchModal'
import ImportRow from './ImportRow'
import { PaddedColumn, SearchInput, Separator } from './styleds'
const Wrapper = styled.div` const Wrapper = styled.div`
width: 100%; width: 100%;
......
import { Token } from '@uniswap/sdk-core'
import { TokenInfo } from '@uniswap/token-lists' import { TokenInfo } from '@uniswap/token-lists'
import { useMemo } from 'react' import { useMemo } from 'react'
import { isAddress } from '../../utils' import { isAddress } from '../../utils'
import { Token } from '@uniswap/sdk-core'
const alwaysTrue = () => true const alwaysTrue = () => true
......
import { Token, CurrencyAmount, Currency } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core'
import { useMemo } from 'react' import { useMemo } from 'react'
import { useAllTokenBalances } from '../../state/wallet/hooks' import { useAllTokenBalances } from '../../state/wallet/hooks'
// compare two token amounts with highest one coming first // compare two token amounts with highest one coming first
......
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
import { RowBetween } from '../Row' import { RowBetween } from '../Row'
......
import { t, Trans } from '@lingui/macro' import { t, Trans } from '@lingui/macro'
import { Percent } from '@uniswap/sdk-core'
import { SupportedChainId } from 'constants/chains'
import { useActiveWeb3React } from 'hooks/web3'
import { useContext, useRef, useState } from 'react' import { useContext, useRef, useState } from 'react'
import { Settings, X } from 'react-feather' import { Settings, X } from 'react-feather'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
import { Text } from 'rebass' import { Text } from 'rebass'
import styled, { ThemeContext } from 'styled-components/macro' import styled, { ThemeContext } from 'styled-components/macro'
import { useOnClickOutside } from '../../hooks/useOnClickOutside' import { useOnClickOutside } from '../../hooks/useOnClickOutside'
import { ApplicationModal } from '../../state/application/actions' import { ApplicationModal } from '../../state/application/actions'
import { useModalOpen, useToggleSettingsMenu } from '../../state/application/hooks' import { useModalOpen, useToggleSettingsMenu } from '../../state/application/hooks'
import { useExpertModeManager, useClientSideRouter } from '../../state/user/hooks' import { useClientSideRouter, useExpertModeManager } from '../../state/user/hooks'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { ButtonError } from '../Button' import { ButtonError } from '../Button'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
...@@ -16,9 +20,6 @@ import QuestionHelper from '../QuestionHelper' ...@@ -16,9 +20,6 @@ import QuestionHelper from '../QuestionHelper'
import { RowBetween, RowFixed } from '../Row' import { RowBetween, RowFixed } from '../Row'
import Toggle from '../Toggle' import Toggle from '../Toggle'
import TransactionSettings from '../TransactionSettings' import TransactionSettings from '../TransactionSettings'
import { Percent } from '@uniswap/sdk-core'
import { useActiveWeb3React } from 'hooks/web3'
import { SupportedChainId } from 'constants/chains'
const StyledMenuIcon = styled(Settings)` const StyledMenuIcon = styled(Settings)`
height: 20px; height: 20px;
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { useLocationLinkProps } from 'hooks/useLocationLinkProps'
import { useMemo } from 'react' import { useMemo } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { DEFAULT_LOCALE, LOCALE_LABEL, SupportedLocale } from '../../constants/locales' import { DEFAULT_LOCALE, LOCALE_LABEL, SupportedLocale } from '../../constants/locales'
import { navigatorLocale, useActiveLocale } from '../../hooks/useActiveLocale' import { navigatorLocale, useActiveLocale } from '../../hooks/useActiveLocale'
import { StyledInternalLink, TYPE } from '../../theme' import { StyledInternalLink, TYPE } from '../../theme'
import { useLocationLinkProps } from 'hooks/useLocationLinkProps'
const Container = styled(TYPE.small)` const Container = styled(TYPE.small)`
opacity: 0.6; opacity: 0.6;
......
import { TextInput, ResizingTextArea } from './'
import { render, screen, fireEvent } from 'test-utils'
// include style rules in snapshots // include style rules in snapshots
import 'jest-styled-components' import 'jest-styled-components'
import { fireEvent, render, screen } from 'test-utils'
import { ResizingTextArea, TextInput } from './'
describe('TextInput', () => { describe('TextInput', () => {
it('renders correctly', () => { it('renders correctly', () => {
const { asFragment } = render( const { asFragment } = render(
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
const Wrapper = styled.button<{ isActive?: boolean; activeElement?: boolean }>` const Wrapper = styled.button<{ isActive?: boolean; activeElement?: boolean }>`
......
import { Token } from '@uniswap/sdk-core' import { Token } from '@uniswap/sdk-core'
import Modal from '../Modal'
import { ImportToken } from 'components/SearchModal/ImportToken' import { ImportToken } from 'components/SearchModal/ImportToken'
import Modal from '../Modal'
export default function TokenWarningModal({ export default function TokenWarningModal({
isOpen, isOpen,
tokens, tokens,
......
import { transparentize } from 'polished' import { transparentize } from 'polished'
import { ReactNode, useCallback, useState } from 'react' import { ReactNode, useCallback, useState } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import Popover, { PopoverProps } from '../Popover' import Popover, { PopoverProps } from '../Popover'
export const TooltipContainer = styled.div` export const TooltipContainer = styled.div`
......
import { Trans } from '@lingui/macro'
import { Currency } from '@uniswap/sdk-core' import { Currency } from '@uniswap/sdk-core'
import Badge from 'components/Badge'
import { CHAIN_INFO, L2_CHAIN_IDS, SupportedL2ChainId } from 'constants/chains'
import useAddTokenToMetamask from 'hooks/useAddTokenToMetamask'
import { ReactNode, useContext } from 'react' import { ReactNode, useContext } from 'react'
import styled, { ThemeContext } from 'styled-components/macro'
import { getExplorerLink, ExplorerDataType } from '../../utils/getExplorerLink'
import { TransactionSummary } from '../AccountDetails/TransactionSummary'
import Modal from '../Modal'
import { ExternalLink } from '../../theme'
import { Text } from 'rebass'
import { CloseIcon, CustomLightSpinner } from '../../theme/components'
import { RowBetween, RowFixed } from '../Row'
import { AlertCircle, AlertTriangle, ArrowUpCircle, CheckCircle } from 'react-feather' import { AlertCircle, AlertTriangle, ArrowUpCircle, CheckCircle } from 'react-feather'
import { ButtonPrimary, ButtonLight } from '../Button' import { Text } from 'rebass'
import { AutoColumn, ColumnCenter } from '../Column' import { useIsTransactionConfirmed, useTransaction } from 'state/transactions/hooks'
import styled, { ThemeContext } from 'styled-components/macro'
import Circle from '../../assets/images/blue-loader.svg' import Circle from '../../assets/images/blue-loader.svg'
import MetaMaskLogo from '../../assets/images/metamask.png' import MetaMaskLogo from '../../assets/images/metamask.png'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import useAddTokenToMetamask from 'hooks/useAddTokenToMetamask' import { ExternalLink } from '../../theme'
import { Trans } from '@lingui/macro' import { CloseIcon, CustomLightSpinner } from '../../theme/components'
import { CHAIN_INFO, L2_CHAIN_IDS, SupportedL2ChainId } from 'constants/chains' import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { useIsTransactionConfirmed, useTransaction } from 'state/transactions/hooks' import { TransactionSummary } from '../AccountDetails/TransactionSummary'
import Badge from 'components/Badge' import { ButtonLight, ButtonPrimary } from '../Button'
import { AutoColumn, ColumnCenter } from '../Column'
import Modal from '../Modal'
import { RowBetween, RowFixed } from '../Row'
import AnimatedConfirmation from './AnimatedConfirmation' import AnimatedConfirmation from './AnimatedConfirmation'
const Wrapper = styled.div` const Wrapper = styled.div`
......
import { t, Trans } from '@lingui/macro' import { t, Trans } from '@lingui/macro'
import { useState, useContext } from 'react'
import { Percent } from '@uniswap/sdk-core' import { Percent } from '@uniswap/sdk-core'
import { L2_CHAIN_IDS } from 'constants/chains'
import { DEFAULT_DEADLINE_FROM_NOW } from 'constants/misc'
import { useActiveWeb3React } from 'hooks/web3'
import { darken } from 'polished'
import { useContext, useState } from 'react'
import { useSetUserSlippageTolerance, useUserSlippageTolerance, useUserTransactionTTL } from 'state/user/hooks'
import styled, { ThemeContext } from 'styled-components/macro' import styled, { ThemeContext } from 'styled-components/macro'
import QuestionHelper from '../QuestionHelper'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
import QuestionHelper from '../QuestionHelper'
import { RowBetween, RowFixed } from '../Row' import { RowBetween, RowFixed } from '../Row'
import { DEFAULT_DEADLINE_FROM_NOW } from 'constants/misc'
import { darken } from 'polished'
import { useSetUserSlippageTolerance, useUserSlippageTolerance, useUserTransactionTTL } from 'state/user/hooks'
import { L2_CHAIN_IDS } from 'constants/chains'
import { useActiveWeb3React } from 'hooks/web3'
enum SlippageError { enum SlippageError {
InvalidInput = 'InvalidInput', InvalidInput = 'InvalidInput',
......
import React from 'react' import React from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { ExternalLink } from '../../theme' import { ExternalLink } from '../../theme'
const InfoCard = styled.button<{ active?: boolean }>` const InfoCard = styled.button<{ active?: boolean }>`
......
import { Trans } from '@lingui/macro'
import { AbstractConnector } from '@web3-react/abstract-connector' import { AbstractConnector } from '@web3-react/abstract-connector'
import { darken } from 'polished'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { SUPPORTED_WALLETS } from '../../constants/wallet'
import Option from './Option'
import { injected } from '../../connectors' import { injected } from '../../connectors'
import { darken } from 'polished' import { SUPPORTED_WALLETS } from '../../constants/wallet'
import Loader from '../Loader' import Loader from '../Loader'
import { Trans } from '@lingui/macro' import Option from './Option'
const PendingSection = styled.div` const PendingSection = styled.div`
${({ theme }) => theme.flexColumnNoWrap}; ${({ theme }) => theme.flexColumnNoWrap};
......
import { Trans } from '@lingui/macro'
import { AbstractConnector } from '@web3-react/abstract-connector' import { AbstractConnector } from '@web3-react/abstract-connector'
import { UnsupportedChainIdError, useWeb3React } from '@web3-react/core' import { UnsupportedChainIdError, useWeb3React } from '@web3-react/core'
import { WalletConnectConnector } from '@web3-react/walletconnect-connector' import { WalletConnectConnector } from '@web3-react/walletconnect-connector'
...@@ -6,6 +7,7 @@ import { useEffect, useState } from 'react' ...@@ -6,6 +7,7 @@ import { useEffect, useState } from 'react'
import { isMobile } from 'react-device-detect' import { isMobile } from 'react-device-detect'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import MetamaskIcon from '../../assets/images/metamask.png' import MetamaskIcon from '../../assets/images/metamask.png'
import { ReactComponent as Close } from '../../assets/images/x.svg' import { ReactComponent as Close } from '../../assets/images/x.svg'
import { fortmatic, injected, portis } from '../../connectors' import { fortmatic, injected, portis } from '../../connectors'
...@@ -16,12 +18,10 @@ import { ApplicationModal } from '../../state/application/actions' ...@@ -16,12 +18,10 @@ import { ApplicationModal } from '../../state/application/actions'
import { useModalOpen, useWalletModalToggle } from '../../state/application/hooks' import { useModalOpen, useWalletModalToggle } from '../../state/application/hooks'
import { ExternalLink, TYPE } from '../../theme' import { ExternalLink, TYPE } from '../../theme'
import AccountDetails from '../AccountDetails' import AccountDetails from '../AccountDetails'
import { Trans } from '@lingui/macro' import { LightCard } from '../Card'
import Modal from '../Modal' import Modal from '../Modal'
import Option from './Option' import Option from './Option'
import PendingView from './PendingView' import PendingView from './PendingView'
import { LightCard } from '../Card'
const CloseIcon = styled.div` const CloseIcon = styled.div`
position: absolute; position: absolute;
......
import { useState, useEffect } from 'react' import { Trans } from '@lingui/macro'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
import { useEffect, useState } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { Trans } from '@lingui/macro'
import { network } from '../../connectors' import { network } from '../../connectors'
import { useEagerConnect, useInactiveListener } from '../../hooks/web3'
import { NetworkContextName } from '../../constants/misc' import { NetworkContextName } from '../../constants/misc'
import { useEagerConnect, useInactiveListener } from '../../hooks/web3'
import Loader from '../Loader' import Loader from '../Loader'
const MessageWrapper = styled.div` const MessageWrapper = styled.div`
......
import { t, Trans } from '@lingui/macro'
import { AbstractConnector } from '@web3-react/abstract-connector' import { AbstractConnector } from '@web3-react/abstract-connector'
import { UnsupportedChainIdError, useWeb3React } from '@web3-react/core' import { UnsupportedChainIdError, useWeb3React } from '@web3-react/core'
import { darken } from 'polished' import { darken } from 'polished'
import { useMemo } from 'react' import { useMemo } from 'react'
import { Activity } from 'react-feather' import { Activity } from 'react-feather'
import { t, Trans } from '@lingui/macro'
import styled, { css } from 'styled-components/macro' import styled, { css } from 'styled-components/macro'
import CoinbaseWalletIcon from '../../assets/images/coinbaseWalletIcon.svg' import CoinbaseWalletIcon from '../../assets/images/coinbaseWalletIcon.svg'
import FortmaticIcon from '../../assets/images/fortmaticIcon.png' import FortmaticIcon from '../../assets/images/fortmaticIcon.png'
import PortisIcon from '../../assets/images/portisIcon.png' import PortisIcon from '../../assets/images/portisIcon.png'
...@@ -18,10 +19,8 @@ import { isTransactionRecent, useAllTransactions } from '../../state/transaction ...@@ -18,10 +19,8 @@ import { isTransactionRecent, useAllTransactions } from '../../state/transaction
import { TransactionDetails } from '../../state/transactions/reducer' import { TransactionDetails } from '../../state/transactions/reducer'
import { shortenAddress } from '../../utils' import { shortenAddress } from '../../utils'
import { ButtonSecondary } from '../Button' import { ButtonSecondary } from '../Button'
import Identicon from '../Identicon' import Identicon from '../Identicon'
import Loader from '../Loader' import Loader from '../Loader'
import { RowBetween } from '../Row' import { RowBetween } from '../Row'
import WalletModal from '../WalletModal' import WalletModal from '../WalletModal'
......
import { useEffect } from 'react' import { useEffect } from 'react'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
import { getCLS, getFCP, getFID, getLCP, Metric } from 'web-vitals'
import { RouteComponentProps } from 'react-router-dom' import { RouteComponentProps } from 'react-router-dom'
import { getCLS, getFCP, getFID, getLCP, Metric } from 'web-vitals'
function reportWebVitals({ name, delta, id }: Metric) { function reportWebVitals({ name, delta, id }: Metric) {
ReactGA.timing({ ReactGA.timing({
......
import { Trans } from '@lingui/macro'
import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { isAddress } from 'ethers/lib/utils'
import { useState } from 'react' import { useState } from 'react'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink' import { Text } from 'rebass'
import Modal from '../Modal'
import { AutoColumn, ColumnCenter } from '../Column'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { DataCard, CardSection, Break } from '../earn/styled'
import { RowBetween } from '../Row'
import { TYPE, ExternalLink, CloseIcon, CustomLightSpinner, UniTokenAnimated } from '../../theme'
import { ButtonPrimary } from '../Button'
import { useClaimCallback, useUserUnclaimedAmount, useUserHasAvailableClaim } from '../../state/claim/hooks'
import tokenLogo from '../../assets/images/token-logo.png'
import Circle from '../../assets/images/blue-loader.svg' import Circle from '../../assets/images/blue-loader.svg'
import { Text } from 'rebass' import tokenLogo from '../../assets/images/token-logo.png'
import AddressInputPanel from '../AddressInputPanel'
import useENS from '../../hooks/useENS' import useENS from '../../hooks/useENS'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { isAddress } from 'ethers/lib/utils' import { useClaimCallback, useUserHasAvailableClaim, useUserUnclaimedAmount } from '../../state/claim/hooks'
import Confetti from '../Confetti'
import { CardNoise, CardBGImage, CardBGImageSmaller } from '../earn/styled'
import { useIsTransactionPending } from '../../state/transactions/hooks' import { useIsTransactionPending } from '../../state/transactions/hooks'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CloseIcon, CustomLightSpinner, ExternalLink, TYPE, UniTokenAnimated } from '../../theme'
import { shortenAddress } from '../../utils' import { shortenAddress } from '../../utils'
import { Trans } from '@lingui/macro' import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import AddressInputPanel from '../AddressInputPanel'
import { ButtonPrimary } from '../Button'
import { AutoColumn, ColumnCenter } from '../Column'
import Confetti from '../Confetti'
import { Break, CardSection, DataCard } from '../earn/styled'
import { CardBGImage, CardBGImageSmaller, CardNoise } from '../earn/styled'
import Modal from '../Modal'
import { RowBetween } from '../Row'
const ContentWrapper = styled(AutoColumn)` const ContentWrapper = styled(AutoColumn)`
width: 100%; width: 100%;
......
import JSBI from 'jsbi' import { Trans } from '@lingui/macro'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { isAddress } from 'ethers/lib/utils' import { isAddress } from 'ethers/lib/utils'
import JSBI from 'jsbi'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { Text } from 'rebass' import { Text } from 'rebass'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import Circle from '../../assets/images/blue-loader.svg' import Circle from '../../assets/images/blue-loader.svg'
import tokenLogo from '../../assets/images/token-logo.png' import tokenLogo from '../../assets/images/token-logo.png'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
...@@ -17,8 +19,6 @@ import { ButtonPrimary } from '../Button' ...@@ -17,8 +19,6 @@ import { ButtonPrimary } from '../Button'
import { AutoColumn, ColumnCenter } from '../Column' import { AutoColumn, ColumnCenter } from '../Column'
import Confetti from '../Confetti' import Confetti from '../Confetti'
import { Break, CardBGImage, CardBGImageSmaller, CardNoise, CardSection, DataCard } from '../earn/styled' import { Break, CardBGImage, CardBGImageSmaller, CardNoise, CardSection, DataCard } from '../earn/styled'
import { Trans } from '@lingui/macro'
import Modal from '../Modal' import Modal from '../Modal'
import { RowBetween } from '../Row' import { RowBetween } from '../Row'
......
...@@ -2,6 +2,7 @@ import { TransactionResponse } from '@ethersproject/providers' ...@@ -2,6 +2,7 @@ import { TransactionResponse } from '@ethersproject/providers'
import { t, Trans } from '@lingui/macro' import { t, Trans } from '@lingui/macro'
import { useState } from 'react' import { useState } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { useStakingContract } from '../../hooks/useContract' import { useStakingContract } from '../../hooks/useContract'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { StakingInfo } from '../../state/stake/hooks' import { StakingInfo } from '../../state/stake/hooks'
......
import { AutoColumn } from '../Column' import { Trans } from '@lingui/macro'
import { RowBetween } from '../Row'
import styled from 'styled-components/macro'
import { TYPE, StyledInternalLink } from '../../theme'
import DoubleCurrencyLogo from '../DoubleLogo'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { ButtonPrimary } from '../Button' import styled from 'styled-components/macro'
import { StakingInfo } from '../../state/stake/hooks'
import { BIG_INT_SECONDS_IN_WEEK } from '../../constants/misc'
import { useColor } from '../../hooks/useColor' import { useColor } from '../../hooks/useColor'
import { currencyId } from '../../utils/currencyId'
import { Break, CardNoise, CardBGImage } from './styled'
import { unwrappedToken } from '../../utils/unwrappedToken'
import { useTotalSupply } from '../../hooks/useTotalSupply' import { useTotalSupply } from '../../hooks/useTotalSupply'
import { useV2Pair } from '../../hooks/useV2Pairs'
import useUSDCPrice from '../../hooks/useUSDCPrice' import useUSDCPrice from '../../hooks/useUSDCPrice'
import { BIG_INT_SECONDS_IN_WEEK } from '../../constants/misc' import { useV2Pair } from '../../hooks/useV2Pairs'
import { Trans } from '@lingui/macro' import { StakingInfo } from '../../state/stake/hooks'
import { StyledInternalLink, TYPE } from '../../theme'
import { currencyId } from '../../utils/currencyId'
import { unwrappedToken } from '../../utils/unwrappedToken'
import { ButtonPrimary } from '../Button'
import { AutoColumn } from '../Column'
import DoubleCurrencyLogo from '../DoubleLogo'
import { RowBetween } from '../Row'
import { Break, CardBGImage, CardNoise } from './styled'
const StatContainer = styled.div` const StatContainer = styled.div`
display: flex; display: flex;
......
...@@ -4,6 +4,7 @@ import { CurrencyAmount, Token } from '@uniswap/sdk-core' ...@@ -4,6 +4,7 @@ import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk' import { Pair } from '@uniswap/v2-sdk'
import { useCallback, useState } from 'react' import { useCallback, useState } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { ApprovalState, useApproveCallback } from '../../hooks/useApproveCallback' import { ApprovalState, useApproveCallback } from '../../hooks/useApproveCallback'
import { usePairContract, useStakingContract, useV2RouterContract } from '../../hooks/useContract' import { usePairContract, useStakingContract, useV2RouterContract } from '../../hooks/useContract'
import { useV2LiquidityTokenPermit } from '../../hooks/useERC20Permit' import { useV2LiquidityTokenPermit } from '../../hooks/useERC20Permit'
......
...@@ -2,6 +2,7 @@ import { TransactionResponse } from '@ethersproject/providers' ...@@ -2,6 +2,7 @@ import { TransactionResponse } from '@ethersproject/providers'
import { t, Trans } from '@lingui/macro' import { t, Trans } from '@lingui/macro'
import { useState } from 'react' import { useState } from 'react'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { useStakingContract } from '../../hooks/useContract' import { useStakingContract } from '../../hooks/useContract'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
import { StakingInfo } from '../../state/stake/hooks' import { StakingInfo } from '../../state/stake/hooks'
......
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { AutoColumn } from '../Column'
import uImage from '../../assets/images/big_unicorn.png' import uImage from '../../assets/images/big_unicorn.png'
import xlUnicorn from '../../assets/images/xl_uni.png'
import noise from '../../assets/images/noise.png' import noise from '../../assets/images/noise.png'
import xlUnicorn from '../../assets/images/xl_uni.png'
import { AutoColumn } from '../Column'
export const DataCard = styled(AutoColumn)<{ disabled?: boolean }>` export const DataCard = styled(AutoColumn)<{ disabled?: boolean }>`
background: radial-gradient(76.02% 75.41% at 1.84% 0%, #ff007a 0%, #2172e5 100%); background: radial-gradient(76.02% 75.41% at 1.84% 0%, #ff007a 0%, #2172e5 100%);
......
...@@ -5,6 +5,7 @@ import { Trade as V3Trade } from '@uniswap/v3-sdk' ...@@ -5,6 +5,7 @@ import { Trade as V3Trade } from '@uniswap/v3-sdk'
import { LoadingRows } from 'components/Loader/styled' import { LoadingRows } from 'components/Loader/styled'
import { useContext, useMemo } from 'react' import { useContext, useMemo } from 'react'
import { ThemeContext } from 'styled-components/macro' import { ThemeContext } from 'styled-components/macro'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { computeRealizedLPFeePercent } from '../../utils/prices' import { computeRealizedLPFeePercent } from '../../utils/prices'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
......
...@@ -3,6 +3,7 @@ import { Currency, Percent, TradeType } from '@uniswap/sdk-core' ...@@ -3,6 +3,7 @@ import { Currency, Percent, TradeType } from '@uniswap/sdk-core'
import { Trade as V2Trade } from '@uniswap/v2-sdk' import { Trade as V2Trade } from '@uniswap/v2-sdk'
import { Trade as V3Trade } from '@uniswap/v3-sdk' import { Trade as V3Trade } from '@uniswap/v3-sdk'
import { ReactNode, useCallback, useMemo } from 'react' import { ReactNode, useCallback, useMemo } from 'react'
import TransactionConfirmationModal, { import TransactionConfirmationModal, {
ConfirmationModalContent, ConfirmationModalContent,
TransactionErrorContent, TransactionErrorContent,
......
import { Percent } from '@uniswap/sdk-core' import { Percent } from '@uniswap/sdk-core'
import { warningSeverity } from '../../utils/prices' import { warningSeverity } from '../../utils/prices'
import { ErrorText } from './styleds' import { ErrorText } from './styleds'
......
...@@ -2,6 +2,7 @@ import { Trans } from '@lingui/macro' ...@@ -2,6 +2,7 @@ import { Trans } from '@lingui/macro'
import { useRoutingAPIEnabled } from 'state/user/hooks' import { useRoutingAPIEnabled } from 'state/user/hooks'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { TYPE } from 'theme' import { TYPE } from 'theme'
import { ReactComponent as AutoRouterIcon } from '../../assets/svg/auto_router.svg' import { ReactComponent as AutoRouterIcon } from '../../assets/svg/auto_router.svg'
import { ReactComponent as StaticRouterIcon } from '../../assets/svg/static_route.svg' import { ReactComponent as StaticRouterIcon } from '../../assets/svg/static_route.svg'
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import styled from 'styled-components/macro'
import SettingsTab from '../Settings'
import { Percent } from '@uniswap/sdk-core' import { Percent } from '@uniswap/sdk-core'
import styled from 'styled-components/macro'
import { RowBetween, RowFixed } from '../Row'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { RowBetween, RowFixed } from '../Row'
import SettingsTab from '../Settings'
const StyledSwapHeader = styled.div` const StyledSwapHeader = styled.div`
padding: 1rem 1.25rem 0.5rem 1.25rem; padding: 1rem 1.25rem 0.5rem 1.25rem;
......
...@@ -2,9 +2,9 @@ import { Trans } from '@lingui/macro' ...@@ -2,9 +2,9 @@ import { Trans } from '@lingui/macro'
import { Currency, TradeType } from '@uniswap/sdk-core' import { Currency, TradeType } from '@uniswap/sdk-core'
import { Trade as V2Trade } from '@uniswap/v2-sdk' import { Trade as V2Trade } from '@uniswap/v2-sdk'
import { Trade as V3Trade } from '@uniswap/v3-sdk' import { Trade as V3Trade } from '@uniswap/v3-sdk'
import { ReactNode } from 'react' import { ReactNode } from 'react'
import { Text } from 'rebass' import { Text } from 'rebass'
import { ButtonError } from '../Button' import { ButtonError } from '../Button'
import { AutoRow } from '../Row' import { AutoRow } from '../Row'
import { SwapCallbackError } from './styleds' import { SwapCallbackError } from './styleds'
......
import { Trans } from '@lingui/macro'
import { Currency, Percent, TradeType } from '@uniswap/sdk-core' import { Currency, Percent, TradeType } from '@uniswap/sdk-core'
import { Trade as V2Trade } from '@uniswap/v2-sdk' import { Trade as V2Trade } from '@uniswap/v2-sdk'
import { Trade as V3Trade } from '@uniswap/v3-sdk' import { Trade as V3Trade } from '@uniswap/v3-sdk'
import { useContext, useState } from 'react' import { useContext, useState } from 'react'
import { ArrowDown, AlertTriangle } from 'react-feather' import { AlertTriangle, ArrowDown } from 'react-feather'
import { Text } from 'rebass' import { Text } from 'rebass'
import styled, { ThemeContext } from 'styled-components/macro' import styled, { ThemeContext } from 'styled-components/macro'
import { useUSDCValue } from '../../hooks/useUSDCPrice' import { useUSDCValue } from '../../hooks/useUSDCPrice'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { ButtonPrimary } from '../Button'
import { isAddress, shortenAddress } from '../../utils' import { isAddress, shortenAddress } from '../../utils'
import { computeFiatValuePriceImpact } from '../../utils/computeFiatValuePriceImpact' import { computeFiatValuePriceImpact } from '../../utils/computeFiatValuePriceImpact'
import { ButtonPrimary } from '../Button'
import { LightCard } from '../Card'
import { AutoColumn } from '../Column' import { AutoColumn } from '../Column'
import { FiatValue } from '../CurrencyInputPanel/FiatValue' import { FiatValue } from '../CurrencyInputPanel/FiatValue'
import CurrencyLogo from '../CurrencyLogo' import CurrencyLogo from '../CurrencyLogo'
import { RowBetween, RowFixed } from '../Row' import { RowBetween, RowFixed } from '../Row'
import { TruncatedText, SwapShowAcceptChanges } from './styleds'
import { Trans } from '@lingui/macro'
import { AdvancedSwapDetails } from './AdvancedSwapDetails'
import { LightCard } from '../Card'
import TradePrice from '../swap/TradePrice' import TradePrice from '../swap/TradePrice'
import { AdvancedSwapDetails } from './AdvancedSwapDetails'
import { SwapShowAcceptChanges, TruncatedText } from './styleds'
const ArrowWrapper = styled.div` const ArrowWrapper = styled.div`
padding: 4px; padding: 4px;
......
...@@ -13,6 +13,7 @@ import { useRoutingAPIEnabled } from 'state/user/hooks' ...@@ -13,6 +13,7 @@ import { useRoutingAPIEnabled } from 'state/user/hooks'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { TYPE } from 'theme' import { TYPE } from 'theme'
import { getTradeVersion } from 'utils/getTradeVersion' import { getTradeVersion } from 'utils/getTradeVersion'
import { AutoRouterLabel, AutoRouterLogo } from './RouterLabel' import { AutoRouterLabel, AutoRouterLogo } from './RouterLabel'
const Separator = styled.div` const Separator = styled.div`
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment