Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
ac962fb0
Unverified
Commit
ac962fb0
authored
Jan 12, 2022
by
Zach Pomerantz
Committed by
GitHub
Jan 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: separate useActiveWeb3React (#3106)
parent
f3bcf641
Changes
102
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
102 changed files
with
104 additions
and
109 deletions
+104
-109
Transaction.tsx
src/components/AccountDetails/Transaction.tsx
+1
-1
index.tsx
src/components/AccountDetails/index.tsx
+1
-1
index.tsx
src/components/AddressInputPanel/index.tsx
+1
-1
index.tsx
src/components/Blocklist/index.tsx
+1
-2
index.tsx
src/components/CurrencyInputPanel/index.tsx
+1
-1
index.tsx
src/components/DowntimeWarning/index.tsx
+1
-1
index.tsx
src/components/FeeSelector/index.tsx
+1
-1
ChainConnectivityWarning.tsx
src/components/Header/ChainConnectivityWarning.tsx
+1
-1
NetworkSelector.tsx
src/components/Header/NetworkSelector.tsx
+1
-1
Polling.tsx
src/components/Header/Polling.tsx
+1
-1
index.tsx
src/components/Header/index.tsx
+1
-1
index.tsx
src/components/Identicon/index.tsx
+1
-2
index.tsx
src/components/Menu/index.tsx
+1
-1
index.tsx
src/components/ModalViews/index.tsx
+1
-1
NetworkAlert.tsx
src/components/NetworkAlert/NetworkAlert.tsx
+1
-1
ClaimPopup.tsx
src/components/Popups/ClaimPopup.tsx
+1
-1
TransactionPopup.tsx
src/components/Popups/TransactionPopup.tsx
+1
-1
index.tsx
src/components/Popups/index.tsx
+1
-1
V2.tsx
src/components/PositionCard/V2.tsx
+1
-1
index.tsx
src/components/PositionCard/index.tsx
+1
-1
CurrencyList.tsx
src/components/SearchModal/CurrencyList.tsx
+1
-1
CurrencySearch.tsx
src/components/SearchModal/CurrencySearch.tsx
+1
-1
ManageLists.tsx
src/components/SearchModal/ManageLists.tsx
+1
-1
ManageTokens.tsx
src/components/SearchModal/ManageTokens.tsx
+1
-1
TokenImportCard.tsx
src/components/SearchModal/TokenImportCard.tsx
+1
-1
index.tsx
src/components/Settings/index.tsx
+1
-1
index.tsx
src/components/TransactionConfirmationModal/index.tsx
+1
-1
index.tsx
src/components/TransactionSettings/index.tsx
+1
-1
GoogleAnalyticsReporter.tsx
src/components/analytics/GoogleAnalyticsReporter.tsx
+1
-1
AddressClaimModal.tsx
src/components/claim/AddressClaimModal.tsx
+1
-1
ClaimModal.tsx
src/components/claim/ClaimModal.tsx
+1
-1
ClaimRewardModal.tsx
src/components/earn/ClaimRewardModal.tsx
+1
-1
StakingModal.tsx
src/components/earn/StakingModal.tsx
+1
-1
UnstakingModal.tsx
src/components/earn/UnstakingModal.tsx
+1
-1
AdvancedSwapDetails.tsx
src/components/swap/AdvancedSwapDetails.tsx
+1
-1
SwapDetailsDropdown.tsx
src/components/swap/SwapDetailsDropdown.tsx
+1
-1
SwapRoute.tsx
src/components/swap/SwapRoute.tsx
+1
-1
UnsupportedCurrencyFooter.tsx
src/components/swap/UnsupportedCurrencyFooter.tsx
+1
-1
DelegateModal.tsx
src/components/vote/DelegateModal.tsx
+1
-1
ProposalEmptyState.tsx
src/components/vote/ProposalEmptyState.tsx
+1
-1
VoteModal.tsx
src/components/vote/VoteModal.tsx
+1
-1
Tokens.ts
src/hooks/Tokens.ts
+1
-1
useAddTokenToMetamask.ts
src/hooks/useAddTokenToMetamask.ts
+1
-1
useAllV3Routes.ts
src/hooks/useAllV3Routes.ts
+1
-1
useApproveCallback.ts
src/hooks/useApproveCallback.ts
+1
-1
useArgentWalletContract.ts
src/hooks/useArgentWalletContract.ts
+2
-1
useAutoRouterSupported.tsx
src/hooks/useAutoRouterSupported.tsx
+1
-2
useClientSideV3Trade.ts
src/hooks/useClientSideV3Trade.ts
+1
-1
useContract.ts
src/hooks/useContract.ts
+1
-2
useENSAvatar.ts
src/hooks/useENSAvatar.ts
+1
-1
useERC20Permit.ts
src/hooks/useERC20Permit.ts
+1
-1
useFetchListCallback.ts
src/hooks/useFetchListCallback.ts
+1
-1
useIsArgentWallet.ts
src/hooks/useIsArgentWallet.ts
+1
-1
useMonitoringEventCallback.ts
src/hooks/useMonitoringEventCallback.ts
+1
-2
usePools.ts
src/hooks/usePools.ts
+1
-1
useSocksBalance.ts
src/hooks/useSocksBalance.ts
+1
-2
useSwapCallback.tsx
src/hooks/useSwapCallback.tsx
+1
-1
useSwapSlippageTolerance.ts
src/hooks/useSwapSlippageTolerance.ts
+1
-1
useTokenInfoFromActiveList.ts
src/hooks/useTokenInfoFromActiveList.ts
+1
-1
useTransactionDeadline.ts
src/hooks/useTransactionDeadline.ts
+1
-1
useUSDCPrice.ts
src/hooks/useUSDCPrice.ts
+1
-1
useV3SwapPools.ts
src/hooks/useV3SwapPools.ts
+1
-1
useWrapCallback.tsx
src/hooks/useWrapCallback.tsx
+1
-1
web3.ts
src/hooks/web3.ts
+0
-2
index.tsx
src/pages/AddLiquidity/index.tsx
+1
-1
redirects.tsx
src/pages/AddLiquidity/redirects.tsx
+1
-1
index.tsx
src/pages/AddLiquidityV2/index.tsx
+1
-1
index.tsx
src/pages/CreateProposal/index.tsx
+1
-1
Manage.tsx
src/pages/Earn/Manage.tsx
+1
-1
index.tsx
src/pages/Earn/index.tsx
+1
-1
MigrateV2Pair.tsx
src/pages/MigrateV2/MigrateV2Pair.tsx
+1
-1
index.tsx
src/pages/MigrateV2/index.tsx
+1
-1
CTACards.tsx
src/pages/Pool/CTACards.tsx
+1
-1
PositionPage.tsx
src/pages/Pool/PositionPage.tsx
+1
-1
index.tsx
src/pages/Pool/index.tsx
+1
-1
v2.tsx
src/pages/Pool/v2.tsx
+1
-1
index.tsx
src/pages/PoolFinder/index.tsx
+1
-1
V3.tsx
src/pages/RemoveLiquidity/V3.tsx
+1
-1
index.tsx
src/pages/RemoveLiquidity/index.tsx
+1
-1
index.tsx
src/pages/Swap/index.tsx
+1
-1
Landing.tsx
src/pages/Vote/Landing.tsx
+1
-1
VotePage.tsx
src/pages/Vote/VotePage.tsx
+1
-1
hooks.ts
src/state/application/hooks.ts
+1
-1
updater.ts
src/state/application/updater.ts
+1
-1
hooks.tsx
src/state/burn/hooks.tsx
+1
-1
hooks.tsx
src/state/burn/v3/hooks.tsx
+1
-1
hooks.ts
src/state/claim/hooks.ts
+1
-1
hooks.ts
src/state/governance/hooks.ts
+1
-1
updater.ts
src/state/lists/updater.ts
+1
-1
hooks.ts
src/state/logs/hooks.ts
+1
-1
updater.ts
src/state/logs/updater.ts
+1
-1
hooks.tsx
src/state/mint/hooks.tsx
+1
-1
hooks.tsx
src/state/mint/v3/hooks.tsx
+1
-1
hooks.ts
src/state/multicall/hooks.ts
+2
-1
updater.tsx
src/state/multicall/updater.tsx
+2
-1
hooks.tsx
src/state/stake/hooks.tsx
+1
-1
hooks.tsx
src/state/swap/hooks.tsx
+1
-1
hooks.tsx
src/state/transactions/hooks.tsx
+1
-1
updater.tsx
src/state/transactions/updater.tsx
+1
-1
hooks.tsx
src/state/user/hooks.tsx
+1
-1
hooks.ts
src/state/wallet/hooks.ts
+1
-1
RadialGradientByChainUpdater.ts
src/theme/RadialGradientByChainUpdater.ts
+1
-1
No files found.
src/components/AccountDetails/Transaction.tsx
View file @
ac962fb0
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
CheckCircle
,
Triangle
}
from
'
react-feather
'
import
{
CheckCircle
,
Triangle
}
from
'
react-feather
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useAllTransactions
}
from
'
../../state/transactions/hooks
'
import
{
useAllTransactions
}
from
'
../../state/transactions/hooks
'
import
{
ExternalLink
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
...
...
src/components/AccountDetails/index.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
AbstractConnector
}
from
'
@web3-react/abstract-connector
'
import
{
AbstractConnector
}
from
'
@web3-react/abstract-connector
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useContext
}
from
'
react
'
import
{
useCallback
,
useContext
}
from
'
react
'
import
{
ExternalLink
as
LinkIcon
}
from
'
react-feather
'
import
{
ExternalLink
as
LinkIcon
}
from
'
react-feather
'
import
{
useAppDispatch
}
from
'
state/hooks
'
import
{
useAppDispatch
}
from
'
state/hooks
'
...
@@ -9,7 +10,6 @@ import { Connector } from 'widgets-web3-react/types'
...
@@ -9,7 +10,6 @@ import { Connector } from 'widgets-web3-react/types'
import
{
ReactComponent
as
Close
}
from
'
../../assets/images/x.svg
'
import
{
ReactComponent
as
Close
}
from
'
../../assets/images/x.svg
'
import
{
injected
,
portis
,
walletlink
}
from
'
../../connectors
'
import
{
injected
,
portis
,
walletlink
}
from
'
../../connectors
'
import
{
SUPPORTED_WALLETS
}
from
'
../../constants/wallet
'
import
{
SUPPORTED_WALLETS
}
from
'
../../constants/wallet
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
clearAllTransactions
}
from
'
../../state/transactions/actions
'
import
{
clearAllTransactions
}
from
'
../../state/transactions/actions
'
import
{
ExternalLink
,
LinkStyledButton
,
ThemedText
}
from
'
../../theme
'
import
{
ExternalLink
,
LinkStyledButton
,
ThemedText
}
from
'
../../theme
'
import
{
shortenAddress
}
from
'
../../utils
'
import
{
shortenAddress
}
from
'
../../utils
'
...
...
src/components/AddressInputPanel/index.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
// eslint-disable-next-line no-restricted-imports
// eslint-disable-next-line no-restricted-imports
import
{
t
}
from
'
@lingui/macro
'
import
{
t
}
from
'
@lingui/macro
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
ReactNode
,
useCallback
,
useContext
}
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
{
ExternalLink
,
ThemedText
}
from
'
../../theme
'
import
{
ExternalLink
,
ThemedText
}
from
'
../../theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
AutoColumn
}
from
'
../Column
'
import
{
AutoColumn
}
from
'
../Column
'
...
...
src/components/Blocklist/index.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
ReactNode
,
useMemo
}
from
'
react
'
import
{
ReactNode
,
useMemo
}
from
'
react
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
// SDN OFAC addresses
// SDN OFAC addresses
const
BLOCKED_ADDRESSES
:
string
[]
=
[
const
BLOCKED_ADDRESSES
:
string
[]
=
[
'
0x7Db418b5D567A4e0E8c59Ad71BE1FcE48f3E6107
'
,
'
0x7Db418b5D567A4e0E8c59Ad71BE1FcE48f3E6107
'
,
...
...
src/components/CurrencyInputPanel/index.tsx
View file @
ac962fb0
...
@@ -3,6 +3,7 @@ import { Currency, CurrencyAmount, Percent, Token } from '@uniswap/sdk-core'
...
@@ -3,6 +3,7 @@ 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
{
LoadingOpacityContainer
,
loadingOpacityMixin
}
from
'
components/Loader/styled
'
import
{
LoadingOpacityContainer
,
loadingOpacityMixin
}
from
'
components/Loader/styled
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
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
'
...
@@ -11,7 +12,6 @@ import { formatCurrencyAmount } from 'utils/formatCurrencyAmount'
...
@@ -11,7 +12,6 @@ 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
{
useCurrencyBalance
}
from
'
../../state/wallet/hooks
'
import
{
useCurrencyBalance
}
from
'
../../state/wallet/hooks
'
import
{
ThemedText
}
from
'
../../theme
'
import
{
ThemedText
}
from
'
../../theme
'
import
{
ButtonGray
}
from
'
../Button
'
import
{
ButtonGray
}
from
'
../Button
'
...
...
src/components/DowntimeWarning/index.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
AlertOctagon
}
from
'
react-feather
'
import
{
AlertOctagon
}
from
'
react-feather
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
ExternalLink
}
from
'
theme
'
import
{
ExternalLink
}
from
'
theme
'
...
...
src/components/FeeSelector/index.tsx
View file @
ac962fb0
...
@@ -5,10 +5,10 @@ import { ButtonGray } from 'components/Button'
...
@@ -5,10 +5,10 @@ import { ButtonGray } from 'components/Button'
import
Card
from
'
components/Card
'
import
Card
from
'
components/Card
'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
RowBetween
}
from
'
components/Row
'
import
{
RowBetween
}
from
'
components/Row
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useFeeTierDistribution
}
from
'
hooks/useFeeTierDistribution
'
import
{
useFeeTierDistribution
}
from
'
hooks/useFeeTierDistribution
'
import
{
PoolState
,
usePools
}
from
'
hooks/usePools
'
import
{
PoolState
,
usePools
}
from
'
hooks/usePools
'
import
usePrevious
from
'
hooks/usePrevious
'
import
usePrevious
from
'
hooks/usePrevious
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
DynamicSection
}
from
'
pages/AddLiquidity/styled
'
import
{
DynamicSection
}
from
'
pages/AddLiquidity/styled
'
import
React
,
{
useCallback
,
useEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
React
,
{
useCallback
,
useEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
ReactGA
from
'
react-ga
'
import
ReactGA
from
'
react-ga
'
...
...
src/components/Header/ChainConnectivityWarning.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
CHAIN_INFO
,
L2ChainInfo
}
from
'
constants/chainInfo
'
import
{
CHAIN_INFO
,
L2ChainInfo
}
from
'
constants/chainInfo
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
AlertOctagon
}
from
'
react-feather
'
import
{
AlertOctagon
}
from
'
react-feather
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
ExternalLink
,
MEDIA_WIDTHS
}
from
'
theme
'
import
{
ExternalLink
,
MEDIA_WIDTHS
}
from
'
theme
'
...
...
src/components/Header/NetworkSelector.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useOnClickOutside
}
from
'
hooks/useOnClickOutside
'
import
{
useOnClickOutside
}
from
'
hooks/useOnClickOutside
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
useCallback
,
useRef
}
from
'
react
'
import
{
useCallback
,
useRef
}
from
'
react
'
import
{
ArrowDownCircle
,
ChevronDown
}
from
'
react-feather
'
import
{
ArrowDownCircle
,
ChevronDown
}
from
'
react-feather
'
import
{
useModalOpen
,
useToggleModal
}
from
'
state/application/hooks
'
import
{
useModalOpen
,
useToggleModal
}
from
'
state/application/hooks
'
...
...
src/components/Header/Polling.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
RowFixed
}
from
'
components/Row
'
import
{
RowFixed
}
from
'
components/Row
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
useGasPrice
from
'
hooks/useGasPrice
'
import
useGasPrice
from
'
hooks/useGasPrice
'
import
useMachineTimeMs
from
'
hooks/useMachineTime
'
import
useMachineTimeMs
from
'
hooks/useMachineTime
'
import
useTheme
from
'
hooks/useTheme
'
import
useTheme
from
'
hooks/useTheme
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
ms
from
'
ms.macro
'
import
ms
from
'
ms.macro
'
import
{
useEffect
,
useState
}
from
'
react
'
import
{
useEffect
,
useState
}
from
'
react
'
...
...
src/components/Header/index.tsx
View file @
ac962fb0
...
@@ -2,6 +2,7 @@ import { Trans } from '@lingui/macro'
...
@@ -2,6 +2,7 @@ import { Trans } from '@lingui/macro'
import
useScrollPosition
from
'
@react-hook/window-scroll
'
import
useScrollPosition
from
'
@react-hook/window-scroll
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useTheme
from
'
hooks/useTheme
'
import
useTheme
from
'
hooks/useTheme
'
import
{
darken
}
from
'
polished
'
import
{
darken
}
from
'
polished
'
import
{
NavLink
}
from
'
react-router-dom
'
import
{
NavLink
}
from
'
react-router-dom
'
...
@@ -14,7 +15,6 @@ import { useNativeCurrencyBalances } from 'state/wallet/hooks'
...
@@ -14,7 +15,6 @@ import { useNativeCurrencyBalances } 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
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
ExternalLink
,
ThemedText
}
from
'
../../theme
'
import
{
ExternalLink
,
ThemedText
}
from
'
../../theme
'
import
ClaimModal
from
'
../claim/ClaimModal
'
import
ClaimModal
from
'
../claim/ClaimModal
'
import
{
CardNoise
}
from
'
../earn/styled
'
import
{
CardNoise
}
from
'
../earn/styled
'
...
...
src/components/Identicon/index.tsx
View file @
ac962fb0
import
jazzicon
from
'
@metamask/jazzicon
'
import
jazzicon
from
'
@metamask/jazzicon
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useENSAvatar
from
'
hooks/useENSAvatar
'
import
useENSAvatar
from
'
hooks/useENSAvatar
'
import
{
useLayoutEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
{
useLayoutEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
const
StyledIdenticon
=
styled
.
div
`
const
StyledIdenticon
=
styled
.
div
`
height: 1rem;
height: 1rem;
width: 1rem;
width: 1rem;
...
...
src/components/Menu/index.tsx
View file @
ac962fb0
...
@@ -4,6 +4,7 @@ import { PrivacyPolicyModal } from 'components/PrivacyPolicy'
...
@@ -4,6 +4,7 @@ import { PrivacyPolicyModal } from 'components/PrivacyPolicy'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
LOCALE_LABEL
,
SUPPORTED_LOCALES
,
SupportedLocale
}
from
'
constants/locales
'
import
{
LOCALE_LABEL
,
SUPPORTED_LOCALES
,
SupportedLocale
}
from
'
constants/locales
'
import
{
useActiveLocale
}
from
'
hooks/useActiveLocale
'
import
{
useActiveLocale
}
from
'
hooks/useActiveLocale
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useLocationLinkProps
}
from
'
hooks/useLocationLinkProps
'
import
{
useLocationLinkProps
}
from
'
hooks/useLocationLinkProps
'
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'
react
'
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'
react
'
import
{
import
{
...
@@ -25,7 +26,6 @@ import styled, { css } from 'styled-components/macro'
...
@@ -25,7 +26,6 @@ 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
{
useOnClickOutside
}
from
'
../../hooks/useOnClickOutside
'
import
{
useOnClickOutside
}
from
'
../../hooks/useOnClickOutside
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useModalOpen
,
useToggleModal
}
from
'
../../state/application/hooks
'
import
{
useModalOpen
,
useToggleModal
}
from
'
../../state/application/hooks
'
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
ExternalLink
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme
'
...
...
src/components/ModalViews/index.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useContext
}
from
'
react
'
import
{
useContext
}
from
'
react
'
import
{
ArrowUpCircle
}
from
'
react-feather
'
import
{
ArrowUpCircle
}
from
'
react-feather
'
import
styled
,
{
ThemeContext
}
from
'
styled-components/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
,
ThemedText
}
from
'
../../theme
'
import
{
CloseIcon
,
CustomLightSpinner
,
ThemedText
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme/components
'
import
{
ExternalLink
}
from
'
../../theme/components
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
...
...
src/components/NetworkAlert/NetworkAlert.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
ArrowUpRight
}
from
'
react-feather
'
import
{
ArrowUpRight
}
from
'
react-feather
'
import
{
useDarkModeManager
}
from
'
state/user/hooks
'
import
{
useDarkModeManager
}
from
'
state/user/hooks
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
...
...
src/components/Popups/ClaimPopup.tsx
View file @
ac962fb0
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
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useEffect
}
from
'
react
'
import
{
useCallback
,
useEffect
}
from
'
react
'
import
{
Heart
,
X
}
from
'
react-feather
'
import
{
Heart
,
X
}
from
'
react-feather
'
import
ReactGA
from
'
react-ga
'
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
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
import
{
useModalOpen
,
useModalOpen
,
useShowClaimPopup
,
useShowClaimPopup
,
...
...
src/components/Popups/TransactionPopup.tsx
View file @
ac962fb0
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
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
{
useTransaction
}
from
'
../../state/transactions/hooks
'
import
{
useTransaction
}
from
'
../../state/transactions/hooks
'
import
{
ThemedText
}
from
'
../../theme
'
import
{
ThemedText
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme
'
...
...
src/components/Popups/index.tsx
View file @
ac962fb0
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
MEDIA_WIDTHS
}
from
'
theme
'
import
{
MEDIA_WIDTHS
}
from
'
theme
'
...
...
src/components/PositionCard/V2.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
CurrencyAmount
,
Percent
,
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
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
transparentize
}
from
'
polished
'
import
{
transparentize
}
from
'
polished
'
import
{
useState
}
from
'
react
'
import
{
useState
}
from
'
react
'
...
@@ -12,7 +13,6 @@ import styled from 'styled-components/macro'
...
@@ -12,7 +13,6 @@ import styled from 'styled-components/macro'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
useColor
}
from
'
../../hooks/useColor
'
import
{
useColor
}
from
'
../../hooks/useColor
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
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
'
...
...
src/components/PositionCard/index.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
CurrencyAmount
,
Percent
,
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
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
transparentize
}
from
'
polished
'
import
{
transparentize
}
from
'
polished
'
import
{
useState
}
from
'
react
'
import
{
useState
}
from
'
react
'
...
@@ -12,7 +13,6 @@ import styled from 'styled-components/macro'
...
@@ -12,7 +13,6 @@ import styled from 'styled-components/macro'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
useColor
}
from
'
../../hooks/useColor
'
import
{
useColor
}
from
'
../../hooks/useColor
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
ExternalLink
,
ThemedText
}
from
'
../../theme
'
import
{
ExternalLink
,
ThemedText
}
from
'
../../theme
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
...
...
src/components/SearchModal/CurrencyList.tsx
View file @
ac962fb0
...
@@ -2,6 +2,7 @@ import { Trans } from '@lingui/macro'
...
@@ -2,6 +2,7 @@ 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
{
LightGreyCard
}
from
'
components/Card
'
import
QuestionHelper
from
'
components/QuestionHelper
'
import
QuestionHelper
from
'
components/QuestionHelper
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useTheme
from
'
hooks/useTheme
'
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
'
...
@@ -10,7 +11,6 @@ import styled from 'styled-components/macro'
...
@@ -10,7 +11,6 @@ import styled from 'styled-components/macro'
import
TokenListLogo
from
'
../../assets/svg/tokenlist.svg
'
import
TokenListLogo
from
'
../../assets/svg/tokenlist.svg
'
import
{
useIsUserAddedToken
}
from
'
../../hooks/Tokens
'
import
{
useIsUserAddedToken
}
from
'
../../hooks/Tokens
'
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
'
...
...
src/components/SearchModal/CurrencySearch.tsx
View file @
ac962fb0
// eslint-disable-next-line no-restricted-imports
// eslint-disable-next-line no-restricted-imports
import
{
t
,
Trans
}
from
'
@lingui/macro
'
import
{
t
,
Trans
}
from
'
@lingui/macro
'
import
{
Currency
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Token
}
from
'
@uniswap/sdk-core
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useDebounce
from
'
hooks/useDebounce
'
import
useDebounce
from
'
hooks/useDebounce
'
import
{
useOnClickOutside
}
from
'
hooks/useOnClickOutside
'
import
{
useOnClickOutside
}
from
'
hooks/useOnClickOutside
'
import
useTheme
from
'
hooks/useTheme
'
import
useTheme
from
'
hooks/useTheme
'
...
@@ -20,7 +21,6 @@ import {
...
@@ -20,7 +21,6 @@ import {
useSearchInactiveTokenLists
,
useSearchInactiveTokenLists
,
useToken
,
useToken
,
}
from
'
../../hooks/Tokens
'
}
from
'
../../hooks/Tokens
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
ButtonText
,
CloseIcon
,
IconWrapper
,
ThemedText
}
from
'
../../theme
'
import
{
ButtonText
,
CloseIcon
,
IconWrapper
,
ThemedText
}
from
'
../../theme
'
import
{
isAddress
}
from
'
../../utils
'
import
{
isAddress
}
from
'
../../utils
'
import
Column
from
'
../Column
'
import
Column
from
'
../Column
'
...
...
src/components/SearchModal/ManageLists.tsx
View file @
ac962fb0
...
@@ -3,8 +3,8 @@ import { t, Trans } from '@lingui/macro'
...
@@ -3,8 +3,8 @@ import { t, Trans } from '@lingui/macro'
import
{
TokenList
}
from
'
@uniswap/token-lists
'
import
{
TokenList
}
from
'
@uniswap/token-lists
'
import
Card
from
'
components/Card
'
import
Card
from
'
components/Card
'
import
{
UNSUPPORTED_LIST_URLS
}
from
'
constants/lists
'
import
{
UNSUPPORTED_LIST_URLS
}
from
'
constants/lists
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useListColor
}
from
'
hooks/useColor
'
import
{
useListColor
}
from
'
hooks/useColor
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
parseENSAddress
from
'
lib/utils/parseENSAddress
'
import
parseENSAddress
from
'
lib/utils/parseENSAddress
'
import
uriToHttp
from
'
lib/utils/uriToHttp
'
import
uriToHttp
from
'
lib/utils/uriToHttp
'
import
{
memo
,
useCallback
,
useEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
{
memo
,
useCallback
,
useEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
...
...
src/components/SearchModal/ManageTokens.tsx
View file @
ac962fb0
...
@@ -5,7 +5,7 @@ import Column from 'components/Column'
...
@@ -5,7 +5,7 @@ import Column from 'components/Column'
import
CurrencyLogo
from
'
components/CurrencyLogo
'
import
CurrencyLogo
from
'
components/CurrencyLogo
'
import
Row
,
{
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
Row
,
{
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
{
useToken
}
from
'
hooks/Tokens
'
import
{
useToken
}
from
'
hooks/Tokens
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
RefObject
,
useCallback
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
{
RefObject
,
useCallback
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
{
useRemoveUserAddedToken
,
useUserAddedTokens
}
from
'
state/user/hooks
'
import
{
useRemoveUserAddedToken
,
useUserAddedTokens
}
from
'
state/user/hooks
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
...
...
src/components/SearchModal/TokenImportCard.tsx
View file @
ac962fb0
...
@@ -6,7 +6,7 @@ import { AutoColumn } from 'components/Column'
...
@@ -6,7 +6,7 @@ import { AutoColumn } from 'components/Column'
import
CurrencyLogo
from
'
components/CurrencyLogo
'
import
CurrencyLogo
from
'
components/CurrencyLogo
'
import
ListLogo
from
'
components/ListLogo
'
import
ListLogo
from
'
components/ListLogo
'
import
{
RowFixed
}
from
'
components/Row
'
import
{
RowFixed
}
from
'
components/Row
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
transparentize
}
from
'
polished
'
import
{
transparentize
}
from
'
polished
'
import
{
AlertCircle
}
from
'
react-feather
'
import
{
AlertCircle
}
from
'
react-feather
'
import
styled
,
{
useTheme
}
from
'
styled-components/macro
'
import
styled
,
{
useTheme
}
from
'
styled-components/macro
'
...
...
src/components/Settings/index.tsx
View file @
ac962fb0
// eslint-disable-next-line no-restricted-imports
// eslint-disable-next-line no-restricted-imports
import
{
t
,
Trans
}
from
'
@lingui/macro
'
import
{
t
,
Trans
}
from
'
@lingui/macro
'
import
{
Percent
}
from
'
@uniswap/sdk-core
'
import
{
Percent
}
from
'
@uniswap/sdk-core
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
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
'
...
...
src/components/TransactionConfirmationModal/index.tsx
View file @
ac962fb0
...
@@ -3,6 +3,7 @@ import { Currency } from '@uniswap/sdk-core'
...
@@ -3,6 +3,7 @@ import { Currency } from '@uniswap/sdk-core'
import
Badge
from
'
components/Badge
'
import
Badge
from
'
components/Badge
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
L2_CHAIN_IDS
,
SupportedL2ChainId
}
from
'
constants/chains
'
import
{
L2_CHAIN_IDS
,
SupportedL2ChainId
}
from
'
constants/chains
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useAddTokenToMetamask
from
'
hooks/useAddTokenToMetamask
'
import
useAddTokenToMetamask
from
'
hooks/useAddTokenToMetamask
'
import
{
ReactNode
,
useContext
}
from
'
react
'
import
{
ReactNode
,
useContext
}
from
'
react
'
import
{
AlertCircle
,
AlertTriangle
,
ArrowUpCircle
,
CheckCircle
}
from
'
react-feather
'
import
{
AlertCircle
,
AlertTriangle
,
ArrowUpCircle
,
CheckCircle
}
from
'
react-feather
'
...
@@ -12,7 +13,6 @@ import styled, { ThemeContext } from 'styled-components/macro'
...
@@ -12,7 +13,6 @@ 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
{
ExternalLink
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme
'
import
{
CloseIcon
,
CustomLightSpinner
}
from
'
../../theme
'
import
{
CloseIcon
,
CustomLightSpinner
}
from
'
../../theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
...
...
src/components/TransactionSettings/index.tsx
View file @
ac962fb0
...
@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
...
@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
import
{
Percent
}
from
'
@uniswap/sdk-core
'
import
{
Percent
}
from
'
@uniswap/sdk-core
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
DEFAULT_DEADLINE_FROM_NOW
}
from
'
constants/misc
'
import
{
DEFAULT_DEADLINE_FROM_NOW
}
from
'
constants/misc
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
ms
from
'
ms.macro
'
import
ms
from
'
ms.macro
'
import
{
darken
}
from
'
polished
'
import
{
darken
}
from
'
polished
'
import
{
useContext
,
useState
}
from
'
react
'
import
{
useContext
,
useState
}
from
'
react
'
...
...
src/components/analytics/GoogleAnalyticsReporter.tsx
View file @
ac962fb0
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useEffect
}
from
'
react
'
import
{
useEffect
}
from
'
react
'
import
ReactGA
from
'
react-ga
'
import
ReactGA
from
'
react-ga
'
import
{
RouteComponentProps
}
from
'
react-router-dom
'
import
{
RouteComponentProps
}
from
'
react-router-dom
'
...
...
src/components/claim/AddressClaimModal.tsx
View file @
ac962fb0
import
{
isAddress
}
from
'
@ethersproject/address
'
import
{
isAddress
}
from
'
@ethersproject/address
'
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
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useState
}
from
'
react
'
import
{
useState
}
from
'
react
'
import
{
Text
}
from
'
rebass
'
import
{
Text
}
from
'
rebass
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
...
@@ -8,7 +9,6 @@ import styled from 'styled-components/macro'
...
@@ -8,7 +9,6 @@ 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
useENS
from
'
../../hooks/useENS
'
import
useENS
from
'
../../hooks/useENS
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useClaimCallback
,
useUserHasAvailableClaim
,
useUserUnclaimedAmount
}
from
'
../../state/claim/hooks
'
import
{
useClaimCallback
,
useUserHasAvailableClaim
,
useUserUnclaimedAmount
}
from
'
../../state/claim/hooks
'
import
{
useIsTransactionPending
}
from
'
../../state/transactions/hooks
'
import
{
useIsTransactionPending
}
from
'
../../state/transactions/hooks
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
ThemedText
,
UniTokenAnimated
}
from
'
../../theme
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
ThemedText
,
UniTokenAnimated
}
from
'
../../theme
'
...
...
src/components/claim/ClaimModal.tsx
View file @
ac962fb0
import
{
isAddress
}
from
'
@ethersproject/address
'
import
{
isAddress
}
from
'
@ethersproject/address
'
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
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useEffect
,
useState
}
from
'
react
'
import
{
useEffect
,
useState
}
from
'
react
'
import
{
Text
}
from
'
rebass
'
import
{
Text
}
from
'
rebass
'
...
@@ -8,7 +9,6 @@ import styled from 'styled-components/macro'
...
@@ -8,7 +9,6 @@ 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
{
useModalOpen
,
useToggleSelfClaimModal
}
from
'
../../state/application/hooks
'
import
{
useModalOpen
,
useToggleSelfClaimModal
}
from
'
../../state/application/hooks
'
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
useClaimCallback
,
useUserClaimData
,
useUserUnclaimedAmount
}
from
'
../../state/claim/hooks
'
import
{
useClaimCallback
,
useUserClaimData
,
useUserUnclaimedAmount
}
from
'
../../state/claim/hooks
'
...
...
src/components/earn/ClaimRewardModal.tsx
View file @
ac962fb0
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
ReactNode
,
useState
}
from
'
react
'
import
{
ReactNode
,
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
{
StakingInfo
}
from
'
../../state/stake/hooks
'
import
{
StakingInfo
}
from
'
../../state/stake/hooks
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
...
...
src/components/earn/StakingModal.tsx
View file @
ac962fb0
...
@@ -2,6 +2,7 @@ import { TransactionResponse } from '@ethersproject/providers'
...
@@ -2,6 +2,7 @@ import { TransactionResponse } from '@ethersproject/providers'
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
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useState
}
from
'
react
'
import
{
useCallback
,
useState
}
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
...
@@ -9,7 +10,6 @@ import { ApprovalState, useApproveCallback } from '../../hooks/useApproveCallbac
...
@@ -9,7 +10,6 @@ import { ApprovalState, useApproveCallback } from '../../hooks/useApproveCallbac
import
{
usePairContract
,
useStakingContract
,
useV2RouterContract
}
from
'
../../hooks/useContract
'
import
{
usePairContract
,
useStakingContract
,
useV2RouterContract
}
from
'
../../hooks/useContract
'
import
{
useV2LiquidityTokenPermit
}
from
'
../../hooks/useERC20Permit
'
import
{
useV2LiquidityTokenPermit
}
from
'
../../hooks/useERC20Permit
'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
StakingInfo
,
useDerivedStakeInfo
}
from
'
../../state/stake/hooks
'
import
{
StakingInfo
,
useDerivedStakeInfo
}
from
'
../../state/stake/hooks
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
...
...
src/components/earn/UnstakingModal.tsx
View file @
ac962fb0
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
ReactNode
,
useState
}
from
'
react
'
import
{
ReactNode
,
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
{
StakingInfo
}
from
'
../../state/stake/hooks
'
import
{
StakingInfo
}
from
'
../../state/stake/hooks
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
...
...
src/components/swap/AdvancedSwapDetails.tsx
View file @
ac962fb0
...
@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
...
@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
import
{
Currency
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
Card
from
'
components/Card
'
import
Card
from
'
components/Card
'
import
{
LoadingRows
}
from
'
components/Loader/styled
'
import
{
LoadingRows
}
from
'
components/Loader/styled
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useContext
,
useMemo
}
from
'
react
'
import
{
useContext
,
useMemo
}
from
'
react
'
import
{
InterfaceTrade
}
from
'
state/routing/types
'
import
{
InterfaceTrade
}
from
'
state/routing/types
'
import
styled
,
{
ThemeContext
}
from
'
styled-components/macro
'
import
styled
,
{
ThemeContext
}
from
'
styled-components/macro
'
...
...
src/components/swap/SwapDetailsDropdown.tsx
View file @
ac962fb0
...
@@ -6,7 +6,7 @@ import { AutoColumn } from 'components/Column'
...
@@ -6,7 +6,7 @@ import { AutoColumn } from 'components/Column'
import
{
LoadingOpacityContainer
}
from
'
components/Loader/styled
'
import
{
LoadingOpacityContainer
}
from
'
components/Loader/styled
'
import
Row
,
{
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
Row
,
{
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
{
MouseoverTooltipContent
}
from
'
components/Tooltip
'
import
{
MouseoverTooltipContent
}
from
'
components/Tooltip
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
darken
}
from
'
polished
'
import
{
darken
}
from
'
polished
'
import
{
useState
}
from
'
react
'
import
{
useState
}
from
'
react
'
import
{
ChevronDown
,
Info
}
from
'
react-feather
'
import
{
ChevronDown
,
Info
}
from
'
react-feather
'
...
...
src/components/swap/SwapRoute.tsx
View file @
ac962fb0
...
@@ -7,8 +7,8 @@ import { AutoColumn } from 'components/Column'
...
@@ -7,8 +7,8 @@ import { AutoColumn } from 'components/Column'
import
{
LoadingRows
}
from
'
components/Loader/styled
'
import
{
LoadingRows
}
from
'
components/Loader/styled
'
import
RoutingDiagram
,
{
RoutingDiagramEntry
}
from
'
components/RoutingDiagram/RoutingDiagram
'
import
RoutingDiagram
,
{
RoutingDiagramEntry
}
from
'
components/RoutingDiagram/RoutingDiagram
'
import
{
AutoRow
,
RowBetween
}
from
'
components/Row
'
import
{
AutoRow
,
RowBetween
}
from
'
components/Row
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useAutoRouterSupported
from
'
hooks/useAutoRouterSupported
'
import
useAutoRouterSupported
from
'
hooks/useAutoRouterSupported
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
memo
,
useState
}
from
'
react
'
import
{
memo
,
useState
}
from
'
react
'
import
{
Plus
}
from
'
react-feather
'
import
{
Plus
}
from
'
react-feather
'
import
{
InterfaceTrade
}
from
'
state/routing/types
'
import
{
InterfaceTrade
}
from
'
state/routing/types
'
...
...
src/components/swap/UnsupportedCurrencyFooter.tsx
View file @
ac962fb0
...
@@ -6,7 +6,7 @@ import { AutoColumn } from 'components/Column'
...
@@ -6,7 +6,7 @@ import { AutoColumn } from 'components/Column'
import
CurrencyLogo
from
'
components/CurrencyLogo
'
import
CurrencyLogo
from
'
components/CurrencyLogo
'
import
Modal
from
'
components/Modal
'
import
Modal
from
'
components/Modal
'
import
{
AutoRow
,
RowBetween
}
from
'
components/Row
'
import
{
AutoRow
,
RowBetween
}
from
'
components/Row
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useState
}
from
'
react
'
import
{
useState
}
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
CloseIcon
,
ExternalLink
,
ThemedText
,
Z_INDEX
}
from
'
theme
'
import
{
CloseIcon
,
ExternalLink
,
ThemedText
,
Z_INDEX
}
from
'
theme
'
...
...
src/components/vote/DelegateModal.tsx
View file @
ac962fb0
import
{
isAddress
}
from
'
@ethersproject/address
'
import
{
isAddress
}
from
'
@ethersproject/address
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
ReactNode
,
useState
}
from
'
react
'
import
{
ReactNode
,
useState
}
from
'
react
'
import
{
X
}
from
'
react-feather
'
import
{
X
}
from
'
react-feather
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
...
@@ -7,7 +8,6 @@ import { formatCurrencyAmount } from 'utils/formatCurrencyAmount'
...
@@ -7,7 +8,6 @@ import { formatCurrencyAmount } from 'utils/formatCurrencyAmount'
import
{
UNI
}
from
'
../../constants/tokens
'
import
{
UNI
}
from
'
../../constants/tokens
'
import
useENS
from
'
../../hooks/useENS
'
import
useENS
from
'
../../hooks/useENS
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useDelegateCallback
}
from
'
../../state/governance/hooks
'
import
{
useDelegateCallback
}
from
'
../../state/governance/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
ThemedText
}
from
'
../../theme
'
import
{
ThemedText
}
from
'
../../theme
'
...
...
src/components/vote/ProposalEmptyState.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
ThemedText
}
from
'
theme
'
import
{
ThemedText
}
from
'
theme
'
...
...
src/components/vote/VoteModal.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useContext
,
useState
}
from
'
react
'
import
{
useContext
,
useState
}
from
'
react
'
import
{
ArrowUpCircle
,
X
}
from
'
react-feather
'
import
{
ArrowUpCircle
,
X
}
from
'
react-feather
'
import
styled
,
{
ThemeContext
}
from
'
styled-components/macro
'
import
styled
,
{
ThemeContext
}
from
'
styled-components/macro
'
import
{
formatCurrencyAmount
}
from
'
utils/formatCurrencyAmount
'
import
{
formatCurrencyAmount
}
from
'
utils/formatCurrencyAmount
'
import
Circle
from
'
../../assets/images/blue-loader.svg
'
import
Circle
from
'
../../assets/images/blue-loader.svg
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useUserVotes
,
useVoteCallback
}
from
'
../../state/governance/hooks
'
import
{
useUserVotes
,
useVoteCallback
}
from
'
../../state/governance/hooks
'
import
{
VoteOption
}
from
'
../../state/governance/types
'
import
{
VoteOption
}
from
'
../../state/governance/types
'
import
{
CustomLightSpinner
,
ThemedText
}
from
'
../../theme
'
import
{
CustomLightSpinner
,
ThemedText
}
from
'
../../theme
'
...
...
src/hooks/Tokens.ts
View file @
ac962fb0
...
@@ -3,6 +3,7 @@ import { parseBytes32String } from '@ethersproject/strings'
...
@@ -3,6 +3,7 @@ import { parseBytes32String } from '@ethersproject/strings'
import
{
Currency
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
L2_CHAIN_IDS
,
SupportedChainId
,
SupportedL2ChainId
}
from
'
constants/chains
'
import
{
L2_CHAIN_IDS
,
SupportedChainId
,
SupportedL2ChainId
}
from
'
constants/chains
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
createTokenFilterFunction
}
from
'
../components/SearchModal/filtering
'
import
{
createTokenFilterFunction
}
from
'
../components/SearchModal/filtering
'
...
@@ -14,7 +15,6 @@ import { useUserAddedTokens } from '../state/user/hooks'
...
@@ -14,7 +15,6 @@ import { useUserAddedTokens } from '../state/user/hooks'
import
{
isAddress
}
from
'
../utils
'
import
{
isAddress
}
from
'
../utils
'
import
{
TokenAddressMap
,
useUnsupportedTokenList
}
from
'
./../state/lists/hooks
'
import
{
TokenAddressMap
,
useUnsupportedTokenList
}
from
'
./../state/lists/hooks
'
import
{
useBytes32TokenContract
,
useTokenContract
}
from
'
./useContract
'
import
{
useBytes32TokenContract
,
useTokenContract
}
from
'
./useContract
'
import
{
useActiveWeb3React
}
from
'
./web3
'
// reduce token map into standard address <-> Token mapping, optionally include user added tokens
// reduce token map into standard address <-> Token mapping, optionally include user added tokens
function
useTokensFromMap
(
tokenMap
:
TokenAddressMap
,
includeUserAdded
:
boolean
):
{
[
address
:
string
]:
Token
}
{
function
useTokensFromMap
(
tokenMap
:
TokenAddressMap
,
includeUserAdded
:
boolean
):
{
[
address
:
string
]:
Token
}
{
...
...
src/hooks/useAddTokenToMetamask.ts
View file @
ac962fb0
import
{
Currency
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useState
}
from
'
react
'
import
{
useCallback
,
useState
}
from
'
react
'
import
{
getTokenLogoURL
}
from
'
./../components/CurrencyLogo/index
'
import
{
getTokenLogoURL
}
from
'
./../components/CurrencyLogo/index
'
...
...
src/hooks/useAllV3Routes.ts
View file @
ac962fb0
import
{
Currency
}
from
'
@uniswap/sdk-core
'
import
{
Currency
}
from
'
@uniswap/sdk-core
'
import
{
Pool
,
Route
}
from
'
@uniswap/v3-sdk
'
import
{
Pool
,
Route
}
from
'
@uniswap/v3-sdk
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
useV3SwapPools
}
from
'
./useV3SwapPools
'
import
{
useV3SwapPools
}
from
'
./useV3SwapPools
'
import
{
useActiveWeb3React
}
from
'
./web3
'
/**
/**
* Returns true if poolA is equivalent to poolB
* Returns true if poolA is equivalent to poolB
...
...
src/hooks/useApproveCallback.ts
View file @
ac962fb0
...
@@ -4,6 +4,7 @@ import { Protocol, Trade } from '@uniswap/router-sdk'
...
@@ -4,6 +4,7 @@ import { Protocol, Trade } from '@uniswap/router-sdk'
import
{
Currency
,
CurrencyAmount
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Pair
,
Route
as
V2Route
,
Trade
as
V2Trade
}
from
'
@uniswap/v2-sdk
'
import
{
Pair
,
Route
as
V2Route
,
Trade
as
V2Trade
}
from
'
@uniswap/v2-sdk
'
import
{
Pool
,
Route
as
V3Route
,
Trade
as
V3Trade
}
from
'
@uniswap/v3-sdk
'
import
{
Pool
,
Route
as
V3Route
,
Trade
as
V3Trade
}
from
'
@uniswap/v3-sdk
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
getTxOptimizedSwapRouter
,
SwapRouterVersion
}
from
'
utils/getTxOptimizedSwapRouter
'
import
{
getTxOptimizedSwapRouter
,
SwapRouterVersion
}
from
'
utils/getTxOptimizedSwapRouter
'
...
@@ -13,7 +14,6 @@ import { useHasPendingApproval, useTransactionAdder } from '../state/transaction
...
@@ -13,7 +14,6 @@ import { useHasPendingApproval, useTransactionAdder } from '../state/transaction
import
{
calculateGasMargin
}
from
'
../utils/calculateGasMargin
'
import
{
calculateGasMargin
}
from
'
../utils/calculateGasMargin
'
import
{
useTokenContract
}
from
'
./useContract
'
import
{
useTokenContract
}
from
'
./useContract
'
import
{
useTokenAllowance
}
from
'
./useTokenAllowance
'
import
{
useTokenAllowance
}
from
'
./useTokenAllowance
'
import
{
useActiveWeb3React
}
from
'
./web3
'
export
enum
ApprovalState
{
export
enum
ApprovalState
{
UNKNOWN
=
'
UNKNOWN
'
,
UNKNOWN
=
'
UNKNOWN
'
,
...
...
src/hooks/useArgentWalletContract.ts
View file @
ac962fb0
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
ArgentWalletContractABI
from
'
../abis/argent-wallet-contract.json
'
import
ArgentWalletContractABI
from
'
../abis/argent-wallet-contract.json
'
import
{
ArgentWalletContract
}
from
'
../abis/types
'
import
{
ArgentWalletContract
}
from
'
../abis/types
'
import
{
useContract
}
from
'
./useContract
'
import
{
useContract
}
from
'
./useContract
'
import
useIsArgentWallet
from
'
./useIsArgentWallet
'
import
useIsArgentWallet
from
'
./useIsArgentWallet
'
import
{
useActiveWeb3React
}
from
'
./web3
'
export
function
useArgentWalletContract
():
ArgentWalletContract
|
null
{
export
function
useArgentWalletContract
():
ArgentWalletContract
|
null
{
const
{
account
}
=
useActiveWeb3React
()
const
{
account
}
=
useActiveWeb3React
()
...
...
src/hooks/useAutoRouterSupported.tsx
View file @
ac962fb0
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
AUTO_ROUTER_SUPPORTED_CHAINS
}
from
'
state/routing/clientSideSmartOrderRouter/constants
'
import
{
AUTO_ROUTER_SUPPORTED_CHAINS
}
from
'
state/routing/clientSideSmartOrderRouter/constants
'
import
{
useActiveWeb3React
}
from
'
./web3
'
export
default
function
useAutoRouterSupported
():
boolean
{
export
default
function
useAutoRouterSupported
():
boolean
{
const
{
chainId
}
=
useActiveWeb3React
()
const
{
chainId
}
=
useActiveWeb3React
()
return
Boolean
(
chainId
&&
AUTO_ROUTER_SUPPORTED_CHAINS
.
includes
(
chainId
))
return
Boolean
(
chainId
&&
AUTO_ROUTER_SUPPORTED_CHAINS
.
includes
(
chainId
))
...
...
src/hooks/useClientSideV3Trade.ts
View file @
ac962fb0
import
{
Currency
,
CurrencyAmount
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Route
,
SwapQuoter
}
from
'
@uniswap/v3-sdk
'
import
{
Route
,
SwapQuoter
}
from
'
@uniswap/v3-sdk
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
InterfaceTrade
,
TradeState
}
from
'
state/routing/types
'
import
{
InterfaceTrade
,
TradeState
}
from
'
state/routing/types
'
...
@@ -8,7 +9,6 @@ import { InterfaceTrade, TradeState } from 'state/routing/types'
...
@@ -8,7 +9,6 @@ import { InterfaceTrade, TradeState } from 'state/routing/types'
import
{
useSingleContractWithCallData
}
from
'
../state/multicall/hooks
'
import
{
useSingleContractWithCallData
}
from
'
../state/multicall/hooks
'
import
{
useAllV3Routes
}
from
'
./useAllV3Routes
'
import
{
useAllV3Routes
}
from
'
./useAllV3Routes
'
import
{
useV3Quoter
}
from
'
./useContract
'
import
{
useV3Quoter
}
from
'
./useContract
'
import
{
useActiveWeb3React
}
from
'
./web3
'
const
QUOTE_GAS_OVERRIDES
:
{
[
chainId
:
number
]:
number
}
=
{
const
QUOTE_GAS_OVERRIDES
:
{
[
chainId
:
number
]:
number
}
=
{
[
SupportedChainId
.
ARBITRUM_ONE
]:
25
_000_000
,
[
SupportedChainId
.
ARBITRUM_ONE
]:
25
_000_000
,
...
...
src/hooks/useContract.ts
View file @
ac962fb0
...
@@ -34,13 +34,12 @@ import {
...
@@ -34,13 +34,12 @@ import {
V3_MIGRATOR_ADDRESSES
,
V3_MIGRATOR_ADDRESSES
,
}
from
'
constants/addresses
'
}
from
'
constants/addresses
'
import
{
UNI
,
WRAPPED_NATIVE_CURRENCY
}
from
'
constants/tokens
'
import
{
UNI
,
WRAPPED_NATIVE_CURRENCY
}
from
'
constants/tokens
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
NonfungiblePositionManager
,
Quoter
,
UniswapInterfaceMulticall
}
from
'
types/v3
'
import
{
NonfungiblePositionManager
,
Quoter
,
UniswapInterfaceMulticall
}
from
'
types/v3
'
import
{
V3Migrator
}
from
'
types/v3/V3Migrator
'
import
{
V3Migrator
}
from
'
types/v3/V3Migrator
'
import
{
getContract
}
from
'
utils
'
import
{
getContract
}
from
'
utils
'
import
{
useActiveWeb3React
}
from
'
./web3
'
// returns null on errors
// returns null on errors
export
function
useContract
<
T
extends
Contract
=
Contract
>
(
export
function
useContract
<
T
extends
Contract
=
Contract
>
(
addressOrAddressMap
:
string
|
{
[
chainId
:
number
]:
string
}
|
undefined
,
addressOrAddressMap
:
string
|
{
[
chainId
:
number
]:
string
}
|
undefined
,
...
...
src/hooks/useENSAvatar.ts
View file @
ac962fb0
import
{
BigNumber
}
from
'
@ethersproject/bignumber
'
import
{
BigNumber
}
from
'
@ethersproject/bignumber
'
import
{
hexZeroPad
}
from
'
@ethersproject/bytes
'
import
{
hexZeroPad
}
from
'
@ethersproject/bytes
'
import
{
namehash
}
from
'
@ethersproject/hash
'
import
{
namehash
}
from
'
@ethersproject/hash
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
uriToHttp
from
'
lib/utils/uriToHttp
'
import
uriToHttp
from
'
lib/utils/uriToHttp
'
import
{
useEffect
,
useMemo
,
useState
}
from
'
react
'
import
{
useEffect
,
useMemo
,
useState
}
from
'
react
'
import
{
safeNamehash
}
from
'
utils/safeNamehash
'
import
{
safeNamehash
}
from
'
utils/safeNamehash
'
...
@@ -11,7 +12,6 @@ import isZero from '../utils/isZero'
...
@@ -11,7 +12,6 @@ import isZero from '../utils/isZero'
import
{
useENSRegistrarContract
,
useENSResolverContract
,
useERC721Contract
,
useERC1155Contract
}
from
'
./useContract
'
import
{
useENSRegistrarContract
,
useENSResolverContract
,
useERC721Contract
,
useERC1155Contract
}
from
'
./useContract
'
import
useDebounce
from
'
./useDebounce
'
import
useDebounce
from
'
./useDebounce
'
import
useENSName
from
'
./useENSName
'
import
useENSName
from
'
./useENSName
'
import
{
useActiveWeb3React
}
from
'
./web3
'
/**
/**
* Returns the ENS avatar URI, if available.
* Returns the ENS avatar URI, if available.
...
...
src/hooks/useERC20Permit.ts
View file @
ac962fb0
...
@@ -3,6 +3,7 @@ import { Trade } from '@uniswap/router-sdk'
...
@@ -3,6 +3,7 @@ import { Trade } from '@uniswap/router-sdk'
import
{
Currency
,
CurrencyAmount
,
Percent
,
Token
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Percent
,
Token
,
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
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useMemo
,
useState
}
from
'
react
'
import
{
useMemo
,
useState
}
from
'
react
'
...
@@ -12,7 +13,6 @@ import { useSingleCallResult } from '../state/multicall/hooks'
...
@@ -12,7 +13,6 @@ import { useSingleCallResult } from '../state/multicall/hooks'
import
{
useEIP2612Contract
}
from
'
./useContract
'
import
{
useEIP2612Contract
}
from
'
./useContract
'
import
useIsArgentWallet
from
'
./useIsArgentWallet
'
import
useIsArgentWallet
from
'
./useIsArgentWallet
'
import
useTransactionDeadline
from
'
./useTransactionDeadline
'
import
useTransactionDeadline
from
'
./useTransactionDeadline
'
import
{
useActiveWeb3React
}
from
'
./web3
'
enum
PermitType
{
enum
PermitType
{
AMOUNT
=
1
,
AMOUNT
=
1
,
...
...
src/hooks/useFetchListCallback.ts
View file @
ac962fb0
import
{
nanoid
}
from
'
@reduxjs/toolkit
'
import
{
nanoid
}
from
'
@reduxjs/toolkit
'
import
{
TokenList
}
from
'
@uniswap/token-lists
'
import
{
TokenList
}
from
'
@uniswap/token-lists
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
getTokenList
from
'
lib/hooks/useTokenList/fetchTokenList
'
import
getTokenList
from
'
lib/hooks/useTokenList/fetchTokenList
'
import
resolveENSContentHash
from
'
lib/utils/resolveENSContentHash
'
import
resolveENSContentHash
from
'
lib/utils/resolveENSContentHash
'
import
{
useCallback
}
from
'
react
'
import
{
useCallback
}
from
'
react
'
...
@@ -7,7 +8,6 @@ import { useAppDispatch } from 'state/hooks'
...
@@ -7,7 +8,6 @@ import { useAppDispatch } from 'state/hooks'
import
{
getNetworkLibrary
}
from
'
../connectors
'
import
{
getNetworkLibrary
}
from
'
../connectors
'
import
{
fetchTokenList
}
from
'
../state/lists/actions
'
import
{
fetchTokenList
}
from
'
../state/lists/actions
'
import
{
useActiveWeb3React
}
from
'
./web3
'
export
function
useFetchListCallback
():
(
listUrl
:
string
,
sendDispatch
?:
boolean
)
=>
Promise
<
TokenList
>
{
export
function
useFetchListCallback
():
(
listUrl
:
string
,
sendDispatch
?:
boolean
)
=>
Promise
<
TokenList
>
{
const
{
chainId
,
library
}
=
useActiveWeb3React
()
const
{
chainId
,
library
}
=
useActiveWeb3React
()
...
...
src/hooks/useIsArgentWallet.ts
View file @
ac962fb0
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
NEVER_RELOAD
,
useSingleCallResult
}
from
'
../state/multicall/hooks
'
import
{
NEVER_RELOAD
,
useSingleCallResult
}
from
'
../state/multicall/hooks
'
import
{
useArgentWalletDetectorContract
}
from
'
./useContract
'
import
{
useArgentWalletDetectorContract
}
from
'
./useContract
'
import
{
useActiveWeb3React
}
from
'
./web3
'
export
default
function
useIsArgentWallet
():
boolean
{
export
default
function
useIsArgentWallet
():
boolean
{
const
{
account
}
=
useActiveWeb3React
()
const
{
account
}
=
useActiveWeb3React
()
...
...
src/hooks/useMonitoringEventCallback.ts
View file @
ac962fb0
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
initializeApp
}
from
'
firebase/app
'
import
{
initializeApp
}
from
'
firebase/app
'
import
{
getDatabase
,
push
,
ref
}
from
'
firebase/database
'
import
{
getDatabase
,
push
,
ref
}
from
'
firebase/database
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
}
from
'
react
'
import
{
useCallback
}
from
'
react
'
import
{
TransactionInfo
,
TransactionType
}
from
'
state/transactions/actions
'
import
{
TransactionInfo
,
TransactionType
}
from
'
state/transactions/actions
'
import
{
useActiveWeb3React
}
from
'
./web3
'
type
PartialTransactionResponse
=
Pick
<
TransactionResponse
,
'
hash
'
|
'
v
'
|
'
r
'
|
'
s
'
>
type
PartialTransactionResponse
=
Pick
<
TransactionResponse
,
'
hash
'
|
'
v
'
|
'
r
'
|
'
s
'
>
const
SUPPORTED_TRANSACTION_TYPES
=
[
const
SUPPORTED_TRANSACTION_TYPES
=
[
...
...
src/hooks/usePools.ts
View file @
ac962fb0
...
@@ -3,12 +3,12 @@ import { Currency, Token } from '@uniswap/sdk-core'
...
@@ -3,12 +3,12 @@ import { Currency, Token } from '@uniswap/sdk-core'
import
{
abi
as
IUniswapV3PoolStateABI
}
from
'
@uniswap/v3-core/artifacts/contracts/interfaces/pool/IUniswapV3PoolState.sol/IUniswapV3PoolState.json
'
import
{
abi
as
IUniswapV3PoolStateABI
}
from
'
@uniswap/v3-core/artifacts/contracts/interfaces/pool/IUniswapV3PoolState.sol/IUniswapV3PoolState.json
'
import
{
computePoolAddress
}
from
'
@uniswap/v3-sdk
'
import
{
computePoolAddress
}
from
'
@uniswap/v3-sdk
'
import
{
FeeAmount
,
Pool
}
from
'
@uniswap/v3-sdk
'
import
{
FeeAmount
,
Pool
}
from
'
@uniswap/v3-sdk
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
V3_CORE_FACTORY_ADDRESSES
}
from
'
../constants/addresses
'
import
{
V3_CORE_FACTORY_ADDRESSES
}
from
'
../constants/addresses
'
import
{
useMultipleContractSingleData
}
from
'
../state/multicall/hooks
'
import
{
useMultipleContractSingleData
}
from
'
../state/multicall/hooks
'
import
{
IUniswapV3PoolStateInterface
}
from
'
../types/v3/IUniswapV3PoolState
'
import
{
IUniswapV3PoolStateInterface
}
from
'
../types/v3/IUniswapV3PoolState
'
import
{
useActiveWeb3React
}
from
'
./web3
'
const
POOL_STATE_INTERFACE
=
new
Interface
(
IUniswapV3PoolStateABI
)
as
IUniswapV3PoolStateInterface
const
POOL_STATE_INTERFACE
=
new
Interface
(
IUniswapV3PoolStateABI
)
as
IUniswapV3PoolStateInterface
...
...
src/hooks/useSocksBalance.ts
View file @
ac962fb0
import
{
Token
}
from
'
@uniswap/sdk-core
'
import
{
Token
}
from
'
@uniswap/sdk-core
'
import
{
SOCKS_CONTROLLER_ADDRESSES
}
from
'
constants/addresses
'
import
{
SOCKS_CONTROLLER_ADDRESSES
}
from
'
constants/addresses
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
useTokenBalance
}
from
'
state/wallet/hooks
'
import
{
useTokenBalance
}
from
'
state/wallet/hooks
'
import
{
useActiveWeb3React
}
from
'
./web3
'
// technically a 721, not an ERC20, but suffices for our purposes
// technically a 721, not an ERC20, but suffices for our purposes
const
SOCKS
=
new
Token
(
SupportedChainId
.
MAINNET
,
SOCKS_CONTROLLER_ADDRESSES
[
SupportedChainId
.
MAINNET
],
0
)
const
SOCKS
=
new
Token
(
SupportedChainId
.
MAINNET
,
SOCKS_CONTROLLER_ADDRESSES
[
SupportedChainId
.
MAINNET
],
0
)
...
...
src/hooks/useSwapCallback.tsx
View file @
ac962fb0
...
@@ -5,6 +5,7 @@ import { SwapRouter, Trade } from '@uniswap/router-sdk'
...
@@ -5,6 +5,7 @@ import { SwapRouter, Trade } from '@uniswap/router-sdk'
import
{
Currency
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Router
as
V2SwapRouter
,
Trade
as
V2Trade
}
from
'
@uniswap/v2-sdk
'
import
{
Router
as
V2SwapRouter
,
Trade
as
V2Trade
}
from
'
@uniswap/v2-sdk
'
import
{
SwapRouter
as
V3SwapRouter
,
Trade
as
V3Trade
}
from
'
@uniswap/v3-sdk
'
import
{
SwapRouter
as
V3SwapRouter
,
Trade
as
V3Trade
}
from
'
@uniswap/v3-sdk
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
ReactNode
,
useMemo
}
from
'
react
'
import
{
ReactNode
,
useMemo
}
from
'
react
'
import
{
SWAP_ROUTER_ADDRESSES
,
V3_ROUTER_ADDRESS
}
from
'
../constants/addresses
'
import
{
SWAP_ROUTER_ADDRESSES
,
V3_ROUTER_ADDRESS
}
from
'
../constants/addresses
'
...
@@ -19,7 +20,6 @@ import { useV2RouterContract } from './useContract'
...
@@ -19,7 +20,6 @@ import { useV2RouterContract } from './useContract'
import
useENS
from
'
./useENS
'
import
useENS
from
'
./useENS
'
import
{
SignatureData
}
from
'
./useERC20Permit
'
import
{
SignatureData
}
from
'
./useERC20Permit
'
import
useTransactionDeadline
from
'
./useTransactionDeadline
'
import
useTransactionDeadline
from
'
./useTransactionDeadline
'
import
{
useActiveWeb3React
}
from
'
./web3
'
type
AnyTrade
=
type
AnyTrade
=
|
V2Trade
<
Currency
,
Currency
,
TradeType
>
|
V2Trade
<
Currency
,
Currency
,
TradeType
>
...
...
src/hooks/useSwapSlippageTolerance.ts
View file @
ac962fb0
...
@@ -2,6 +2,7 @@ import { Trade } from '@uniswap/router-sdk'
...
@@ -2,6 +2,7 @@ import { Trade } from '@uniswap/router-sdk'
import
{
Currency
,
CurrencyAmount
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
SUPPORTED_GAS_ESTIMATE_CHAIN_IDS
}
from
'
components/swap/GasEstimateBadge
'
import
{
SUPPORTED_GAS_ESTIMATE_CHAIN_IDS
}
from
'
components/swap/GasEstimateBadge
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
InterfaceTrade
}
from
'
state/routing/types
'
import
{
InterfaceTrade
}
from
'
state/routing/types
'
...
@@ -10,7 +11,6 @@ import { useUserSlippageToleranceWithDefault } from '../state/user/hooks'
...
@@ -10,7 +11,6 @@ import { useUserSlippageToleranceWithDefault } from '../state/user/hooks'
import
{
useNativeCurrency
}
from
'
./Tokens
'
import
{
useNativeCurrency
}
from
'
./Tokens
'
import
useGasPrice
from
'
./useGasPrice
'
import
useGasPrice
from
'
./useGasPrice
'
import
useUSDCPrice
,
{
useUSDCValue
}
from
'
./useUSDCPrice
'
import
useUSDCPrice
,
{
useUSDCValue
}
from
'
./useUSDCPrice
'
import
{
useActiveWeb3React
}
from
'
./web3
'
const
V3_SWAP_DEFAULT_SLIPPAGE
=
new
Percent
(
50
,
10
_000
)
// .50%
const
V3_SWAP_DEFAULT_SLIPPAGE
=
new
Percent
(
50
,
10
_000
)
// .50%
const
ONE_TENTHS_PERCENT
=
new
Percent
(
10
,
10
_000
)
// .10%
const
ONE_TENTHS_PERCENT
=
new
Percent
(
10
,
10
_000
)
// .10%
...
...
src/hooks/useTokenInfoFromActiveList.ts
View file @
ac962fb0
import
{
Currency
}
from
'
@uniswap/sdk-core
'
import
{
Currency
}
from
'
@uniswap/sdk-core
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
useCombinedActiveList
}
from
'
state/lists/hooks
'
import
{
useCombinedActiveList
}
from
'
state/lists/hooks
'
...
...
src/hooks/useTransactionDeadline.ts
View file @
ac962fb0
import
{
BigNumber
}
from
'
@ethersproject/bignumber
'
import
{
BigNumber
}
from
'
@ethersproject/bignumber
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
L2_DEADLINE_FROM_NOW
}
from
'
constants/misc
'
import
{
L2_DEADLINE_FROM_NOW
}
from
'
constants/misc
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
useAppSelector
}
from
'
state/hooks
'
import
{
useAppSelector
}
from
'
state/hooks
'
import
useCurrentBlockTimestamp
from
'
./useCurrentBlockTimestamp
'
import
useCurrentBlockTimestamp
from
'
./useCurrentBlockTimestamp
'
import
{
useActiveWeb3React
}
from
'
./web3
'
// combines the block timestamp with the user setting to give the deadline that should be used for any submitted transaction
// combines the block timestamp with the user setting to give the deadline that should be used for any submitted transaction
export
default
function
useTransactionDeadline
():
BigNumber
|
undefined
{
export
default
function
useTransactionDeadline
():
BigNumber
|
undefined
{
...
...
src/hooks/useUSDCPrice.ts
View file @
ac962fb0
import
{
Currency
,
CurrencyAmount
,
Price
,
Token
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Price
,
Token
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
tryParseAmount
}
from
'
state/swap/hooks
'
import
{
tryParseAmount
}
from
'
state/swap/hooks
'
...
@@ -6,7 +7,6 @@ import { SupportedChainId } from '../constants/chains'
...
@@ -6,7 +7,6 @@ import { SupportedChainId } from '../constants/chains'
import
{
DAI_OPTIMISM
,
USDC
,
USDC_ARBITRUM
,
USDC_POLYGON
}
from
'
../constants/tokens
'
import
{
DAI_OPTIMISM
,
USDC
,
USDC_ARBITRUM
,
USDC_POLYGON
}
from
'
../constants/tokens
'
import
{
useBestV2Trade
}
from
'
./useBestV2Trade
'
import
{
useBestV2Trade
}
from
'
./useBestV2Trade
'
import
{
useClientSideV3Trade
}
from
'
./useClientSideV3Trade
'
import
{
useClientSideV3Trade
}
from
'
./useClientSideV3Trade
'
import
{
useActiveWeb3React
}
from
'
./web3
'
// Stablecoin amounts used when calculating spot price for a given currency.
// Stablecoin amounts used when calculating spot price for a given currency.
// The amount is large enough to filter low liquidity pairs.
// The amount is large enough to filter low liquidity pairs.
...
...
src/hooks/useV3SwapPools.ts
View file @
ac962fb0
import
{
Currency
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
FeeAmount
,
Pool
}
from
'
@uniswap/v3-sdk
'
import
{
FeeAmount
,
Pool
}
from
'
@uniswap/v3-sdk
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
useAllCurrencyCombinations
}
from
'
./useAllCurrencyCombinations
'
import
{
useAllCurrencyCombinations
}
from
'
./useAllCurrencyCombinations
'
import
{
PoolState
,
usePools
}
from
'
./usePools
'
import
{
PoolState
,
usePools
}
from
'
./usePools
'
import
{
useActiveWeb3React
}
from
'
./web3
'
/**
/**
* Returns all the existing pools that should be considered for swapping between an input currency and an output currency
* Returns all the existing pools that should be considered for swapping between an input currency and an output currency
...
...
src/hooks/useWrapCallback.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Currency
}
from
'
@uniswap/sdk-core
'
import
{
Currency
}
from
'
@uniswap/sdk-core
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
WRAPPED_NATIVE_CURRENCY
}
from
'
../constants/tokens
'
import
{
WRAPPED_NATIVE_CURRENCY
}
from
'
../constants/tokens
'
...
@@ -9,7 +10,6 @@ import { useTransactionAdder } from '../state/transactions/hooks'
...
@@ -9,7 +10,6 @@ import { useTransactionAdder } from '../state/transactions/hooks'
import
{
useCurrencyBalance
}
from
'
../state/wallet/hooks
'
import
{
useCurrencyBalance
}
from
'
../state/wallet/hooks
'
import
{
useNativeCurrency
}
from
'
./Tokens
'
import
{
useNativeCurrency
}
from
'
./Tokens
'
import
{
useWETHContract
}
from
'
./useContract
'
import
{
useWETHContract
}
from
'
./useContract
'
import
{
useActiveWeb3React
}
from
'
./web3
'
export
enum
WrapType
{
export
enum
WrapType
{
NOT_APPLICABLE
,
NOT_APPLICABLE
,
...
...
src/hooks/web3.ts
View file @
ac962fb0
...
@@ -6,8 +6,6 @@ import { gnosisSafe, injected } from '../connectors'
...
@@ -6,8 +6,6 @@ import { gnosisSafe, injected } from '../connectors'
import
{
IS_IN_IFRAME
}
from
'
../constants/misc
'
import
{
IS_IN_IFRAME
}
from
'
../constants/misc
'
import
{
isMobile
}
from
'
../utils/userAgent
'
import
{
isMobile
}
from
'
../utils/userAgent
'
export
{
default
as
useActiveWeb3React
}
from
'
./useActiveWeb3React
'
export
function
useEagerConnect
()
{
export
function
useEagerConnect
()
{
const
{
activate
,
active
}
=
useWeb3React
()
const
{
activate
,
active
}
=
useWeb3React
()
const
[
tried
,
setTried
]
=
useState
(
false
)
const
[
tried
,
setTried
]
=
useState
(
false
)
...
...
src/pages/AddLiquidity/index.tsx
View file @
ac962fb0
...
@@ -4,6 +4,7 @@ import { Trans } from '@lingui/macro'
...
@@ -4,6 +4,7 @@ import { Trans } from '@lingui/macro'
import
{
Currency
,
CurrencyAmount
,
Percent
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Percent
}
from
'
@uniswap/sdk-core
'
import
{
FeeAmount
,
NonfungiblePositionManager
}
from
'
@uniswap/v3-sdk
'
import
{
FeeAmount
,
NonfungiblePositionManager
}
from
'
@uniswap/v3-sdk
'
import
UnsupportedCurrencyFooter
from
'
components/swap/UnsupportedCurrencyFooter
'
import
UnsupportedCurrencyFooter
from
'
components/swap/UnsupportedCurrencyFooter
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useContext
,
useEffect
,
useState
}
from
'
react
'
import
{
useCallback
,
useContext
,
useEffect
,
useState
}
from
'
react
'
import
{
AlertTriangle
}
from
'
react-feather
'
import
{
AlertTriangle
}
from
'
react-feather
'
import
ReactGA
from
'
react-ga
'
import
ReactGA
from
'
react-ga
'
...
@@ -44,7 +45,6 @@ import { useIsSwapUnsupported } from '../../hooks/useIsSwapUnsupported'
...
@@ -44,7 +45,6 @@ import { useIsSwapUnsupported } from '../../hooks/useIsSwapUnsupported'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
{
useUSDCValue
}
from
'
../../hooks/useUSDCPrice
'
import
{
useUSDCValue
}
from
'
../../hooks/useUSDCPrice
'
import
{
useV3PositionFromTokenId
}
from
'
../../hooks/useV3Positions
'
import
{
useV3PositionFromTokenId
}
from
'
../../hooks/useV3Positions
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
Bound
,
Field
}
from
'
../../state/mint/v3/actions
'
import
{
Bound
,
Field
}
from
'
../../state/mint/v3/actions
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
...
...
src/pages/AddLiquidity/redirects.tsx
View file @
ac962fb0
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
Redirect
,
RouteComponentProps
}
from
'
react-router-dom
'
import
{
Redirect
,
RouteComponentProps
}
from
'
react-router-dom
'
import
{
WRAPPED_NATIVE_CURRENCY
}
from
'
../../constants/tokens
'
import
{
WRAPPED_NATIVE_CURRENCY
}
from
'
../../constants/tokens
'
...
...
src/pages/AddLiquidityV2/index.tsx
View file @
ac962fb0
...
@@ -4,6 +4,7 @@ import { Trans } from '@lingui/macro'
...
@@ -4,6 +4,7 @@ import { Trans } from '@lingui/macro'
import
{
Currency
,
CurrencyAmount
,
Percent
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Percent
}
from
'
@uniswap/sdk-core
'
import
UnsupportedCurrencyFooter
from
'
components/swap/UnsupportedCurrencyFooter
'
import
UnsupportedCurrencyFooter
from
'
components/swap/UnsupportedCurrencyFooter
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useContext
,
useState
}
from
'
react
'
import
{
useCallback
,
useContext
,
useState
}
from
'
react
'
import
{
Plus
}
from
'
react-feather
'
import
{
Plus
}
from
'
react-feather
'
import
ReactGA
from
'
react-ga
'
import
ReactGA
from
'
react-ga
'
...
@@ -28,7 +29,6 @@ import { useV2RouterContract } from '../../hooks/useContract'
...
@@ -28,7 +29,6 @@ import { useV2RouterContract } from '../../hooks/useContract'
import
{
useIsSwapUnsupported
}
from
'
../../hooks/useIsSwapUnsupported
'
import
{
useIsSwapUnsupported
}
from
'
../../hooks/useIsSwapUnsupported
'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
{
PairState
}
from
'
../../hooks/useV2Pairs
'
import
{
PairState
}
from
'
../../hooks/useV2Pairs
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
Field
}
from
'
../../state/mint/actions
'
import
{
Field
}
from
'
../../state/mint/actions
'
import
{
useDerivedMintInfo
,
useMintActionHandlers
,
useMintState
}
from
'
../../state/mint/hooks
'
import
{
useDerivedMintInfo
,
useMintActionHandlers
,
useMintState
}
from
'
../../state/mint/hooks
'
...
...
src/pages/CreateProposal/index.tsx
View file @
ac962fb0
...
@@ -5,7 +5,7 @@ import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core'
...
@@ -5,7 +5,7 @@ import { Currency, CurrencyAmount, Token } from '@uniswap/sdk-core'
import
{
ButtonError
}
from
'
components/Button
'
import
{
ButtonError
}
from
'
components/Button
'
import
{
BlueCard
}
from
'
components/Card
'
import
{
BlueCard
}
from
'
components/Card
'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
Wrapper
}
from
'
pages/Pool/styleds
'
import
{
Wrapper
}
from
'
pages/Pool/styleds
'
import
React
,
{
useCallback
,
useMemo
,
useState
}
from
'
react
'
import
React
,
{
useCallback
,
useMemo
,
useState
}
from
'
react
'
...
...
src/pages/Earn/Manage.tsx
View file @
ac962fb0
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
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useCallback
,
useState
}
from
'
react
'
import
{
useCallback
,
useState
}
from
'
react
'
import
{
Link
}
from
'
react-router-dom
'
import
{
Link
}
from
'
react-router-dom
'
...
@@ -22,7 +23,6 @@ import usePrevious from '../../hooks/usePrevious'
...
@@ -22,7 +23,6 @@ import usePrevious from '../../hooks/usePrevious'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
useUSDCPrice
from
'
../../hooks/useUSDCPrice
'
import
useUSDCPrice
from
'
../../hooks/useUSDCPrice
'
import
{
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
...
...
src/pages/Earn/index.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
...
@@ -9,7 +10,6 @@ import { CardBGImage, CardNoise, CardSection, DataCard } from '../../components/
...
@@ -9,7 +10,6 @@ import { CardBGImage, CardNoise, CardSection, DataCard } from '../../components/
import
Loader
from
'
../../components/Loader
'
import
Loader
from
'
../../components/Loader
'
import
{
RowBetween
}
from
'
../../components/Row
'
import
{
RowBetween
}
from
'
../../components/Row
'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
STAKING_REWARDS_INFO
,
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
STAKING_REWARDS_INFO
,
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
ExternalLink
,
ThemedText
}
from
'
../../theme
'
import
{
ExternalLink
,
ThemedText
}
from
'
../../theme
'
import
{
Countdown
}
from
'
./Countdown
'
import
{
Countdown
}
from
'
./Countdown
'
...
...
src/pages/MigrateV2/MigrateV2Pair.tsx
View file @
ac962fb0
...
@@ -12,6 +12,7 @@ import RangeSelector from 'components/RangeSelector'
...
@@ -12,6 +12,7 @@ import RangeSelector from 'components/RangeSelector'
import
RateToggle
from
'
components/RateToggle
'
import
RateToggle
from
'
components/RateToggle
'
import
SettingsTab
from
'
components/Settings
'
import
SettingsTab
from
'
components/Settings
'
import
{
Dots
}
from
'
components/swap/styleds
'
import
{
Dots
}
from
'
components/swap/styleds
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
ApprovalState
,
useApproveCallback
}
from
'
hooks/useApproveCallback
'
import
{
ApprovalState
,
useApproveCallback
}
from
'
hooks/useApproveCallback
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
{
PoolState
,
usePool
}
from
'
hooks/usePools
'
import
{
PoolState
,
usePool
}
from
'
hooks/usePools
'
...
@@ -42,7 +43,6 @@ import { usePairContract, useV2MigratorContract } from '../../hooks/useContract'
...
@@ -42,7 +43,6 @@ import { usePairContract, useV2MigratorContract } from '../../hooks/useContract'
import
{
useV2LiquidityTokenPermit
}
from
'
../../hooks/useERC20Permit
'
import
{
useV2LiquidityTokenPermit
}
from
'
../../hooks/useERC20Permit
'
import
useIsArgentWallet
from
'
../../hooks/useIsArgentWallet
'
import
useIsArgentWallet
from
'
../../hooks/useIsArgentWallet
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
NEVER_RELOAD
,
useSingleCallResult
}
from
'
../../state/multicall/hooks
'
import
{
NEVER_RELOAD
,
useSingleCallResult
}
from
'
../../state/multicall/hooks
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
...
...
src/pages/MigrateV2/index.tsx
View file @
ac962fb0
...
@@ -6,6 +6,7 @@ import { Pair } from '@uniswap/v2-sdk'
...
@@ -6,6 +6,7 @@ import { Pair } from '@uniswap/v2-sdk'
import
MigrateSushiPositionCard
from
'
components/PositionCard/Sushi
'
import
MigrateSushiPositionCard
from
'
components/PositionCard/Sushi
'
import
MigrateV2PositionCard
from
'
components/PositionCard/V2
'
import
MigrateV2PositionCard
from
'
components/PositionCard/V2
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
PairState
,
useV2Pairs
}
from
'
hooks/useV2Pairs
'
import
{
PairState
,
useV2Pairs
}
from
'
hooks/useV2Pairs
'
import
{
ReactNode
,
useContext
,
useMemo
}
from
'
react
'
import
{
ReactNode
,
useContext
,
useMemo
}
from
'
react
'
import
{
Text
}
from
'
rebass
'
import
{
Text
}
from
'
rebass
'
...
@@ -17,7 +18,6 @@ import QuestionHelper from '../../components/QuestionHelper'
...
@@ -17,7 +18,6 @@ import QuestionHelper from '../../components/QuestionHelper'
import
{
AutoRow
}
from
'
../../components/Row
'
import
{
AutoRow
}
from
'
../../components/Row
'
import
{
Dots
}
from
'
../../components/swap/styleds
'
import
{
Dots
}
from
'
../../components/swap/styleds
'
import
{
V2_FACTORY_ADDRESSES
}
from
'
../../constants/addresses
'
import
{
V2_FACTORY_ADDRESSES
}
from
'
../../constants/addresses
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
toV2LiquidityToken
,
useTrackedTokenPairs
}
from
'
../../state/user/hooks
'
import
{
toV2LiquidityToken
,
useTrackedTokenPairs
}
from
'
../../state/user/hooks
'
import
{
useTokenBalancesWithLoadingIndicator
}
from
'
../../state/wallet/hooks
'
import
{
useTokenBalancesWithLoadingIndicator
}
from
'
../../state/wallet/hooks
'
import
{
BackArrow
,
StyledInternalLink
,
ThemedText
}
from
'
../../theme
'
import
{
BackArrow
,
StyledInternalLink
,
ThemedText
}
from
'
../../theme
'
...
...
src/pages/Pool/CTACards.tsx
View file @
ac962fb0
...
@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
...
@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
CHAIN_INFO
}
from
'
constants/chainInfo
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
ThemedText
}
from
'
theme
'
import
{
ThemedText
}
from
'
theme
'
...
...
src/pages/Pool/PositionPage.tsx
View file @
ac962fb0
...
@@ -15,13 +15,13 @@ import { Dots } from 'components/swap/styleds'
...
@@ -15,13 +15,13 @@ import { Dots } from 'components/swap/styleds'
import
Toggle
from
'
components/Toggle
'
import
Toggle
from
'
components/Toggle
'
import
TransactionConfirmationModal
,
{
ConfirmationModalContent
}
from
'
components/TransactionConfirmationModal
'
import
TransactionConfirmationModal
,
{
ConfirmationModalContent
}
from
'
components/TransactionConfirmationModal
'
import
{
useToken
}
from
'
hooks/Tokens
'
import
{
useToken
}
from
'
hooks/Tokens
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useV3NFTPositionManagerContract
}
from
'
hooks/useContract
'
import
{
useV3NFTPositionManagerContract
}
from
'
hooks/useContract
'
import
useIsTickAtLimit
from
'
hooks/useIsTickAtLimit
'
import
useIsTickAtLimit
from
'
hooks/useIsTickAtLimit
'
import
{
PoolState
,
usePool
}
from
'
hooks/usePools
'
import
{
PoolState
,
usePool
}
from
'
hooks/usePools
'
import
useUSDCPrice
from
'
hooks/useUSDCPrice
'
import
useUSDCPrice
from
'
hooks/useUSDCPrice
'
import
{
useV3PositionFees
}
from
'
hooks/useV3PositionFees
'
import
{
useV3PositionFees
}
from
'
hooks/useV3PositionFees
'
import
{
useV3PositionFromTokenId
}
from
'
hooks/useV3Positions
'
import
{
useV3PositionFromTokenId
}
from
'
hooks/useV3Positions
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
useCallback
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
{
useCallback
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
ReactGA
from
'
react-ga
'
import
ReactGA
from
'
react-ga
'
import
{
Link
,
RouteComponentProps
}
from
'
react-router-dom
'
import
{
Link
,
RouteComponentProps
}
from
'
react-router-dom
'
...
...
src/pages/Pool/index.tsx
View file @
ac962fb0
...
@@ -6,8 +6,8 @@ import { SwapPoolTabs } from 'components/NavigationTabs'
...
@@ -6,8 +6,8 @@ import { SwapPoolTabs } from 'components/NavigationTabs'
import
PositionList
from
'
components/PositionList
'
import
PositionList
from
'
components/PositionList
'
import
{
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
{
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useV3Positions
}
from
'
hooks/useV3Positions
'
import
{
useV3Positions
}
from
'
hooks/useV3Positions
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
useContext
}
from
'
react
'
import
{
useContext
}
from
'
react
'
import
{
BookOpen
,
ChevronDown
,
ChevronsRight
,
Inbox
,
Layers
,
PlusCircle
}
from
'
react-feather
'
import
{
BookOpen
,
ChevronDown
,
ChevronsRight
,
Inbox
,
Layers
,
PlusCircle
}
from
'
react-feather
'
import
{
Link
}
from
'
react-router-dom
'
import
{
Link
}
from
'
react-router-dom
'
...
...
src/pages/Pool/v2.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useContext
,
useMemo
}
from
'
react
'
import
{
useContext
,
useMemo
}
from
'
react
'
import
{
ChevronsRight
}
from
'
react-feather
'
import
{
ChevronsRight
}
from
'
react-feather
'
...
@@ -19,7 +20,6 @@ import { Dots } from '../../components/swap/styleds'
...
@@ -19,7 +20,6 @@ import { Dots } from '../../components/swap/styleds'
import
{
SwitchLocaleLink
}
from
'
../../components/SwitchLocaleLink
'
import
{
SwitchLocaleLink
}
from
'
../../components/SwitchLocaleLink
'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
useV2Pairs
}
from
'
../../hooks/useV2Pairs
'
import
{
useV2Pairs
}
from
'
../../hooks/useV2Pairs
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
toV2LiquidityToken
,
useTrackedTokenPairs
}
from
'
../../state/user/hooks
'
import
{
toV2LiquidityToken
,
useTrackedTokenPairs
}
from
'
../../state/user/hooks
'
import
{
useTokenBalancesWithLoadingIndicator
}
from
'
../../state/wallet/hooks
'
import
{
useTokenBalancesWithLoadingIndicator
}
from
'
../../state/wallet/hooks
'
...
...
src/pages/PoolFinder/index.tsx
View file @
ac962fb0
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
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
Plus
}
from
'
react-feather
'
import
{
Plus
}
from
'
react-feather
'
...
@@ -18,7 +19,6 @@ import CurrencySearchModal from '../../components/SearchModal/CurrencySearchModa
...
@@ -18,7 +19,6 @@ import CurrencySearchModal from '../../components/SearchModal/CurrencySearchModa
import
{
SwitchLocaleLink
}
from
'
../../components/SwitchLocaleLink
'
import
{
SwitchLocaleLink
}
from
'
../../components/SwitchLocaleLink
'
import
{
nativeOnChain
}
from
'
../../constants/tokens
'
import
{
nativeOnChain
}
from
'
../../constants/tokens
'
import
{
PairState
,
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
PairState
,
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
usePairAdder
}
from
'
../../state/user/hooks
'
import
{
usePairAdder
}
from
'
../../state/user/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
StyledInternalLink
}
from
'
../../theme
'
import
{
StyledInternalLink
}
from
'
../../theme
'
...
...
src/pages/RemoveLiquidity/V3.tsx
View file @
ac962fb0
...
@@ -16,12 +16,12 @@ import { AddRemoveTabs } from 'components/NavigationTabs'
...
@@ -16,12 +16,12 @@ import { AddRemoveTabs } from 'components/NavigationTabs'
import
{
AutoRow
,
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
{
AutoRow
,
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
Slider
from
'
components/Slider
'
import
Slider
from
'
components/Slider
'
import
Toggle
from
'
components/Toggle
'
import
Toggle
from
'
components/Toggle
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useV3NFTPositionManagerContract
}
from
'
hooks/useContract
'
import
{
useV3NFTPositionManagerContract
}
from
'
hooks/useContract
'
import
useDebouncedChangeHandler
from
'
hooks/useDebouncedChangeHandler
'
import
useDebouncedChangeHandler
from
'
hooks/useDebouncedChangeHandler
'
import
useTheme
from
'
hooks/useTheme
'
import
useTheme
from
'
hooks/useTheme
'
import
useTransactionDeadline
from
'
hooks/useTransactionDeadline
'
import
useTransactionDeadline
from
'
hooks/useTransactionDeadline
'
import
{
useV3PositionFromTokenId
}
from
'
hooks/useV3Positions
'
import
{
useV3PositionFromTokenId
}
from
'
hooks/useV3Positions
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
useCallback
,
useMemo
,
useState
}
from
'
react
'
import
{
useCallback
,
useMemo
,
useState
}
from
'
react
'
import
ReactGA
from
'
react-ga
'
import
ReactGA
from
'
react-ga
'
import
{
Redirect
,
RouteComponentProps
}
from
'
react-router-dom
'
import
{
Redirect
,
RouteComponentProps
}
from
'
react-router-dom
'
...
...
src/pages/RemoveLiquidity/index.tsx
View file @
ac962fb0
...
@@ -3,6 +3,7 @@ import { Contract } from '@ethersproject/contracts'
...
@@ -3,6 +3,7 @@ import { Contract } from '@ethersproject/contracts'
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Currency
,
Percent
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Percent
}
from
'
@uniswap/sdk-core
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useContext
,
useMemo
,
useState
}
from
'
react
'
import
{
useCallback
,
useContext
,
useMemo
,
useState
}
from
'
react
'
import
{
ArrowDown
,
Plus
}
from
'
react-feather
'
import
{
ArrowDown
,
Plus
}
from
'
react-feather
'
import
ReactGA
from
'
react-ga
'
import
ReactGA
from
'
react-ga
'
...
@@ -29,7 +30,6 @@ import { usePairContract, useV2RouterContract } from '../../hooks/useContract'
...
@@ -29,7 +30,6 @@ import { usePairContract, useV2RouterContract } from '../../hooks/useContract'
import
useDebouncedChangeHandler
from
'
../../hooks/useDebouncedChangeHandler
'
import
useDebouncedChangeHandler
from
'
../../hooks/useDebouncedChangeHandler
'
import
{
useV2LiquidityTokenPermit
}
from
'
../../hooks/useERC20Permit
'
import
{
useV2LiquidityTokenPermit
}
from
'
../../hooks/useERC20Permit
'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
Field
}
from
'
../../state/burn/actions
'
import
{
Field
}
from
'
../../state/burn/actions
'
import
{
useBurnActionHandlers
,
useBurnState
,
useDerivedBurnInfo
}
from
'
../../state/burn/hooks
'
import
{
useBurnActionHandlers
,
useBurnState
,
useDerivedBurnInfo
}
from
'
../../state/burn/hooks
'
...
...
src/pages/Swap/index.tsx
View file @
ac962fb0
...
@@ -7,6 +7,7 @@ import { NetworkAlert } from 'components/NetworkAlert/NetworkAlert'
...
@@ -7,6 +7,7 @@ import { NetworkAlert } from 'components/NetworkAlert/NetworkAlert'
import
SwapDetailsDropdown
from
'
components/swap/SwapDetailsDropdown
'
import
SwapDetailsDropdown
from
'
components/swap/SwapDetailsDropdown
'
import
UnsupportedCurrencyFooter
from
'
components/swap/UnsupportedCurrencyFooter
'
import
UnsupportedCurrencyFooter
from
'
components/swap/UnsupportedCurrencyFooter
'
import
{
MouseoverTooltip
}
from
'
components/Tooltip
'
import
{
MouseoverTooltip
}
from
'
components/Tooltip
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useCallback
,
useContext
,
useEffect
,
useMemo
,
useState
}
from
'
react
'
import
{
useCallback
,
useContext
,
useEffect
,
useMemo
,
useState
}
from
'
react
'
import
{
ArrowDown
,
CheckCircle
,
HelpCircle
}
from
'
react-feather
'
import
{
ArrowDown
,
CheckCircle
,
HelpCircle
}
from
'
react-feather
'
...
@@ -39,7 +40,6 @@ import { useIsSwapUnsupported } from '../../hooks/useIsSwapUnsupported'
...
@@ -39,7 +40,6 @@ import { useIsSwapUnsupported } from '../../hooks/useIsSwapUnsupported'
import
{
useSwapCallback
}
from
'
../../hooks/useSwapCallback
'
import
{
useSwapCallback
}
from
'
../../hooks/useSwapCallback
'
import
{
useUSDCValue
}
from
'
../../hooks/useUSDCPrice
'
import
{
useUSDCValue
}
from
'
../../hooks/useUSDCPrice
'
import
useWrapCallback
,
{
WrapErrorText
,
WrapType
}
from
'
../../hooks/useWrapCallback
'
import
useWrapCallback
,
{
WrapErrorText
,
WrapType
}
from
'
../../hooks/useWrapCallback
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
Field
}
from
'
../../state/swap/actions
'
import
{
Field
}
from
'
../../state/swap/actions
'
import
{
import
{
...
...
src/pages/Vote/Landing.tsx
View file @
ac962fb0
...
@@ -9,7 +9,7 @@ import { AutoRow, RowBetween, RowFixed } from 'components/Row'
...
@@ -9,7 +9,7 @@ import { AutoRow, RowBetween, RowFixed } from 'components/Row'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
DelegateModal
from
'
components/vote/DelegateModal
'
import
DelegateModal
from
'
components/vote/DelegateModal
'
import
ProposalEmptyState
from
'
components/vote/ProposalEmptyState
'
import
ProposalEmptyState
from
'
components/vote/ProposalEmptyState
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
darken
}
from
'
polished
'
import
{
darken
}
from
'
polished
'
import
{
Link
}
from
'
react-router-dom
'
import
{
Link
}
from
'
react-router-dom
'
...
...
src/pages/Vote/VotePage.tsx
View file @
ac962fb0
...
@@ -3,6 +3,7 @@ import { BigNumber } from '@ethersproject/bignumber'
...
@@ -3,6 +3,7 @@ import { BigNumber } from '@ethersproject/bignumber'
import
{
t
,
Trans
}
from
'
@lingui/macro
'
import
{
t
,
Trans
}
from
'
@lingui/macro
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
useActiveLocale
}
from
'
hooks/useActiveLocale
'
import
{
useActiveLocale
}
from
'
hooks/useActiveLocale
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useState
}
from
'
react
'
import
{
useState
}
from
'
react
'
...
@@ -26,7 +27,6 @@ import {
...
@@ -26,7 +27,6 @@ import {
}
from
'
../../constants/governance
'
}
from
'
../../constants/governance
'
import
{
ZERO_ADDRESS
}
from
'
../../constants/misc
'
import
{
ZERO_ADDRESS
}
from
'
../../constants/misc
'
import
{
UNI
}
from
'
../../constants/tokens
'
import
{
UNI
}
from
'
../../constants/tokens
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useBlockNumber
,
useModalOpen
,
useToggleDelegateModal
,
useToggleVoteModal
}
from
'
../../state/application/hooks
'
import
{
useBlockNumber
,
useModalOpen
,
useToggleDelegateModal
,
useToggleVoteModal
}
from
'
../../state/application/hooks
'
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
import
{
...
...
src/state/application/hooks.ts
View file @
ac962fb0
import
{
DEFAULT_TXN_DISMISS_MS
}
from
'
constants/misc
'
import
{
DEFAULT_TXN_DISMISS_MS
}
from
'
constants/misc
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
AppState
}
from
'
../index
'
import
{
AppState
}
from
'
../index
'
import
{
addPopup
,
ApplicationModal
,
PopupContent
,
removePopup
,
setOpenModal
}
from
'
./reducer
'
import
{
addPopup
,
ApplicationModal
,
PopupContent
,
removePopup
,
setOpenModal
}
from
'
./reducer
'
...
...
src/state/application/updater.ts
View file @
ac962fb0
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useDebounce
from
'
hooks/useDebounce
'
import
useDebounce
from
'
hooks/useDebounce
'
import
useIsWindowVisible
from
'
hooks/useIsWindowVisible
'
import
useIsWindowVisible
from
'
hooks/useIsWindowVisible
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
api
,
CHAIN_TAG
}
from
'
state/data/enhanced
'
import
{
api
,
CHAIN_TAG
}
from
'
state/data/enhanced
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
...
...
src/state/burn/hooks.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
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
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
ReactNode
,
useCallback
}
from
'
react
'
import
{
ReactNode
,
useCallback
}
from
'
react
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
AppState
}
from
'
../index
'
import
{
AppState
}
from
'
../index
'
import
{
tryParseAmount
}
from
'
../swap/hooks
'
import
{
tryParseAmount
}
from
'
../swap/hooks
'
import
{
useTokenBalances
}
from
'
../wallet/hooks
'
import
{
useTokenBalances
}
from
'
../wallet/hooks
'
...
...
src/state/burn/v3/hooks.tsx
View file @
ac962fb0
...
@@ -2,9 +2,9 @@ import { Trans } from '@lingui/macro'
...
@@ -2,9 +2,9 @@ import { Trans } from '@lingui/macro'
import
{
Currency
,
CurrencyAmount
,
Percent
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Percent
}
from
'
@uniswap/sdk-core
'
import
{
Position
}
from
'
@uniswap/v3-sdk
'
import
{
Position
}
from
'
@uniswap/v3-sdk
'
import
{
useToken
}
from
'
hooks/Tokens
'
import
{
useToken
}
from
'
hooks/Tokens
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
usePool
}
from
'
hooks/usePools
'
import
{
usePool
}
from
'
hooks/usePools
'
import
{
useV3PositionFees
}
from
'
hooks/useV3PositionFees
'
import
{
useV3PositionFees
}
from
'
hooks/useV3PositionFees
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
ReactNode
,
useCallback
,
useMemo
}
from
'
react
'
import
{
ReactNode
,
useCallback
,
useMemo
}
from
'
react
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
PositionDetails
}
from
'
types/position
'
import
{
PositionDetails
}
from
'
types/position
'
...
...
src/state/claim/hooks.ts
View file @
ac962fb0
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useEffect
,
useState
}
from
'
react
'
import
{
useEffect
,
useState
}
from
'
react
'
import
{
UNI
}
from
'
../../constants/tokens
'
import
{
UNI
}
from
'
../../constants/tokens
'
import
{
useMerkleDistributorContract
}
from
'
../../hooks/useContract
'
import
{
useMerkleDistributorContract
}
from
'
../../hooks/useContract
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
isAddress
}
from
'
../../utils
'
import
{
isAddress
}
from
'
../../utils
'
import
{
calculateGasMargin
}
from
'
../../utils/calculateGasMargin
'
import
{
calculateGasMargin
}
from
'
../../utils/calculateGasMargin
'
import
{
useSingleCallResult
}
from
'
../multicall/hooks
'
import
{
useSingleCallResult
}
from
'
../multicall/hooks
'
...
...
src/state/governance/hooks.ts
View file @
ac962fb0
...
@@ -10,6 +10,7 @@ import { abi as GOV_ABI } from '@uniswap/governance/build/GovernorAlpha.json'
...
@@ -10,6 +10,7 @@ import { abi as GOV_ABI } from '@uniswap/governance/build/GovernorAlpha.json'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
POLYGON_PROPOSAL_TITLE
}
from
'
constants/proposals/polygon_proposal_title
'
import
{
POLYGON_PROPOSAL_TITLE
}
from
'
constants/proposals/polygon_proposal_title
'
import
{
UNISWAP_GRANTS_PROPOSAL_DESCRIPTION
}
from
'
constants/proposals/uniswap_grants_proposal_description
'
import
{
UNISWAP_GRANTS_PROPOSAL_DESCRIPTION
}
from
'
constants/proposals/uniswap_grants_proposal_description
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
import
{
useGovernanceBravoContract
,
useGovernanceBravoContract
,
useGovernanceV0Contract
,
useGovernanceV0Contract
,
...
@@ -17,7 +18,6 @@ import {
...
@@ -17,7 +18,6 @@ import {
useLatestGovernanceContract
,
useLatestGovernanceContract
,
useUniContract
,
useUniContract
,
}
from
'
hooks/useContract
'
}
from
'
hooks/useContract
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
calculateGasMargin
}
from
'
utils/calculateGasMargin
'
import
{
calculateGasMargin
}
from
'
utils/calculateGasMargin
'
...
...
src/state/lists/updater.ts
View file @
ac962fb0
import
{
getVersionUpgrade
,
minVersionBump
,
VersionUpgrade
}
from
'
@uniswap/token-lists
'
import
{
getVersionUpgrade
,
minVersionBump
,
VersionUpgrade
}
from
'
@uniswap/token-lists
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
ARBITRUM_LIST
,
OPTIMISM_LIST
,
UNSUPPORTED_LIST_URLS
}
from
'
constants/lists
'
import
{
ARBITRUM_LIST
,
OPTIMISM_LIST
,
UNSUPPORTED_LIST_URLS
}
from
'
constants/lists
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useInterval
from
'
lib/hooks/useInterval
'
import
useInterval
from
'
lib/hooks/useInterval
'
import
{
useCallback
,
useEffect
}
from
'
react
'
import
{
useCallback
,
useEffect
}
from
'
react
'
import
{
useAppDispatch
}
from
'
state/hooks
'
import
{
useAppDispatch
}
from
'
state/hooks
'
...
@@ -8,7 +9,6 @@ import { useAllLists } from 'state/lists/hooks'
...
@@ -8,7 +9,6 @@ import { useAllLists } from 'state/lists/hooks'
import
{
useFetchListCallback
}
from
'
../../hooks/useFetchListCallback
'
import
{
useFetchListCallback
}
from
'
../../hooks/useFetchListCallback
'
import
useIsWindowVisible
from
'
../../hooks/useIsWindowVisible
'
import
useIsWindowVisible
from
'
../../hooks/useIsWindowVisible
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
acceptListUpdate
,
enableList
}
from
'
./actions
'
import
{
acceptListUpdate
,
enableList
}
from
'
./actions
'
import
{
useActiveListUrls
}
from
'
./hooks
'
import
{
useActiveListUrls
}
from
'
./hooks
'
...
...
src/state/logs/hooks.ts
View file @
ac962fb0
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useEffect
,
useMemo
}
from
'
react
'
import
{
useEffect
,
useMemo
}
from
'
react
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useBlockNumber
}
from
'
../application/hooks
'
import
{
useBlockNumber
}
from
'
../application/hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
../hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
../hooks
'
import
{
addListener
,
removeListener
}
from
'
./slice
'
import
{
addListener
,
removeListener
}
from
'
./slice
'
...
...
src/state/logs/updater.ts
View file @
ac962fb0
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useEffect
,
useMemo
}
from
'
react
'
import
{
useEffect
,
useMemo
}
from
'
react
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useBlockNumber
}
from
'
../application/hooks
'
import
{
useBlockNumber
}
from
'
../application/hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
../hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
../hooks
'
import
{
fetchedLogs
,
fetchedLogsError
,
fetchingLogs
}
from
'
./slice
'
import
{
fetchedLogs
,
fetchedLogsError
,
fetchingLogs
}
from
'
./slice
'
...
...
src/state/mint/hooks.tsx
View file @
ac962fb0
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Currency
,
CurrencyAmount
,
Percent
,
Price
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Percent
,
Price
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
ReactNode
,
useCallback
,
useMemo
}
from
'
react
'
import
{
ReactNode
,
useCallback
,
useMemo
}
from
'
react
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
PairState
,
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
PairState
,
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
AppState
}
from
'
../index
'
import
{
AppState
}
from
'
../index
'
import
{
tryParseAmount
}
from
'
../swap/hooks
'
import
{
tryParseAmount
}
from
'
../swap/hooks
'
import
{
useCurrencyBalances
}
from
'
../wallet/hooks
'
import
{
useCurrencyBalances
}
from
'
../wallet/hooks
'
...
...
src/state/mint/v3/hooks.tsx
View file @
ac962fb0
...
@@ -11,6 +11,7 @@ import {
...
@@ -11,6 +11,7 @@ import {
TickMath
,
TickMath
,
tickToPrice
,
tickToPrice
,
}
from
'
@uniswap/v3-sdk
'
}
from
'
@uniswap/v3-sdk
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
usePool
}
from
'
hooks/usePools
'
import
{
usePool
}
from
'
hooks/usePools
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
ReactNode
,
useCallback
,
useMemo
}
from
'
react
'
import
{
ReactNode
,
useCallback
,
useMemo
}
from
'
react
'
...
@@ -19,7 +20,6 @@ import { getTickToPrice } from 'utils/getTickToPrice'
...
@@ -19,7 +20,6 @@ import { getTickToPrice } from 'utils/getTickToPrice'
import
{
BIG_INT_ZERO
}
from
'
../../../constants/misc
'
import
{
BIG_INT_ZERO
}
from
'
../../../constants/misc
'
import
{
PoolState
}
from
'
../../../hooks/usePools
'
import
{
PoolState
}
from
'
../../../hooks/usePools
'
import
{
useActiveWeb3React
}
from
'
../../../hooks/web3
'
import
{
AppState
}
from
'
../../index
'
import
{
AppState
}
from
'
../../index
'
import
{
tryParseAmount
}
from
'
../../swap/hooks
'
import
{
tryParseAmount
}
from
'
../../swap/hooks
'
import
{
useCurrencyBalances
}
from
'
../../wallet/hooks
'
import
{
useCurrencyBalances
}
from
'
../../wallet/hooks
'
...
...
src/state/multicall/hooks.ts
View file @
ac962fb0
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
SkipFirst
}
from
'
../../types/tuple
'
import
{
SkipFirst
}
from
'
../../types/tuple
'
import
{
useBlockNumber
}
from
'
../application/hooks
'
import
{
useBlockNumber
}
from
'
../application/hooks
'
import
{
multicall
}
from
'
./instance
'
import
{
multicall
}
from
'
./instance
'
...
...
src/state/multicall/updater.tsx
View file @
ac962fb0
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useInterfaceMulticall
}
from
'
../../hooks/useContract
'
import
{
useInterfaceMulticall
}
from
'
../../hooks/useContract
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useBlockNumber
}
from
'
../application/hooks
'
import
{
useBlockNumber
}
from
'
../application/hooks
'
import
{
multicall
}
from
'
./instance
'
import
{
multicall
}
from
'
./instance
'
...
...
src/state/stake/hooks.tsx
View file @
ac962fb0
...
@@ -3,12 +3,12 @@ import { Trans } from '@lingui/macro'
...
@@ -3,12 +3,12 @@ import { Trans } from '@lingui/macro'
import
{
abi
as
STAKING_REWARDS_ABI
}
from
'
@uniswap/liquidity-staker/build/StakingRewards.json
'
import
{
abi
as
STAKING_REWARDS_ABI
}
from
'
@uniswap/liquidity-staker/build/StakingRewards.json
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
ReactNode
,
useMemo
}
from
'
react
'
import
{
ReactNode
,
useMemo
}
from
'
react
'
import
{
DAI
,
UNI
,
USDC
,
USDT
,
WBTC
,
WRAPPED_NATIVE_CURRENCY
}
from
'
../../constants/tokens
'
import
{
DAI
,
UNI
,
USDC
,
USDT
,
WBTC
,
WRAPPED_NATIVE_CURRENCY
}
from
'
../../constants/tokens
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
NEVER_RELOAD
,
useMultipleContractSingleData
}
from
'
../multicall/hooks
'
import
{
NEVER_RELOAD
,
useMultipleContractSingleData
}
from
'
../multicall/hooks
'
import
{
tryParseAmount
}
from
'
../swap/hooks
'
import
{
tryParseAmount
}
from
'
../swap/hooks
'
...
...
src/state/swap/hooks.tsx
View file @
ac962fb0
import
{
parseUnits
}
from
'
@ethersproject/units
'
import
{
parseUnits
}
from
'
@ethersproject/units
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Currency
,
CurrencyAmount
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Percent
,
TradeType
}
from
'
@uniswap/sdk-core
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useBestTrade
}
from
'
hooks/useBestTrade
'
import
{
useBestTrade
}
from
'
hooks/useBestTrade
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
ParsedQs
}
from
'
qs
'
import
{
ParsedQs
}
from
'
qs
'
...
@@ -12,7 +13,6 @@ import { useCurrency } from '../../hooks/Tokens'
...
@@ -12,7 +13,6 @@ import { useCurrency } from '../../hooks/Tokens'
import
useENS
from
'
../../hooks/useENS
'
import
useENS
from
'
../../hooks/useENS
'
import
useParsedQueryString
from
'
../../hooks/useParsedQueryString
'
import
useParsedQueryString
from
'
../../hooks/useParsedQueryString
'
import
useSwapSlippageTolerance
from
'
../../hooks/useSwapSlippageTolerance
'
import
useSwapSlippageTolerance
from
'
../../hooks/useSwapSlippageTolerance
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
isAddress
}
from
'
../../utils
'
import
{
isAddress
}
from
'
../../utils
'
import
{
AppState
}
from
'
../index
'
import
{
AppState
}
from
'
../index
'
import
{
useCurrencyBalances
}
from
'
../wallet/hooks
'
import
{
useCurrencyBalances
}
from
'
../wallet/hooks
'
...
...
src/state/transactions/hooks.tsx
View file @
ac962fb0
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useTransactionMonitoringEventCallback
}
from
'
hooks/useMonitoringEventCallback
'
import
{
useTransactionMonitoringEventCallback
}
from
'
hooks/useMonitoringEventCallback
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
addTransaction
,
TransactionInfo
,
TransactionType
}
from
'
./actions
'
import
{
addTransaction
,
TransactionInfo
,
TransactionType
}
from
'
./actions
'
import
{
TransactionDetails
}
from
'
./reducer
'
import
{
TransactionDetails
}
from
'
./reducer
'
...
...
src/state/transactions/updater.tsx
View file @
ac962fb0
import
{
DEFAULT_TXN_DISMISS_MS
,
L2_TXN_DISMISS_MS
}
from
'
constants/misc
'
import
{
DEFAULT_TXN_DISMISS_MS
,
L2_TXN_DISMISS_MS
}
from
'
constants/misc
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
{
useCallback
,
useEffect
,
useMemo
}
from
'
react
'
import
{
useCallback
,
useEffect
,
useMemo
}
from
'
react
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
state/hooks
'
import
{
L2_CHAIN_IDS
,
SupportedChainId
}
from
'
../../constants/chains
'
import
{
L2_CHAIN_IDS
,
SupportedChainId
}
from
'
../../constants/chains
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
retry
,
RetryableError
,
RetryOptions
}
from
'
../../utils/retry
'
import
{
retry
,
RetryableError
,
RetryOptions
}
from
'
../../utils/retry
'
import
{
useAddPopup
,
useBlockNumber
}
from
'
../application/hooks
'
import
{
useAddPopup
,
useBlockNumber
}
from
'
../application/hooks
'
import
{
updateBlockNumber
}
from
'
../application/reducer
'
import
{
updateBlockNumber
}
from
'
../application/reducer
'
...
...
src/state/user/hooks.tsx
View file @
ac962fb0
...
@@ -3,6 +3,7 @@ import { computePairAddress, Pair } from '@uniswap/v2-sdk'
...
@@ -3,6 +3,7 @@ import { computePairAddress, Pair } from '@uniswap/v2-sdk'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
SupportedLocale
}
from
'
constants/locales
'
import
{
SupportedLocale
}
from
'
constants/locales
'
import
{
L2_DEADLINE_FROM_NOW
}
from
'
constants/misc
'
import
{
L2_DEADLINE_FROM_NOW
}
from
'
constants/misc
'
import
useActiveWeb3React
from
'
hooks/useActiveWeb3React
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
useCallback
,
useMemo
}
from
'
react
'
import
{
shallowEqual
}
from
'
react-redux
'
import
{
shallowEqual
}
from
'
react-redux
'
...
@@ -11,7 +12,6 @@ import { useAppDispatch, useAppSelector } from 'state/hooks'
...
@@ -11,7 +12,6 @@ import { useAppDispatch, useAppSelector } from 'state/hooks'
import
{
V2_FACTORY_ADDRESSES
}
from
'
../../constants/addresses
'
import
{
V2_FACTORY_ADDRESSES
}
from
'
../../constants/addresses
'
import
{
BASES_TO_TRACK_LIQUIDITY_FOR
,
PINNED_PAIRS
}
from
'
../../constants/routing
'
import
{
BASES_TO_TRACK_LIQUIDITY_FOR
,
PINNED_PAIRS
}
from
'
../../constants/routing
'
import
{
useAllTokens
}
from
'
../../hooks/Tokens
'
import
{
useAllTokens
}
from
'
../../hooks/Tokens
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
AppState
}
from
'
../index
'
import
{
AppState
}
from
'
../index
'
import
{
import
{
addSerializedPair
,
addSerializedPair
,
...
...
src/state/wallet/hooks.ts
View file @
ac962fb0
This diff is collapsed.
Click to expand it.
src/theme/RadialGradientByChainUpdater.ts
View file @
ac962fb0
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment