+
{swapIsUnsupported ? (
@@ -655,7 +655,7 @@ export default function Swap({ history }: RouteComponentProps) {
)}
{isExpertMode && swapErrorMessage ? : null}
-
+
diff --git a/src/pages/styled.tsx b/src/pages/styled.tsx
deleted file mode 100644
index e496398ef..000000000
--- a/src/pages/styled.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-import styled from 'styled-components/macro'
-
-export const StandardPageWrapper = styled.div`
- padding-top: 160px;
- width: 100%;
-`
diff --git a/src/state/application/hooks.ts b/src/state/application/hooks.ts
index d969d51db..2c0717385 100644
--- a/src/state/application/hooks.ts
+++ b/src/state/application/hooks.ts
@@ -21,16 +21,6 @@ export function useToggleModal(modal: ApplicationModal): () => void {
return useCallback(() => dispatch(setOpenModal(open ? null : modal)), [dispatch, modal, open])
}
-export function useOpenModal(modal: ApplicationModal): () => void {
- const dispatch = useAppDispatch()
- return useCallback(() => dispatch(setOpenModal(modal)), [dispatch, modal])
-}
-
-export function useCloseModals(): () => void {
- const dispatch = useAppDispatch()
- return useCallback(() => dispatch(setOpenModal(null)), [dispatch])
-}
-
export function useWalletModalToggle(): () => void {
return useToggleModal(ApplicationModal.WALLET)
}
diff --git a/src/state/burn/reducer.ts b/src/state/burn/reducer.ts
index b7c1e3464..816f920cb 100644
--- a/src/state/burn/reducer.ts
+++ b/src/state/burn/reducer.ts
@@ -1,7 +1,7 @@
import { createReducer } from '@reduxjs/toolkit'
import { Field, typeInput } from './actions'
-export interface BurnState {
+interface BurnState {
readonly independentField: Field
readonly typedValue: string
}
diff --git a/src/state/burn/v3/reducer.ts b/src/state/burn/v3/reducer.ts
index 4b7555755..78d1da43f 100644
--- a/src/state/burn/v3/reducer.ts
+++ b/src/state/burn/v3/reducer.ts
@@ -1,7 +1,7 @@
import { createReducer } from '@reduxjs/toolkit'
import { selectPercent } from './actions'
-export interface BurnV3State {
+interface BurnV3State {
readonly percent: number
}
diff --git a/src/state/lists/actions.ts b/src/state/lists/actions.ts
index a64724c3a..0c055b963 100644
--- a/src/state/lists/actions.ts
+++ b/src/state/lists/actions.ts
@@ -1,5 +1,5 @@
import { ActionCreatorWithPayload, createAction } from '@reduxjs/toolkit'
-import { TokenList, Version } from '@uniswap/token-lists'
+import { TokenList } from '@uniswap/token-lists'
export const fetchTokenList: Readonly<{
pending: ActionCreatorWithPayload<{ url: string; requestId: string }>
@@ -20,4 +20,3 @@ export const disableList = createAction('lists/disableList')
// versioning
export const acceptListUpdate = createAction('lists/acceptListUpdate')
-export const rejectVersionUpdate = createAction('lists/rejectVersionUpdate')
diff --git a/src/state/lists/hooks.ts b/src/state/lists/hooks.ts
index 1aa75d15d..919e681ab 100644
--- a/src/state/lists/hooks.ts
+++ b/src/state/lists/hooks.ts
@@ -15,7 +15,7 @@ export type TokenAddressMap = Readonly<{
const listCache: WeakMap | null =
typeof WeakMap !== 'undefined' ? new WeakMap() : null
-export function listToTokenMap(list: TokenList): TokenAddressMap {
+function listToTokenMap(list: TokenList): TokenAddressMap {
const result = listCache?.get(list)
if (result) return result
diff --git a/src/state/lists/wrappedTokenInfo.ts b/src/state/lists/wrappedTokenInfo.ts
index d272112a1..096983718 100644
--- a/src/state/lists/wrappedTokenInfo.ts
+++ b/src/state/lists/wrappedTokenInfo.ts
@@ -4,7 +4,7 @@ import { TokenList } from '@uniswap/token-lists/dist/types'
import { isAddress } from '../../utils'
type TagDetails = Tags[keyof Tags]
-export interface TagInfo extends TagDetails {
+interface TagInfo extends TagDetails {
id: string
}
/**
diff --git a/src/state/mint/v3/reducer.ts b/src/state/mint/v3/reducer.ts
index 286a14a04..1bbb49615 100644
--- a/src/state/mint/v3/reducer.ts
+++ b/src/state/mint/v3/reducer.ts
@@ -8,7 +8,7 @@ import {
typeRightRangeInput,
} from './actions'
-export interface MintState {
+interface MintState {
readonly independentField: Field
readonly typedValue: string
readonly startPriceTypedValue: string // for the case when there's no liquidity
@@ -16,7 +16,7 @@ export interface MintState {
readonly rightRangeTypedValue: string
}
-export const initialState: MintState = {
+const initialState: MintState = {
independentField: Field.CURRENCY_A,
typedValue: '',
startPriceTypedValue: '',
diff --git a/src/state/multicall/hooks.ts b/src/state/multicall/hooks.ts
index 058b091e1..17668e6a1 100644
--- a/src/state/multicall/hooks.ts
+++ b/src/state/multicall/hooks.ts
@@ -15,7 +15,7 @@ export interface Result extends ReadonlyArray {
type MethodArg = string | number | BigNumber
type MethodArgs = Array
-export type OptionalMethodInputs = Array | undefined
+type OptionalMethodInputs = Array | undefined
function isMethodArg(x: unknown): x is MethodArg {
return BigNumber.isBigNumber(x) || ['string', 'number'].indexOf(typeof x) !== -1
@@ -102,7 +102,7 @@ function useCallsData(
)
}
-export interface CallState {
+interface CallState {
readonly valid: boolean
// the result, or undefined if loading or errored/no data
readonly result: Result | undefined
diff --git a/src/state/stake/hooks.ts b/src/state/stake/hooks.ts
index de438a10c..fbc6e3c42 100644
--- a/src/state/stake/hooks.ts
+++ b/src/state/stake/hooks.ts
@@ -11,7 +11,7 @@ import useCurrentBlockTimestamp from 'hooks/useCurrentBlockTimestamp'
import { Interface } from '@ethersproject/abi'
import { abi as STAKING_REWARDS_ABI } from '@uniswap/liquidity-staker/build/StakingRewards.json'
-export const STAKING_REWARDS_INTERFACE = new Interface(STAKING_REWARDS_ABI)
+const STAKING_REWARDS_INTERFACE = new Interface(STAKING_REWARDS_ABI)
export const STAKING_GENESIS = 1600387200
@@ -273,32 +273,3 @@ export function useDerivedStakeInfo(
error,
}
}
-
-// based on typed value
-export function useDerivedUnstakeInfo(
- typedValue: string,
- stakingAmount: CurrencyAmount
-): {
- parsedAmount?: CurrencyAmount
- error?: string
-} {
- const { account } = useActiveWeb3React()
-
- const parsedInput: CurrencyAmount | undefined = tryParseAmount(typedValue, stakingAmount.currency)
-
- const parsedAmount =
- parsedInput && JSBI.lessThanOrEqual(parsedInput.quotient, stakingAmount.quotient) ? parsedInput : undefined
-
- let error: string | undefined
- if (!account) {
- error = t`Connect Wallet`
- }
- if (!parsedAmount) {
- error = error ?? t`Enter an amount`
- }
-
- return {
- parsedAmount,
- error,
- }
-}
diff --git a/src/state/user/actions.ts b/src/state/user/actions.ts
index 0211b1999..38a30272e 100644
--- a/src/state/user/actions.ts
+++ b/src/state/user/actions.ts
@@ -32,4 +32,3 @@ export const removeSerializedToken = createAction<{ chainId: number; address: st
export const addSerializedPair = createAction<{ serializedPair: SerializedPair }>('user/addSerializedPair')
export const removeSerializedPair =
createAction<{ chainId: number; tokenAAddress: string; tokenBAddress: string }>('user/removeSerializedPair')
-export const toggleURLWarning = createAction('app/toggleURLWarning')
diff --git a/src/state/user/hooks.tsx b/src/state/user/hooks.tsx
index 9c42bc168..449a8e05f 100644
--- a/src/state/user/hooks.tsx
+++ b/src/state/user/hooks.tsx
@@ -17,7 +17,6 @@ import {
removeSerializedToken,
SerializedPair,
SerializedToken,
- toggleURLWarning,
updateArbitrumAlphaAcknowledged,
updateHideClosedPositions,
updateUserDarkMode,
@@ -250,11 +249,6 @@ export function useURLWarningVisible(): boolean {
return useAppSelector((state: AppState) => state.user.URLWarningVisible)
}
-export function useURLWarningToggle(): () => void {
- const dispatch = useAppDispatch()
- return useCallback(() => dispatch(toggleURLWarning()), [dispatch])
-}
-
/**
* Given two tokens return the liquidity token that represents its liquidity shares
* @param tokenA one of the two tokens
diff --git a/src/state/user/reducer.ts b/src/state/user/reducer.ts
index 1053a58eb..3326d7ea4 100644
--- a/src/state/user/reducer.ts
+++ b/src/state/user/reducer.ts
@@ -13,7 +13,6 @@ import {
updateUserExpertMode,
updateUserSlippageTolerance,
updateUserDeadline,
- toggleURLWarning,
updateUserSingleHopOnly,
updateHideClosedPositions,
updateUserLocale,
@@ -189,7 +188,4 @@ export default createReducer(initialState, (builder) =>
}
state.timestamp = currentTimestamp()
})
- .addCase(toggleURLWarning, (state) => {
- state.URLWarningVisible = !state.URLWarningVisible
- })
)
diff --git a/src/theme/components.tsx b/src/theme/components.tsx
index 0f49ccf7b..f0ddb6481 100644
--- a/src/theme/components.tsx
+++ b/src/theme/components.tsx
@@ -1,4 +1,3 @@
-import { darken } from 'polished'
import React, { HTMLProps } from 'react'
import { ArrowLeft, ExternalLink as LinkIconFeather, Trash, X } from 'react-feather'
import ReactGA from 'react-ga'
@@ -24,36 +23,6 @@ export const ButtonText = styled.button`
}
`
-export const Button = styled.button.attrs<{ warning: boolean }, { backgroundColor: string }>(({ warning, theme }) => ({
- backgroundColor: warning ? theme.red1 : theme.primary1,
-}))`
- padding: 1rem 2rem 1rem 2rem;
- border-radius: 3rem;
- cursor: pointer;
- user-select: none;
- font-size: 1rem;
- border: none;
- outline: none;
- background-color: ${({ backgroundColor }) => backgroundColor};
- color: ${({ theme }) => theme.white};
- width: 100%;
-
- :hover,
- :focus {
- background-color: ${({ backgroundColor }) => darken(0.05, backgroundColor)};
- }
-
- :active {
- background-color: ${({ backgroundColor }) => darken(0.1, backgroundColor)};
- }
-
- :disabled {
- background-color: ${({ theme }) => theme.bg1};
- color: ${({ theme }) => theme.text4};
- cursor: auto;
- }
-`
-
export const CloseIcon = styled(X)<{ onClick: () => void }>`
cursor: pointer;
`
@@ -159,7 +128,7 @@ const LinkIconWrapper = styled.a`
}
`
-export const LinkIcon = styled(LinkIconFeather)`
+const LinkIcon = styled(LinkIconFeather)`
height: 16px;
width: 18px;
margin-left: 10px;
@@ -251,7 +220,7 @@ const rotate = keyframes`
}
`
-export const Spinner = styled.img`
+const Spinner = styled.img`
animation: 2s ${rotate} linear infinite;
width: 16px;
height: 16px;
@@ -291,10 +260,3 @@ export const SmallOnly = styled.span`
display: block;
`};
`
-
-export const ExtraSmallOnly = styled.span`
- display: none;
- ${({ theme }) => theme.mediaWidth.upToExtraSmall`
- display: block;
- `};
-`
diff --git a/src/theme/index.tsx b/src/theme/index.tsx
index 1c47dae4a..a0d00c742 100644
--- a/src/theme/index.tsx
+++ b/src/theme/index.tsx
@@ -35,7 +35,7 @@ const mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: typeof css }
const white = '#FFFFFF'
const black = '#000000'
-export function colors(darkMode: boolean): Colors {
+function colors(darkMode: boolean): Colors {
return {
// base
white,
@@ -96,7 +96,7 @@ export function colors(darkMode: boolean): Colors {
}
}
-export function theme(darkMode: boolean): DefaultTheme {
+function theme(darkMode: boolean): DefaultTheme {
return {
...colors(darkMode),
diff --git a/src/theme/styled.d.ts b/src/theme/styled.d.ts
index 0a748bb7e..1439363c3 100644
--- a/src/theme/styled.d.ts
+++ b/src/theme/styled.d.ts
@@ -57,12 +57,6 @@ export interface Colors {
warning: Color
}
-export interface Grids {
- sm: number
- md: number
- lg: number
-}
-
declare module 'styled-components' {
export interface DefaultTheme extends Colors {
grids: Grids
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 0b279b429..8e8666a7e 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -25,12 +25,12 @@ export function shortenAddress(address: string, chars = 4): string {
}
// account is not optional
-export function getSigner(library: Web3Provider, account: string): JsonRpcSigner {
+function getSigner(library: Web3Provider, account: string): JsonRpcSigner {
return library.getSigner(account).connectUnchecked()
}
// account is optional
-export function getProviderOrSigner(library: Web3Provider, account?: string): Web3Provider | JsonRpcSigner {
+function getProviderOrSigner(library: Web3Provider, account?: string): Web3Provider | JsonRpcSigner {
return account ? getSigner(library, account) : library
}
diff --git a/src/utils/retry.ts b/src/utils/retry.ts
index 39f7f0923..2916c0f50 100644
--- a/src/utils/retry.ts
+++ b/src/utils/retry.ts
@@ -9,7 +9,7 @@ function waitRandom(min: number, max: number): Promise {
/**
* This error is thrown if the function is cancelled before completing
*/
-export class CancelledError extends Error {
+class CancelledError extends Error {
public isCancelledError: true = true
constructor() {
super('Cancelled')