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
bf7a40be
Commit
bf7a40be
authored
Dec 02, 2021
by
Justin Domingue
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' of
https://github.com/Uniswap/interface
parents
097b8361
82843ff1
Changes
107
Hide whitespace changes
Inline
Side-by-side
Showing
107 changed files
with
1121 additions
and
920 deletions
+1121
-920
.eslintrc.json
.eslintrc.json
+21
-1
lint.yml
.github/workflows/lint.yml
+7
-3
commands.js
cypress/support/commands.js
+1
-0
lingui.config.ts
lingui.config.ts
+3
-1
package.json
package.json
+0
-6
TransactionSummary.tsx
src/components/AccountDetails/TransactionSummary.tsx
+3
-3
index.tsx
src/components/AccountDetails/index.tsx
+5
-5
index.tsx
src/components/AddressInputPanel/index.tsx
+5
-4
FiatValue.tsx
src/components/CurrencyInputPanel/FiatValue.tsx
+3
-3
index.tsx
src/components/CurrencyInputPanel/index.tsx
+5
-5
index.tsx
src/components/ErrorBoundary/index.tsx
+34
-29
FeeOption.tsx
src/components/FeeSelector/FeeOption.tsx
+4
-4
FeeTierPercentageBadge.tsx
src/components/FeeSelector/FeeTierPercentageBadge.tsx
+3
-3
index.tsx
src/components/FeeSelector/index.tsx
+7
-7
Polling.tsx
src/components/Header/Polling.tsx
+2
-2
UniBalanceContent.tsx
src/components/Header/UniBalanceContent.tsx
+21
-21
index.tsx
src/components/Header/index.tsx
+3
-3
index.tsx
src/components/Identicon/index.tsx
+11
-9
InputStepCounter.tsx
src/components/InputStepCounter/InputStepCounter.tsx
+3
-3
Area.tsx
src/components/LiquidityChartRangeInput/Area.tsx
+1
-1
index.tsx
src/components/LiquidityChartRangeInput/index.tsx
+3
-3
index.tsx
src/components/ModalViews/index.tsx
+5
-5
index.tsx
src/components/NavigationTabs/index.tsx
+3
-3
ClaimPopup.tsx
src/components/Popups/ClaimPopup.tsx
+8
-8
TransactionPopup.tsx
src/components/Popups/TransactionPopup.tsx
+4
-4
index.tsx
src/components/PositionCard/index.tsx
+3
-3
index.tsx
src/components/PositionPreview/index.tsx
+33
-33
index.tsx
src/components/PrivacyPolicy/index.tsx
+12
-12
index.tsx
src/components/ProgressSteps/index.tsx
+2
-2
PresetsButtons.tsx
src/components/RangeSelector/PresetsButtons.tsx
+3
-3
RoutingDiagram.tsx
src/components/RoutingDiagram/RoutingDiagram.tsx
+4
-4
BlockedToken.tsx
src/components/SearchModal/BlockedToken.tsx
+4
-4
CurrencyList.tsx
src/components/SearchModal/CurrencyList.tsx
+5
-5
CurrencySearch.tsx
src/components/SearchModal/CurrencySearch.tsx
+5
-5
ImportList.tsx
src/components/SearchModal/ImportList.tsx
+20
-20
ImportRow.tsx
src/components/SearchModal/ImportRow.tsx
+8
-8
ImportToken.tsx
src/components/SearchModal/ImportToken.tsx
+5
-5
ManageLists.tsx
src/components/SearchModal/ManageLists.tsx
+9
-9
ManageTokens.tsx
src/components/SearchModal/ManageTokens.tsx
+11
-11
TokenImportCard.tsx
src/components/SearchModal/TokenImportCard.tsx
+10
-10
index.tsx
src/components/Settings/index.tsx
+5
-5
index.tsx
src/components/SwitchLocaleLink/index.tsx
+2
-2
ListToggle.tsx
src/components/Toggle/ListToggle.tsx
+2
-2
index.tsx
src/components/TransactionConfirmationModal/index.tsx
+3
-3
index.tsx
src/components/TransactionSettings/index.tsx
+7
-7
index.tsx
src/components/WalletModal/index.tsx
+7
-7
AddressClaimModal.tsx
src/components/claim/AddressClaimModal.tsx
+17
-17
ClaimModal.tsx
src/components/claim/ClaimModal.tsx
+24
-24
ClaimRewardModal.tsx
src/components/earn/ClaimRewardModal.tsx
+15
-15
PoolCard.tsx
src/components/earn/PoolCard.tsx
+15
-15
StakingModal.tsx
src/components/earn/StakingModal.tsx
+15
-15
UnstakingModal.tsx
src/components/earn/UnstakingModal.tsx
+23
-23
AdvancedSwapDetails.tsx
src/components/swap/AdvancedSwapDetails.tsx
+17
-17
RouterLabel.tsx
src/components/swap/RouterLabel.tsx
+4
-4
SwapHeader.tsx
src/components/swap/SwapHeader.tsx
+3
-3
SwapModalHeader.tsx
src/components/swap/SwapModalHeader.tsx
+17
-17
SwapRoute.tsx
src/components/swap/SwapRoute.tsx
+5
-5
TradePrice.tsx
src/components/swap/TradePrice.tsx
+3
-3
UnsupportedCurrencyFooter.tsx
src/components/swap/UnsupportedCurrencyFooter.tsx
+9
-9
styleds.tsx
src/components/swap/styleds.tsx
+2
-2
DelegateModal.tsx
src/components/vote/DelegateModal.tsx
+17
-15
ProposalEmptyState.tsx
src/components/vote/ProposalEmptyState.tsx
+5
-5
VoteModal.tsx
src/components/vote/VoteModal.tsx
+16
-16
Fortmatic.ts
src/connectors/Fortmatic.ts
+4
-4
governance.ts
src/constants/governance.ts
+1
-1
routing.ts
src/constants/routing.ts
+5
-0
tokens.ts
src/constants/tokens.ts
+21
-0
useERC20Permit.ts
src/hooks/useERC20Permit.ts
+7
-7
useMonitoringEventCallback.ts
src/hooks/useMonitoringEventCallback.ts
+99
-0
ja-JP.po
src/locales/ja-JP.po
+5
-5
ru-RU.po
src/locales/ru-RU.po
+3
-3
zh-CN.po
src/locales/zh-CN.po
+1
-1
index.tsx
src/pages/AddLiquidity/index.tsx
+39
-39
ConfirmAddModalBottom.tsx
src/pages/AddLiquidityV2/ConfirmAddModalBottom.tsx
+17
-17
PoolPriceBar.tsx
src/pages/AddLiquidityV2/PoolPriceBar.tsx
+5
-5
index.tsx
src/pages/AddLiquidityV2/index.tsx
+15
-15
ProposalSubmissionModal.tsx
src/pages/CreateProposal/ProposalSubmissionModal.tsx
+3
-3
index.tsx
src/pages/CreateProposal/index.tsx
+3
-3
Countdown.tsx
src/pages/Earn/Countdown.tsx
+3
-3
Manage.tsx
src/pages/Earn/Manage.tsx
+31
-31
index.tsx
src/pages/Earn/index.tsx
+9
-9
MigrateV2Pair.tsx
src/pages/MigrateV2/MigrateV2Pair.tsx
+55
-46
index.tsx
src/pages/MigrateV2/index.tsx
+10
-10
CTACards.tsx
src/pages/Pool/CTACards.tsx
+6
-6
PositionPage.tsx
src/pages/Pool/PositionPage.tsx
+55
-51
index.tsx
src/pages/Pool/index.tsx
+9
-9
v2.tsx
src/pages/Pool/v2.tsx
+17
-17
index.tsx
src/pages/PoolFinder/index.tsx
+3
-3
V3.tsx
src/pages/RemoveLiquidity/V3.tsx
+9
-9
index.tsx
src/pages/RemoveLiquidity/index.tsx
+5
-5
index.tsx
src/pages/Swap/index.tsx
+8
-8
Landing.tsx
src/pages/Vote/Landing.tsx
+26
-20
VotePage.tsx
src/pages/Vote/VotePage.tsx
+22
-22
styled.tsx
src/pages/Vote/styled.tsx
+2
-0
reducer.test.ts
src/state/application/reducer.test.ts
+3
-3
updater.ts
src/state/application/updater.ts
+1
-1
hooks.ts
src/state/governance/hooks.ts
+1
-1
reducer.test.ts
src/state/lists/reducer.test.ts
+1
-1
utils.test.ts
src/state/mint/v3/utils.test.ts
+22
-1
reducer.test.ts
src/state/multicall/reducer.test.ts
+12
-12
updater.test.ts
src/state/multicall/updater.test.ts
+20
-20
hooks.tsx
src/state/stake/hooks.tsx
+1
-1
hooks.tsx
src/state/swap/hooks.tsx
+1
-1
reducer.test.ts
src/state/transactions/reducer.test.ts
+2
-2
index.tsx
src/theme/index.tsx
+20
-17
uriToHttp.ts
src/utils/uriToHttp.ts
+1
-1
yarn.lock
yarn.lock
+6
-6
No files found.
.eslintrc.json
View file @
bf7a40be
...
...
@@ -8,13 +8,33 @@
"jsx"
:
true
}
},
"ignorePatterns"
:
[
"node_modules/**/*"
],
"settings"
:
{
"react"
:
{
"version"
:
"detect"
}
},
"ignorePatterns"
:
[
"src/types/v3"
,
"src/abis/types"
,
"src/locales/**/*.js"
,
"src/locales/**/en-US.po"
,
"src/state/data/generated.ts"
,
"node_modules"
,
"coverage"
,
"build"
,
"dist"
,
".DS_Store"
,
".env.local"
,
".env.development.local"
,
".env.test.local"
,
".env.production.local"
,
".idea/"
,
".vscode/"
,
"package-lock.json"
,
"yarn.lock"
],
"extends"
:
[
"react-app"
,
"plugin:react/recommended"
,
"plugin:@typescript-eslint/recommended"
,
"plugin:react-hooks/recommended"
,
...
...
.github/workflows/lint.yml
View file @
bf7a40be
...
...
@@ -11,7 +11,6 @@ on:
jobs
:
run-linters
:
name
:
Run linters
if
:
${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
runs-on
:
ubuntu-latest
steps
:
...
...
@@ -39,10 +38,15 @@ jobs:
-
name
:
Install dependencies
run
:
yarn install --frozen-lockfile
-
name
:
Run linters
-
name
:
Run eslint w/ autofix
if
:
${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
uses
:
wearerequired/lint-action@36c7e6689e80d785d27a22f71d970f3a3b4fcb70
with
:
github_token
:
${{ secrets.github_token }}
eslint
:
true
eslint_
extensions
:
js,jsx,ts,tsx,json
eslint_
args
:
"
-c
.eslintrc.json"
auto_fix
:
true
-
name
:
Run eslint
if
:
${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }}
run
:
yarn eslint .
cypress/support/commands.js
View file @
bf7a40be
...
...
@@ -74,6 +74,7 @@ class CustomizedBridge extends Eip1193Bridge {
}
// sets up the injected provider to be a mock ethereum provider with the given mnemonic/index
// eslint-disable-next-line no-undef
Cypress
.
Commands
.
overwrite
(
'
visit
'
,
(
original
,
url
,
options
)
=>
{
return
original
(
url
.
startsWith
(
'
/
'
)
&&
url
.
length
>
2
&&
!
url
.
startsWith
(
'
/#
'
)
?
`/#
${
url
}
`
:
url
,
{
...
options
,
...
...
lingui.config.ts
View file @
bf7a40be
export
default
{
const
linguiConfig
=
{
catalogs
:
[
{
path
:
'
<rootDir>/src/locales/{locale}
'
,
...
...
@@ -52,3 +52,5 @@ export default {
runtimeConfigModule
:
[
'
@lingui/core
'
,
'
i18n
'
],
sourceLocale
:
'
en-US
'
,
}
export
default
linguiConfig
package.json
View file @
bf7a40be
...
...
@@ -152,12 +152,6 @@
"bundle"
:
"microbundle --tsconfig tsconfig.lib.json src/lib/index.tsx --format esm,cjs"
,
"cosmos"
:
"open http://localhost:5000 && cross-env FAST_REFRESH=false cosmos"
},
"eslintConfig"
:
{
"extends"
:
"react-app"
,
"ignorePatterns"
:
[
"node_modules"
]
},
"browserslist"
:
{
"production"
:
[
">0.2%"
,
...
...
src/components/AccountDetails/TransactionSummary.tsx
View file @
bf7a40be
...
...
@@ -80,7 +80,7 @@ function ClaimSummary({ info: { recipient, uniAmountRaw } }: { info: ClaimTransa
)
}
function
SubmitProposalTransactionSummary
(
{}
:
{
info
:
SubmitProposalTransactionInfo
})
{
function
SubmitProposalTransactionSummary
(
_
:
{
info
:
SubmitProposalTransactionInfo
})
{
return
<
Trans
>
Submit new proposal
</
Trans
>
}
...
...
@@ -147,13 +147,13 @@ function WrapSummary({ info: { currencyAmountRaw, unwrapped } }: { info: WrapTra
}
}
function
DepositLiquidityStakingSummary
(
{}
:
{
info
:
DepositLiquidityStakingTransactionInfo
})
{
function
DepositLiquidityStakingSummary
(
_
:
{
info
:
DepositLiquidityStakingTransactionInfo
})
{
// not worth rendering the tokens since you can should no longer deposit liquidity in the staking contracts
// todo: deprecate and delete the code paths that allow this, show user more information
return
<
Trans
>
Deposit liquidity
</
Trans
>
}
function
WithdrawLiquidityStakingSummary
(
{}
:
{
info
:
WithdrawLiquidityStakingTransactionInfo
})
{
function
WithdrawLiquidityStakingSummary
(
_
:
{
info
:
WithdrawLiquidityStakingTransactionInfo
})
{
return
<
Trans
>
Withdraw deposited liquidity
</
Trans
>
}
...
...
src/components/AccountDetails/index.tsx
View file @
bf7a40be
...
...
@@ -10,7 +10,7 @@ import { injected, portis, walletlink } from '../../connectors'
import
{
SUPPORTED_WALLETS
}
from
'
../../constants/wallet
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
clearAllTransactions
}
from
'
../../state/transactions/actions
'
import
{
ExternalLink
,
LinkStyledButton
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
LinkStyledButton
,
T
hemedText
}
from
'
../../theme
'
import
{
shortenAddress
}
from
'
../../utils
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
ButtonSecondary
}
from
'
../Button
'
...
...
@@ -378,9 +378,9 @@ export default function AccountDetails({
{
!!
pendingTransactions
.
length
||
!!
confirmedTransactions
.
length
?
(
<
LowerSection
>
<
AutoRow
mb=
{
'
1rem
'
}
style=
{
{
justifyContent
:
'
space-between
'
}
}
>
<
T
YPE
.
b
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
Recent Transactions
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
LinkStyledButton
onClick=
{
clearAllTransactionsCallback
}
>
<
Trans
>
(clear all)
</
Trans
>
</
LinkStyledButton
>
...
...
@@ -390,9 +390,9 @@ export default function AccountDetails({
</
LowerSection
>
)
:
(
<
LowerSection
>
<
T
YPE
.
b
ody
color=
{
theme
.
text1
}
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text1
}
>
<
Trans
>
Your transactions will appear here...
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
LowerSection
>
)
}
</>
...
...
src/components/AddressInputPanel/index.tsx
View file @
bf7a40be
import
{
Trans
}
from
'
@lingui/macro
'
// eslint-disable-next-line no-restricted-imports
import
{
t
,
Trans
}
from
'
@lingui/macro
'
import
{
t
}
from
'
@lingui/macro
'
import
{
ReactNode
,
useCallback
,
useContext
}
from
'
react
'
import
styled
,
{
ThemeContext
}
from
'
styled-components/macro
'
import
useENS
from
'
../../hooks/useENS
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
ExternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
AutoColumn
}
from
'
../Column
'
import
{
RowBetween
}
from
'
../Row
'
...
...
@@ -107,9 +108,9 @@ export default function AddressInputPanel({
<
InputContainer
>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
b
lack
color=
{
theme
.
text2
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
T
hemedText
.
B
lack
color=
{
theme
.
text2
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
{
label
??
<
Trans
>
Recipient
</
Trans
>
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
{
address
&&
chainId
&&
(
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
name
??
address
,
ExplorerDataType
.
ADDRESS
)
}
...
...
src/components/CurrencyInputPanel/FiatValue.tsx
View file @
bf7a40be
...
...
@@ -4,7 +4,7 @@ import HoverInlineText from 'components/HoverInlineText'
import
{
useMemo
}
from
'
react
'
import
useTheme
from
'
../../hooks/useTheme
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
warningSeverity
}
from
'
../../utils/prices
'
export
function
FiatValue
({
...
...
@@ -25,7 +25,7 @@ export function FiatValue({
},
[
priceImpact
,
theme
.
green1
,
theme
.
red1
,
theme
.
text3
,
theme
.
yellow1
])
return
(
<
T
YPE
.
b
ody
fontSize=
{
14
}
color=
{
fiatValue
?
theme
.
text2
:
theme
.
text4
}
>
<
T
hemedText
.
B
ody
fontSize=
{
14
}
color=
{
fiatValue
?
theme
.
text2
:
theme
.
text4
}
>
{
fiatValue
?
(
<
Trans
>
~$
<
HoverInlineText
text=
{
fiatValue
?.
toSignificant
(
6
,
{
groupSeparator
:
'
,
'
})
}
/>
...
...
@@ -39,6 +39,6 @@ export function FiatValue({
(
<
Trans
>
{
priceImpact
.
multiply
(
-
1
).
toSignificant
(
3
)
}
%
</
Trans
>
)
</
span
>
)
:
null
}
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
)
}
src/components/CurrencyInputPanel/index.tsx
View file @
bf7a40be
...
...
@@ -13,7 +13,7 @@ import { ReactComponent as DropDown } from '../../assets/images/dropdown.svg'
import
useTheme
from
'
../../hooks/useTheme
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useCurrencyBalance
}
from
'
../../state/wallet/hooks
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
ButtonGray
}
from
'
../Button
'
import
CurrencyLogo
from
'
../CurrencyLogo
'
import
DoubleCurrencyLogo
from
'
../DoubleLogo
'
...
...
@@ -212,9 +212,9 @@ export default function CurrencyInputPanel({
<
FixedContainer
>
<
AutoColumn
gap=
"sm"
justify=
"center"
>
<
Lock
/>
<
T
YPE
.
l
abel
fontSize=
"12px"
textAlign=
"center"
padding=
"0 12px"
>
<
T
hemedText
.
L
abel
fontSize=
"12px"
textAlign=
"center"
padding=
"0 12px"
>
<
Trans
>
The market price is outside your specified price range. Single-asset deposit only.
</
Trans
>
</
T
YPE
.
l
abel
>
</
T
hemedText
.
L
abel
>
</
AutoColumn
>
</
FixedContainer
>
)
}
...
...
@@ -271,7 +271,7 @@ export default function CurrencyInputPanel({
<
RowBetween
>
{
account
?
(
<
RowFixed
style=
{
{
height
:
'
17px
'
}
}
>
<
T
YPE
.
b
ody
<
T
hemedText
.
B
ody
onClick=
{
onMax
}
color=
{
theme
.
text2
}
fontWeight=
{
400
}
...
...
@@ -287,7 +287,7 @@ export default function CurrencyInputPanel({
</
Trans
>
)
)
:
null
}
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
{
showMaxButton
&&
selectedCurrencyBalance
?
(
<
StyledBalanceMax
onClick=
{
onMax
}
>
<
Trans
>
(Max)
</
Trans
>
...
...
src/components/ErrorBoundary/index.tsx
View file @
bf7a40be
...
...
@@ -4,7 +4,7 @@ import ReactGA from 'react-ga'
import
styled
from
'
styled-components/macro
'
import
store
,
{
AppState
}
from
'
../../state
'
import
{
ExternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
userAgent
}
from
'
../../utils/userAgent
'
import
{
AutoColumn
}
from
'
../Column
'
import
{
AutoRow
}
from
'
../Row
'
...
...
@@ -47,6 +47,8 @@ type ErrorBoundaryState = {
error
:
Error
|
null
}
const
IS_UNISWAP
=
window
.
location
.
hostname
===
'
app.uniswap.org
'
export
default
class
ErrorBoundary
extends
React
.
Component
<
unknown
,
ErrorBoundaryState
>
{
constructor
(
props
:
unknown
)
{
super
(
props
)
...
...
@@ -67,6 +69,7 @@ export default class ErrorBoundary extends React.Component<unknown, ErrorBoundar
render
()
{
const
{
error
}
=
this
.
state
if
(
error
!==
null
)
{
const
encodedBody
=
encodeURIComponent
(
issueBody
(
error
))
return
(
...
...
@@ -74,39 +77,41 @@ export default class ErrorBoundary extends React.Component<unknown, ErrorBoundar
<
BodyWrapper
>
<
AutoColumn
gap=
{
'
md
'
}
>
<
SomethingWentWrongWrapper
>
<
T
YPE
.
l
abel
fontSize=
{
24
}
fontWeight=
{
600
}
>
<
T
hemedText
.
L
abel
fontSize=
{
24
}
fontWeight=
{
600
}
>
<
Trans
>
Something went wrong
</
Trans
>
</
T
YPE
.
l
abel
>
</
T
hemedText
.
L
abel
>
</
SomethingWentWrongWrapper
>
<
CodeBlockWrapper
>
<
code
>
<
T
YPE
.
main
fontSize=
{
10
}
>
{
error
.
stack
}
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
fontSize=
{
10
}
>
{
error
.
stack
}
</
ThemedText
.
M
ain
>
</
code
>
</
CodeBlockWrapper
>
<
AutoRow
>
<
LinkWrapper
>
<
ExternalLink
id=
"create-github-issue-link"
href=
{
`https://github.com/Uniswap/uniswap-interface/issues/new?assignees=&labels=bug&body=${encodedBody}&title=${encodeURIComponent(
`
Crash
report
:
\
`${error.name}${error.message && `
:
$
{
error
.
message
}
`}\``
)}
`
}
target=
"_blank"
>
<
TYPE
.
link
fontSize=
{
16
}
>
<
Trans
>
Create an issue on GitHub
</
Trans
>
<
span
>
↗
</
span
>
</
TYPE
.
link
>
</
ExternalLink
>
</
LinkWrapper
>
<
LinkWrapper
>
<
ExternalLink
id=
"get-support-on-discord"
href=
"https://discord.gg/FCfyBSbCU5"
target=
"_blank"
>
<
TYPE
.
link
fontSize=
{
16
}
>
<
Trans
>
Get support on Discord
</
Trans
>
<
span
>
↗
</
span
>
</
TYPE
.
link
>
</
ExternalLink
>
</
LinkWrapper
>
</
AutoRow
>
{
IS_UNISWAP
?
(
<
AutoRow
>
<
LinkWrapper
>
<
ExternalLink
id=
"create-github-issue-link"
href=
{
`https://github.com/Uniswap/uniswap-interface/issues/new?assignees=&labels=bug&body=${encodedBody}&title=${encodeURIComponent(
`
Crash
report
:
\
`${error.name}${error.message && `
:
$
{
error
.
message
}
`}\``
)}
`
}
target=
"_blank"
>
<
ThemedText
.
Link
fontSize=
{
16
}
>
<
Trans
>
Create an issue on GitHub
</
Trans
>
<
span
>
↗
</
span
>
</
ThemedText
.
Link
>
</
ExternalLink
>
</
LinkWrapper
>
<
LinkWrapper
>
<
ExternalLink
id=
"get-support-on-discord"
href=
"https://discord.gg/FCfyBSbCU5"
target=
"_blank"
>
<
ThemedText
.
Link
fontSize=
{
16
}
>
<
Trans
>
Get support on Discord
</
Trans
>
<
span
>
↗
</
span
>
</
ThemedText
.
Link
>
</
ExternalLink
>
</
LinkWrapper
>
</
AutoRow
>
)
:
null
}
</
AutoColumn
>
</
BodyWrapper
>
</
FallbackWrapper
>
...
...
@@ -121,7 +126,7 @@ function getRelevantState(): null | keyof AppState {
if
(
!
path
.
startsWith
(
'
#/
'
))
{
return
null
}
const
pieces
=
path
.
substring
(
2
).
split
(
/
[
\
/\\
?
]
/
)
const
pieces
=
path
.
substring
(
2
).
split
(
/
[/\\
?
]
/
)
switch
(
pieces
[
0
])
{
case
'
swap
'
:
return
'
swap
'
...
...
src/components/FeeSelector/FeeOption.tsx
View file @
bf7a40be
...
...
@@ -6,12 +6,12 @@ import { useFeeTierDistribution } from 'hooks/useFeeTierDistribution'
import
{
PoolState
}
from
'
hooks/usePools
'
import
React
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
{
FeeTierPercentageBadge
}
from
'
./FeeTierPercentageBadge
'
import
{
FEE_AMOUNT_DETAIL
}
from
'
./shared
'
const
ResponsiveText
=
styled
(
T
YPE
.
l
abel
)
`
const
ResponsiveText
=
styled
(
T
hemedText
.
L
abel
)
`
line-height: 16px;
font-size: 14px;
...
...
@@ -37,9 +37,9 @@ export function FeeOption({ feeAmount, active, poolState, distributions, onClick
<
ResponsiveText
>
<
Trans
>
{
FEE_AMOUNT_DETAIL
[
feeAmount
].
label
}
%
</
Trans
>
</
ResponsiveText
>
<
T
YPE
.
m
ain
fontWeight=
{
400
}
fontSize=
"12px"
textAlign=
"left"
>
<
T
hemedText
.
M
ain
fontWeight=
{
400
}
fontSize=
"12px"
textAlign=
"left"
>
{
FEE_AMOUNT_DETAIL
[
feeAmount
].
description
}
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
AutoColumn
>
{
distributions
&&
(
...
...
src/components/FeeSelector/FeeTierPercentageBadge.tsx
View file @
bf7a40be
...
...
@@ -4,7 +4,7 @@ import Badge from 'components/Badge'
import
{
useFeeTierDistribution
}
from
'
hooks/useFeeTierDistribution
'
import
{
PoolState
}
from
'
hooks/usePools
'
import
React
from
'
react
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
export
function
FeeTierPercentageBadge
({
feeAmount
,
...
...
@@ -17,7 +17,7 @@ export function FeeTierPercentageBadge({
})
{
return
(
<
Badge
>
<
T
YPE
.
l
abel
fontSize=
{
10
}
>
<
T
hemedText
.
L
abel
fontSize=
{
10
}
>
{
!
distributions
||
poolState
===
PoolState
.
NOT_EXISTS
||
poolState
===
PoolState
.
INVALID
?
(
<
Trans
>
Not created
</
Trans
>
)
:
distributions
[
feeAmount
]
!==
undefined
?
(
...
...
@@ -25,7 +25,7 @@ export function FeeTierPercentageBadge({
)
:
(
<
Trans
>
No data
</
Trans
>
)
}
</
T
YPE
.
l
abel
>
</
T
hemedText
.
L
abel
>
</
Badge
>
)
}
src/components/FeeSelector/index.tsx
View file @
bf7a40be
...
...
@@ -14,7 +14,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import
ReactGA
from
'
react-ga
'
import
{
Box
}
from
'
rebass
'
import
styled
,
{
keyframes
}
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
{
FeeOption
}
from
'
./FeeOption
'
import
{
FeeTierPercentageBadge
}
from
'
./FeeTierPercentageBadge
'
...
...
@@ -149,18 +149,18 @@ export default function FeeSelector({
<
AutoColumn
id=
"add-liquidity-selected-fee"
>
{
!
feeAmount
?
(
<>
<
T
YPE
.
l
abel
>
<
T
hemedText
.
L
abel
>
<
Trans
>
Fee tier
</
Trans
>
</
T
YPE
.
l
abel
>
<
T
YPE
.
m
ain
fontWeight=
{
400
}
fontSize=
"12px"
textAlign=
"left"
>
</
T
hemedText
.
L
abel
>
<
T
hemedText
.
M
ain
fontWeight=
{
400
}
fontSize=
"12px"
textAlign=
"left"
>
<
Trans
>
The % you will earn in fees.
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</>
)
:
(
<>
<
T
YPE
.
l
abel
className=
"selected-fee-label"
>
<
T
hemedText
.
L
abel
className=
"selected-fee-label"
>
<
Trans
>
{
FEE_AMOUNT_DETAIL
[
feeAmount
].
label
}
% fee tier
</
Trans
>
</
T
YPE
.
l
abel
>
</
T
hemedText
.
L
abel
>
<
Box
style=
{
{
width
:
'
fit-content
'
,
marginTop
:
'
8px
'
}
}
className=
"selected-fee-percentage"
>
{
distributions
&&
(
<
FeeTierPercentageBadge
...
...
src/components/Header/Polling.tsx
View file @
bf7a40be
...
...
@@ -6,7 +6,7 @@ import ms from 'ms.macro'
import
{
useEffect
,
useState
}
from
'
react
'
import
{
useBlockNumber
}
from
'
state/application/hooks
'
import
styled
,
{
keyframes
}
from
'
styled-components/macro
'
import
{
ExternalLink
,
T
YPE
}
from
'
theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
utils/getExplorerLink
'
import
{
ChainConnectivityWarning
}
from
'
./ChainConnectivityWarning
'
...
...
@@ -25,7 +25,7 @@ const StyledPolling = styled.div<{ warning: boolean }>`
display: none;
`
}
`
const
StyledPollingNumber
=
styled
(
T
YPE
.
s
mall
)
<
{
breathe
:
boolean
;
hovering
:
boolean
}
>
`
const
StyledPollingNumber
=
styled
(
T
hemedText
.
S
mall
)
<
{
breathe
:
boolean
;
hovering
:
boolean
}
>
`
transition: opacity 0.25s ease;
opacity:
${({
breathe
,
hovering
})
=>
(
hovering
?
0.7
:
breathe
?
1
:
0.5
)}
;
:hover {
...
...
src/components/Header/UniBalanceContent.tsx
View file @
bf7a40be
...
...
@@ -14,7 +14,7 @@ import useUSDCPrice from '../../hooks/useUSDCPrice'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useTotalUniEarned
}
from
'
../../state/stake/hooks
'
import
{
useAggregateUniBalance
,
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
ExternalLink
,
StyledInternalLink
,
T
YPE
,
UniTokenAnimated
}
from
'
../../theme
'
import
{
ExternalLink
,
StyledInternalLink
,
T
hemedText
,
UniTokenAnimated
}
from
'
../../theme
'
import
{
computeUniCirculation
}
from
'
../../utils/computeUniCirculation
'
import
{
AutoColumn
}
from
'
../Column
'
import
{
Break
,
CardBGImage
,
CardNoise
,
CardSection
,
DataCard
}
from
'
../earn/styled
'
...
...
@@ -70,9 +70,9 @@ export default function UniBalanceContent({ setShowUniBalanceModal }: { setShowU
<
CardNoise
/>
<
CardSection
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
color=
"white"
>
<
T
hemedText
.
W
hite
color=
"white"
>
<
Trans
>
Your UNI Breakdown
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
StyledClose
stroke=
"white"
onClick=
{
()
=>
setShowUniBalanceModal
(
false
)
}
/>
</
RowBetween
>
</
CardSection
>
...
...
@@ -82,29 +82,29 @@ export default function UniBalanceContent({ setShowUniBalanceModal }: { setShowU
<
CardSection
gap=
"sm"
>
<
AutoColumn
gap=
"md"
justify=
"center"
>
<
UniTokenAnimated
width=
"48px"
src=
{
tokenLogo
}
/>
{
'
'
}
<
T
YPE
.
w
hite
fontSize=
{
48
}
fontWeight=
{
600
}
color=
"white"
>
<
T
hemedText
.
W
hite
fontSize=
{
48
}
fontWeight=
{
600
}
color=
"white"
>
{
total
?.
toFixed
(
2
,
{
groupSeparator
:
'
,
'
})
}
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
AutoColumn
>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
color=
"white"
>
<
T
hemedText
.
W
hite
color=
"white"
>
<
Trans
>
Balance:
</
Trans
>
</
T
YPE
.
w
hite
>
<
T
YPE
.
white
color=
"white"
>
{
uniBalance
?.
toFixed
(
2
,
{
groupSeparator
:
'
,
'
})
}
</
TYPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
White
color=
"white"
>
{
uniBalance
?.
toFixed
(
2
,
{
groupSeparator
:
'
,
'
})
}
</
ThemedText
.
W
hite
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
w
hite
color=
"white"
>
<
T
hemedText
.
W
hite
color=
"white"
>
<
Trans
>
Unclaimed:
</
Trans
>
</
T
YPE
.
w
hite
>
<
T
YPE
.
w
hite
color=
"white"
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
W
hite
color=
"white"
>
{
uniToClaim
?.
toFixed
(
4
,
{
groupSeparator
:
'
,
'
})
}{
'
'
}
{
uniToClaim
&&
uniToClaim
.
greaterThan
(
'
0
'
)
&&
(
<
StyledInternalLink
onClick=
{
()
=>
setShowUniBalanceModal
(
false
)
}
to=
"/uni"
>
<
Trans
>
(claim)
</
Trans
>
</
StyledInternalLink
>
)
}
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
</
AutoColumn
>
</
CardSection
>
...
...
@@ -114,22 +114,22 @@ export default function UniBalanceContent({ setShowUniBalanceModal }: { setShowU
<
CardSection
gap=
"sm"
>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
color=
"white"
>
<
T
hemedText
.
W
hite
color=
"white"
>
<
Trans
>
UNI price:
</
Trans
>
</
T
YPE
.
w
hite
>
<
T
YPE
.
white
color=
"white"
>
$
{
uniPrice
?.
toFixed
(
2
)
??
'
-
'
}
</
TYPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
White
color=
"white"
>
$
{
uniPrice
?.
toFixed
(
2
)
??
'
-
'
}
</
ThemedText
.
W
hite
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
w
hite
color=
"white"
>
<
T
hemedText
.
W
hite
color=
"white"
>
<
Trans
>
UNI in circulation:
</
Trans
>
</
T
YPE
.
w
hite
>
<
T
YPE
.
white
color=
"white"
>
{
circulation
?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
})
}
</
TYPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
White
color=
"white"
>
{
circulation
?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
})
}
</
ThemedText
.
W
hite
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
w
hite
color=
"white"
>
<
T
hemedText
.
W
hite
color=
"white"
>
<
Trans
>
Total Supply
</
Trans
>
</
T
YPE
.
w
hite
>
<
T
YPE
.
white
color=
"white"
>
{
totalSupply
?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
})
}
</
TYPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
White
color=
"white"
>
{
totalSupply
?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
})
}
</
ThemedText
.
W
hite
>
</
RowBetween
>
{
uni
&&
uni
.
chainId
===
1
?
(
<
ExternalLink
href=
{
`${infoLink}/token/${uni.address}`
}
>
...
...
src/components/Header/index.tsx
View file @
bf7a40be
...
...
@@ -15,7 +15,7 @@ import styled from 'styled-components/macro'
import
{
ReactComponent
as
Logo
}
from
'
../../assets/svg/logo.svg
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
ExternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
../../theme
'
import
ClaimModal
from
'
../claim/ClaimModal
'
import
{
CardNoise
}
from
'
../earn/styled
'
import
Menu
from
'
../Menu
'
...
...
@@ -309,7 +309,7 @@ export default function Header() {
{
availableClaim
&&
!
showClaimPopup
&&
(
<
UNIWrapper
onClick=
{
toggleClaimModal
}
>
<
UNIAmount
active=
{
!!
account
&&
!
availableClaim
}
style=
{
{
pointerEvents
:
'
auto
'
}
}
>
<
T
YPE
.
w
hite
padding=
"0 2px"
>
<
T
hemedText
.
W
hite
padding=
"0 2px"
>
{
claimTxn
&&
!
claimTxn
?.
receipt
?
(
<
Dots
>
<
Trans
>
Claiming UNI
</
Trans
>
...
...
@@ -317,7 +317,7 @@ export default function Header() {
)
:
(
<
Trans
>
Claim UNI
</
Trans
>
)
}
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
UNIAmount
>
<
CardNoise
/>
</
UNIWrapper
>
...
...
src/components/Identicon/index.tsx
View file @
bf7a40be
import
jazzicon
from
'
@metamask/jazzicon
'
import
useENSAvatar
from
'
hooks/useENSAvatar
'
import
{
use
Effect
,
useRef
,
useState
}
from
'
react
'
import
{
use
LayoutEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
...
...
@@ -20,27 +20,29 @@ const StyledAvatar = styled.img`
`
export
default
function
Identicon
()
{
const
ref
=
useRef
<
HTMLDivElement
>
(
null
)
const
{
account
}
=
useActiveWeb3React
()
const
{
avatar
}
=
useENSAvatar
(
account
??
undefined
)
const
[
fetchable
,
setFetchable
]
=
useState
(
true
)
useEffect
(()
=>
{
if
((
!
avatar
||
!
fetchable
)
&&
account
)
{
const
icon
=
jazzicon
(
16
,
parseInt
(
account
?.
slice
(
2
,
10
),
16
))
const
current
=
ref
.
current
const
icon
=
useMemo
(()
=>
account
&&
jazzicon
(
16
,
parseInt
(
account
.
slice
(
2
,
10
),
16
)),
[
account
])
const
iconRef
=
useRef
<
HTMLDivElement
>
(
null
)
useLayoutEffect
(()
=>
{
const
current
=
iconRef
.
current
if
(
icon
)
{
current
?.
appendChild
(
icon
)
return
()
=>
{
current
?.
removeChild
(
icon
)
}
}
return
},
[
account
,
avatar
,
fetchable
])
},
[
icon
,
iconRef
])
return
(
<
StyledIdenticon
ref=
{
ref
}
>
{
avatar
&&
fetchable
&&
(
<
StyledIdenticon
>
{
avatar
&&
fetchable
?
(
<
StyledAvatar
alt=
"avatar"
src=
{
avatar
}
onError=
{
()
=>
setFetchable
(
false
)
}
></
StyledAvatar
>
)
:
(
<
span
ref=
{
iconRef
}
/>
)
}
</
StyledIdenticon
>
)
...
...
src/components/InputStepCounter/InputStepCounter.tsx
View file @
bf7a40be
...
...
@@ -6,7 +6,7 @@ import { AutoColumn } from 'components/Column'
import
{
ReactNode
,
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
Minus
,
Plus
}
from
'
react-feather
'
import
styled
,
{
keyframes
}
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
{
Input
as
NumericalInput
}
from
'
../NumericalInput
'
...
...
@@ -57,13 +57,13 @@ const StyledInput = styled(NumericalInput)<{ usePercent?: boolean }>`
`
}
;
`
const
InputTitle
=
styled
(
T
YPE
.
s
mall
)
`
const
InputTitle
=
styled
(
T
hemedText
.
S
mall
)
`
color:
${({
theme
})
=>
theme
.
text2
}
;
font-size: 12px;
font-weight: 500;
`
const
ButtonLabel
=
styled
(
T
YPE
.
w
hite
)
<
{
disabled
:
boolean
}
>
`
const
ButtonLabel
=
styled
(
T
hemedText
.
W
hite
)
<
{
disabled
:
boolean
}
>
`
color:
${({
theme
,
disabled
})
=>
(
disabled
?
theme
.
text2
:
theme
.
text1
)}
!important;
`
...
...
src/components/LiquidityChartRangeInput/Area.tsx
View file @
bf7a40be
...
...
@@ -37,7 +37,7 @@ export const Area = ({
.y0(yScale(0))(
series.filter((d) => {
const value = xScale(xValue(d))
return value > 0 && value <= innerWidth
return value > 0 && value <=
window.
innerWidth
}) as Iterable<[number, number]>
) ?? undefined
}
...
...
src/components/LiquidityChartRangeInput/index.tsx
View file @
bf7a40be
...
...
@@ -14,7 +14,7 @@ import { batch } from 'react-redux'
import
{
Bound
}
from
'
state/mint/v3/actions
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
Chart
}
from
'
./Chart
'
import
{
useDensityChartData
}
from
'
./hooks
'
import
{
ZoomLevels
}
from
'
./types
'
...
...
@@ -58,9 +58,9 @@ function InfoBox({ message, icon }: { message?: ReactNode; icon: ReactNode }) {
<
ColumnCenter
style=
{
{
height
:
'
100%
'
,
justifyContent
:
'
center
'
}
}
>
{
icon
}
{
message
&&
(
<
T
YPE
.
m
ediumHeader
padding=
{
10
}
marginTop=
"20px"
textAlign=
"center"
>
<
T
hemedText
.
M
ediumHeader
padding=
{
10
}
marginTop=
"20px"
textAlign=
"center"
>
{
message
}
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
)
}
</
ColumnCenter
>
)
...
...
src/components/ModalViews/index.tsx
View file @
bf7a40be
...
...
@@ -5,7 +5,7 @@ import styled, { ThemeContext } from 'styled-components/macro'
import
Circle
from
'
../../assets/images/blue-loader.svg
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
CloseIcon
,
CustomLightSpinner
,
T
YPE
}
from
'
../../theme
'
import
{
CloseIcon
,
CustomLightSpinner
,
T
hemedText
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme/components
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
AutoColumn
,
ColumnCenter
}
from
'
../Column
'
...
...
@@ -32,9 +32,9 @@ export function LoadingView({ children, onDismiss }: { children: any; onDismiss:
</
ConfirmedIcon
>
<
AutoColumn
gap=
"100px"
justify=
{
'
center
'
}
>
{
children
}
<
T
YPE
.
s
ubHeader
>
<
T
hemedText
.
S
ubHeader
>
<
Trans
>
Confirm this transaction in your wallet
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
AutoColumn
>
</
ConfirmOrLoadingWrapper
>
)
...
...
@@ -68,9 +68,9 @@ export function SubmittedView({
href=
{
getExplorerLink
(
chainId
,
hash
,
ExplorerDataType
.
TRANSACTION
)
}
style=
{
{
marginLeft
:
'
4px
'
}
}
>
<
T
YPE
.
s
ubHeader
>
<
T
hemedText
.
S
ubHeader
>
<
Trans
>
View transaction on Explorer
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
ExternalLink
>
)
}
</
AutoColumn
>
...
...
src/components/NavigationTabs/index.tsx
View file @
bf7a40be
...
...
@@ -10,7 +10,7 @@ import { useAppDispatch } from 'state/hooks'
import
{
resetMintState
}
from
'
state/mint/actions
'
import
{
resetMintState
as
resetMintV3State
}
from
'
state/mint/v3/actions
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
Row
,
{
RowBetween
}
from
'
../Row
'
import
SettingsTab
from
'
../Settings
'
...
...
@@ -136,7 +136,7 @@ export function AddRemoveTabs({
>
<
StyledArrowLeft
stroke=
{
theme
.
text2
}
/>
</
StyledHistoryLink
>
<
T
YPE
.
m
ediumHeader
<
T
hemedText
.
M
ediumHeader
fontWeight=
{
500
}
fontSize=
{
20
}
style=
{
{
flex
:
'
1
'
,
margin
:
'
auto
'
,
textAlign
:
children
?
'
start
'
:
'
center
'
}
}
...
...
@@ -148,7 +148,7 @@ export function AddRemoveTabs({
)
:
(
<
Trans
>
Remove Liquidity
</
Trans
>
)
}
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
Box
style=
{
{
marginRight
:
'
.5rem
'
}
}
>
{
children
}
</
Box
>
<
SettingsTab
placeholderSlippage=
{
defaultSlippage
}
/>
</
RowBetween
>
...
...
src/components/Popups/ClaimPopup.tsx
View file @
bf7a40be
...
...
@@ -6,7 +6,6 @@ import ReactGA from 'react-ga'
import
styled
,
{
keyframes
}
from
'
styled-components/macro
'
import
tokenLogo
from
'
../../assets/images/token-logo.png
'
import
{
ButtonPrimary
}
from
'
../../components/Button
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useModalOpen
,
...
...
@@ -16,7 +15,8 @@ import {
}
from
'
../../state/application/hooks
'
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
useUserHasAvailableClaim
,
useUserUnclaimedAmount
}
from
'
../../state/claim/hooks
'
import
{
TYPE
}
from
'
../../theme
'
import
{
ThemedText
}
from
'
../../theme
'
import
{
ButtonPrimary
}
from
'
../Button
'
import
{
AutoColumn
}
from
'
../Column
'
import
{
CardBGImage
,
CardNoise
}
from
'
../earn/styled
'
...
...
@@ -98,10 +98,10 @@ export default function ClaimPopup() {
<
StyledClose
stroke=
"white"
onClick=
{
toggleShowClaimPopup
}
/>
<
AutoColumn
style=
{
{
padding
:
'
2rem 0
'
,
zIndex
:
10
}
}
justify=
"center"
>
<
UniToken
width=
"48px"
src=
{
tokenLogo
}
/>
{
'
'
}
<
T
YPE
.
w
hite
style=
{
{
marginTop
:
'
1rem
'
}
}
fontSize=
{
36
}
fontWeight=
{
600
}
>
<
T
hemedText
.
W
hite
style=
{
{
marginTop
:
'
1rem
'
}
}
fontSize=
{
36
}
fontWeight=
{
600
}
>
{
unclaimedAmount
?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
}
??
'
-
'
)
}
UNI
</
T
YPE
.
w
hite
>
<
T
YPE
.
w
hite
style=
{
{
paddingTop
:
'
1.25rem
'
,
textAlign
:
'
center
'
}
}
fontWeight=
{
600
}
color=
"white"
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
W
hite
style=
{
{
paddingTop
:
'
1.25rem
'
,
textAlign
:
'
center
'
}
}
fontWeight=
{
600
}
color=
"white"
>
<
span
role=
"img"
aria
-
label=
"party"
>
🎉
</
span
>
{
'
'
}
...
...
@@ -109,12 +109,12 @@ export default function ClaimPopup() {
<
span
role=
"img"
aria
-
label=
"party"
>
🎉
</
span
>
</
T
YPE
.
w
hite
>
<
T
YPE
.
s
ubHeader
style=
{
{
paddingTop
:
'
0.5rem
'
,
textAlign
:
'
center
'
}
}
color=
"white"
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
S
ubHeader
style=
{
{
paddingTop
:
'
0.5rem
'
,
textAlign
:
'
center
'
}
}
color=
"white"
>
<
Trans
>
Thanks for being part of the Uniswap community
<
Heart
size=
{
12
}
/>
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
AutoColumn
>
<
AutoColumn
style=
{
{
zIndex
:
10
}
}
justify=
"center"
>
<
ButtonPrimary
padding=
"8px"
$borderRadius=
"8px"
width=
{
'
fit-content
'
}
onClick=
{
handleToggleSelfClaimModal
}
>
...
...
src/components/Popups/TransactionPopup.tsx
View file @
bf7a40be
...
...
@@ -4,8 +4,8 @@ import styled, { ThemeContext } from 'styled-components/macro'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useTransaction
}
from
'
../../state/transactions/hooks
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme
/components
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
TransactionSummary
}
from
'
../AccountDetails/TransactionSummary
'
import
{
AutoColumn
}
from
'
../Column
'
...
...
@@ -30,9 +30,9 @@ export default function TransactionPopup({ hash }: { hash: string }) {
{
success
?
<
CheckCircle
color=
{
theme
.
green1
}
size=
{
24
}
/>
:
<
AlertCircle
color=
{
theme
.
red1
}
size=
{
24
}
/>
}
</
div
>
<
AutoColumn
gap=
"8px"
>
<
T
YPE
.
b
ody
fontWeight=
{
500
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
500
}
>
<
TransactionSummary
info=
{
tx
.
info
}
/>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
{
chainId
&&
(
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
hash
,
ExplorerDataType
.
TRANSACTION
)
}
>
View on Explorer
...
...
src/components/PositionCard/index.tsx
View file @
bf7a40be
...
...
@@ -14,7 +14,7 @@ import { useColor } from '../../hooks/useColor'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
ExternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
import
{
unwrappedToken
}
from
'
../../utils/unwrappedToken
'
import
{
ButtonEmpty
,
ButtonPrimary
,
ButtonSecondary
}
from
'
../Button
'
...
...
@@ -142,7 +142,7 @@ export function MinimalPositionCard({ pair, showUnwrapped = false, border }: Pos
</
GreyCard
>
)
:
(
<
LightCard
>
<
T
YPE
.
s
ubHeader
style=
{
{
textAlign
:
'
center
'
}
}
>
<
T
hemedText
.
S
ubHeader
style=
{
{
textAlign
:
'
center
'
}
}
>
<
span
role=
"img"
aria
-
label=
"wizard-icon"
>
⭐️
</
span
>
{
'
'
}
...
...
@@ -150,7 +150,7 @@ export function MinimalPositionCard({ pair, showUnwrapped = false, border }: Pos
By adding liquidity you
'
ll earn 0.3% of all trades on this pair proportional to your share of the
pool. Fees are added to the pool, accrue in real time and can be claimed by withdrawing your liquidity.
</
Trans
>
{
'
'
}
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
LightCard
>
)
}
</>
...
...
src/components/PositionPreview/index.tsx
View file @
bf7a40be
...
...
@@ -13,7 +13,7 @@ import JSBI from 'jsbi'
import
{
ReactNode
,
useCallback
,
useContext
,
useState
}
from
'
react
'
import
{
Bound
}
from
'
state/mint/v3/actions
'
import
{
ThemeContext
}
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
{
formatTickPrice
}
from
'
utils/formatTickPrice
'
import
{
unwrappedToken
}
from
'
utils/unwrappedToken
'
...
...
@@ -70,9 +70,9 @@ export const PositionPreview = ({
size=
{
24
}
margin=
{
true
}
/>
<
T
YPE
.
l
abel
ml=
"10px"
fontSize=
"24px"
>
<
T
hemedText
.
L
abel
ml=
"10px"
fontSize=
"24px"
>
{
currency0
?.
symbol
}
/
{
currency1
?.
symbol
}
</
T
YPE
.
l
abel
>
</
T
hemedText
.
L
abel
>
</
RowFixed
>
<
RangeBadge
removed=
{
removed
}
inRange=
{
inRange
}
/>
</
RowBetween
>
...
...
@@ -82,36 +82,36 @@ export const PositionPreview = ({
<
RowBetween
>
<
RowFixed
>
<
CurrencyLogo
currency=
{
currency0
}
/>
<
T
YPE
.
label
ml=
"8px"
>
{
currency0
?.
symbol
}
</
TYPE
.
l
abel
>
<
T
hemedText
.
Label
ml=
"8px"
>
{
currency0
?.
symbol
}
</
ThemedText
.
L
abel
>
</
RowFixed
>
<
RowFixed
>
<
T
YPE
.
label
mr=
"8px"
>
{
position
.
amount0
.
toSignificant
(
4
)
}
</
TYPE
.
l
abel
>
<
T
hemedText
.
Label
mr=
"8px"
>
{
position
.
amount0
.
toSignificant
(
4
)
}
</
ThemedText
.
L
abel
>
</
RowFixed
>
</
RowBetween
>
<
RowBetween
>
<
RowFixed
>
<
CurrencyLogo
currency=
{
currency1
}
/>
<
T
YPE
.
label
ml=
"8px"
>
{
currency1
?.
symbol
}
</
TYPE
.
l
abel
>
<
T
hemedText
.
Label
ml=
"8px"
>
{
currency1
?.
symbol
}
</
ThemedText
.
L
abel
>
</
RowFixed
>
<
RowFixed
>
<
T
YPE
.
label
mr=
"8px"
>
{
position
.
amount1
.
toSignificant
(
4
)
}
</
TYPE
.
l
abel
>
<
T
hemedText
.
Label
mr=
"8px"
>
{
position
.
amount1
.
toSignificant
(
4
)
}
</
ThemedText
.
L
abel
>
</
RowFixed
>
</
RowBetween
>
<
Break
/>
<
RowBetween
>
<
T
YPE
.
l
abel
>
<
T
hemedText
.
L
abel
>
<
Trans
>
Fee Tier
</
Trans
>
</
T
YPE
.
l
abel
>
<
T
YPE
.
l
abel
>
</
T
hemedText
.
L
abel
>
<
T
hemedText
.
L
abel
>
<
Trans
>
{
position
?.
pool
?.
fee
/
10000
}
%
</
Trans
>
</
T
YPE
.
l
abel
>
</
T
hemedText
.
L
abel
>
</
RowBetween
>
</
AutoColumn
>
</
LightCard
>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
{
title
?
<
T
YPE
.
main
>
{
title
}
</
TYPE
.
m
ain
>
:
<
div
/>
}
{
title
?
<
T
hemedText
.
Main
>
{
title
}
</
ThemedText
.
M
ain
>
:
<
div
/>
}
<
RateToggle
currencyA=
{
sorted
?
currency0
:
currency1
}
currencyB=
{
sorted
?
currency1
:
currency0
}
...
...
@@ -122,57 +122,57 @@ export const PositionPreview = ({
<
RowBetween
>
<
LightCard
width=
"48%"
padding=
"8px"
>
<
AutoColumn
gap=
"4px"
justify=
"center"
>
<
T
YPE
.
m
ain
fontSize=
"12px"
>
<
T
hemedText
.
M
ain
fontSize=
"12px"
>
<
Trans
>
Min Price
</
Trans
>
</
T
YPE
.
m
ain
>
<
T
YPE
.
m
ediumHeader
textAlign=
"center"
>
{
`${formatTickPrice(
</
T
hemedText
.
M
ain
>
<
T
hemedText
.
M
ediumHeader
textAlign=
"center"
>
{
`${formatTickPrice(
priceLower,
ticksAtLimit,
Bound.LOWER
)}`
}
</
T
YPE
.
m
ediumHeader
>
<
T
YPE
.
m
ain
textAlign=
"center"
fontSize=
"12px"
>
)}`
}
</
T
hemedText
.
M
ediumHeader
>
<
T
hemedText
.
M
ain
textAlign=
"center"
fontSize=
"12px"
>
<
Trans
>
{
quoteCurrency
.
symbol
}
per
{
baseCurrency
.
symbol
}
</
Trans
>
</
T
YPE
.
m
ain
>
<
T
YPE
.
s
mall
textAlign=
"center"
color=
{
theme
.
text3
}
style=
{
{
marginTop
:
'
4px
'
}
}
>
</
T
hemedText
.
M
ain
>
<
T
hemedText
.
S
mall
textAlign=
"center"
color=
{
theme
.
text3
}
style=
{
{
marginTop
:
'
4px
'
}
}
>
<
Trans
>
Your position will be 100% composed of
{
baseCurrency
?.
symbol
}
at this price
</
Trans
>
</
T
YPE
.
s
mall
>
</
T
hemedText
.
S
mall
>
</
AutoColumn
>
</
LightCard
>
<
LightCard
width=
"48%"
padding=
"8px"
>
<
AutoColumn
gap=
"4px"
justify=
"center"
>
<
T
YPE
.
m
ain
fontSize=
"12px"
>
<
T
hemedText
.
M
ain
fontSize=
"12px"
>
<
Trans
>
Max Price
</
Trans
>
</
T
YPE
.
m
ain
>
<
T
YPE
.
m
ediumHeader
textAlign=
"center"
>
{
`${formatTickPrice(
</
T
hemedText
.
M
ain
>
<
T
hemedText
.
M
ediumHeader
textAlign=
"center"
>
{
`${formatTickPrice(
priceUpper,
ticksAtLimit,
Bound.UPPER
)}`
}
</
T
YPE
.
m
ediumHeader
>
<
T
YPE
.
m
ain
textAlign=
"center"
fontSize=
"12px"
>
)}`
}
</
T
hemedText
.
M
ediumHeader
>
<
T
hemedText
.
M
ain
textAlign=
"center"
fontSize=
"12px"
>
<
Trans
>
{
quoteCurrency
.
symbol
}
per
{
baseCurrency
.
symbol
}
</
Trans
>
</
T
YPE
.
m
ain
>
<
T
YPE
.
s
mall
textAlign=
"center"
color=
{
theme
.
text3
}
style=
{
{
marginTop
:
'
4px
'
}
}
>
</
T
hemedText
.
M
ain
>
<
T
hemedText
.
S
mall
textAlign=
"center"
color=
{
theme
.
text3
}
style=
{
{
marginTop
:
'
4px
'
}
}
>
<
Trans
>
Your position will be 100% composed of
{
quoteCurrency
?.
symbol
}
at this price
</
Trans
>
</
T
YPE
.
s
mall
>
</
T
hemedText
.
S
mall
>
</
AutoColumn
>
</
LightCard
>
</
RowBetween
>
<
LightCard
padding=
"12px "
>
<
AutoColumn
gap=
"4px"
justify=
"center"
>
<
T
YPE
.
m
ain
fontSize=
"12px"
>
<
T
hemedText
.
M
ain
fontSize=
"12px"
>
<
Trans
>
Current price
</
Trans
>
</
T
YPE
.
m
ain
>
<
T
YPE
.
mediumHeader
>
{
`${price.toSignificant(5)} `
}
</
TYPE
.
m
ediumHeader
>
<
T
YPE
.
m
ain
textAlign=
"center"
fontSize=
"12px"
>
</
T
hemedText
.
M
ain
>
<
T
hemedText
.
MediumHeader
>
{
`${price.toSignificant(5)} `
}
</
ThemedText
.
M
ediumHeader
>
<
T
hemedText
.
M
ain
textAlign=
"center"
fontSize=
"12px"
>
<
Trans
>
{
quoteCurrency
.
symbol
}
per
{
baseCurrency
.
symbol
}
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
AutoColumn
>
</
LightCard
>
</
AutoColumn
>
...
...
src/components/PrivacyPolicy/index.tsx
View file @
bf7a40be
...
...
@@ -5,7 +5,7 @@ import { useEffect, useRef } from 'react'
import
{
ArrowDown
,
Info
,
X
}
from
'
react-feather
'
import
ReactGA
from
'
react-ga
'
import
styled
from
'
styled-components/macro
'
import
{
ExternalLink
,
T
YPE
}
from
'
theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
theme
'
import
{
isMobile
}
from
'
utils/userAgent
'
import
{
useModalOpen
,
useTogglePrivacyPolicy
}
from
'
../../state/application/hooks
'
...
...
@@ -91,9 +91,9 @@ export function PrivacyPolicyModal() {
<
Modal
isOpen=
{
open
}
onDismiss=
{
()
=>
toggle
()
}
>
<
AutoColumn
gap=
"12px"
ref=
{
node
as
any
}
>
<
RowBetween
padding=
"1rem 1rem 0.5rem 1rem"
>
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Legal
&
Privacy
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
HoverText
onClick=
{
()
=>
toggle
()
}
>
<
X
size=
{
24
}
/>
</
HoverText
>
...
...
@@ -122,9 +122,9 @@ export function PrivacyPolicy() {
<
RowBetween
>
<
AutoRow
gap=
"4px"
>
<
Info
size=
{
20
}
/>
<
T
YPE
.
m
ain
fontSize=
{
14
}
color=
{
'
primaryText1
'
}
>
<
T
hemedText
.
M
ain
fontSize=
{
14
}
color=
{
'
primaryText1
'
}
>
<
Trans
>
Uniswap Labs
'
Terms of Service
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
AutoRow
>
<
StyledLinkOut
size=
{
20
}
/>
</
RowBetween
>
...
...
@@ -135,29 +135,29 @@ export function PrivacyPolicy() {
<
RowBetween
>
<
AutoRow
gap=
"4px"
>
<
Info
size=
{
20
}
/>
<
T
YPE
.
m
ain
fontSize=
{
14
}
color=
{
'
primaryText1
'
}
>
<
T
hemedText
.
M
ain
fontSize=
{
14
}
color=
{
'
primaryText1
'
}
>
<
Trans
>
Protocol Disclaimer
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
AutoRow
>
<
StyledLinkOut
size=
{
20
}
/>
</
RowBetween
>
</
ExternalLink
>
</
StyledExternalCard
>
</
AutoColumn
>
<
T
YPE
.
m
ain
fontSize=
{
14
}
>
<
T
hemedText
.
M
ain
fontSize=
{
14
}
>
<
Trans
>
This app uses the following third-party APIs:
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
<
AutoColumn
gap=
"12px"
>
{
EXTERNAL_APIS
.
map
(({
name
,
description
},
i
)
=>
(
<
DarkGreyCard
key=
{
i
}
>
<
AutoColumn
gap=
"8px"
>
<
AutoRow
gap=
"4px"
>
<
Info
size=
{
18
}
/>
<
T
YPE
.
m
ain
fontSize=
{
14
}
color=
{
'
text1
'
}
>
<
T
hemedText
.
M
ain
fontSize=
{
14
}
color=
{
'
text1
'
}
>
{
name
}
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
AutoRow
>
<
T
YPE
.
main
fontSize=
{
14
}
>
{
description
}
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
fontSize=
{
14
}
>
{
description
}
</
ThemedText
.
M
ain
>
</
AutoColumn
>
</
DarkGreyCard
>
))
}
...
...
src/components/ProgressSteps/index.tsx
View file @
bf7a40be
...
...
@@ -2,7 +2,7 @@ import { useContext } from 'react'
import
styled
from
'
styled-components/macro
'
import
{
ThemeContext
}
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
AutoColumn
}
from
'
../Column
'
const
Wrapper
=
styled
(
AutoColumn
)
`
...
...
@@ -65,7 +65,7 @@ export default function ProgressCircles({ steps, disabled = false, ...rest }: Pr
<
Circle
confirmed=
{
step
}
disabled=
{
disabled
||
(
!
steps
[
i
-
1
]
&&
i
!==
0
)
}
>
{
step
?
'
✓
'
:
i
+
1
+
'
.
'
}
</
Circle
>
<
T
YPE
.
main
color=
{
theme
.
text4
}
>
|
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
color=
{
theme
.
text4
}
>
|
</
ThemedText
.
M
ain
>
</
CircleRow
>
)
})
}
...
...
src/components/RangeSelector/PresetsButtons.tsx
View file @
bf7a40be
...
...
@@ -4,7 +4,7 @@ import { AutoRow } from 'components/Row'
import
React
from
'
react
'
import
ReactGA
from
'
react-ga
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
const
Button
=
styled
(
ButtonOutlined
).
attrs
(()
=>
({
padding
:
'
8px
'
,
...
...
@@ -26,9 +26,9 @@ export default function PresetsButtons({ setFullRange }: { setFullRange: () => v
})
}
}
>
<
T
YPE
.
b
ody
fontSize=
{
12
}
>
<
T
hemedText
.
B
ody
fontSize=
{
12
}
>
<
Trans
>
Full Range
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
Button
>
</
AutoRow
>
)
...
...
src/components/RoutingDiagram/RoutingDiagram.tsx
View file @
bf7a40be
...
...
@@ -7,7 +7,7 @@ import Row, { AutoRow } from 'components/Row'
import
{
useTokenInfoFromActiveList
}
from
'
hooks/useTokenInfoFromActiveList
'
import
{
Box
}
from
'
rebass
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
{
ReactComponent
as
DotLine
}
from
'
../../assets/svg/dot_line.svg
'
...
...
@@ -93,9 +93,9 @@ function Route({ percent, path }: { percent: RoutingDiagramEntry['percent']; pat
<
DotColor
/>
</
DottedLine
>
<
OpaqueBadge
>
<
T
YPE
.
s
mall
fontSize=
{
12
}
style=
{
{
wordBreak
:
'
normal
'
}
}
>
<
T
hemedText
.
S
mall
fontSize=
{
12
}
style=
{
{
wordBreak
:
'
normal
'
}
}
>
{
percent
.
toSignificant
(
2
)
}
%
</
T
YPE
.
s
mall
>
</
T
hemedText
.
S
mall
>
</
OpaqueBadge
>
<
AutoRow
gap=
"1px"
width=
"100%"
style=
{
{
justifyContent
:
'
space-evenly
'
,
zIndex
:
2
}
}
>
...
...
@@ -116,7 +116,7 @@ function Pool({ currency0, currency1, feeAmount }: { currency0: Currency; curren
<
Box
margin=
"0 5px 0 10px"
>
<
DoubleCurrencyLogo
currency0=
{
tokenInfo1
}
currency1=
{
tokenInfo0
}
size=
{
20
}
/>
</
Box
>
<
T
YPE
.
small
fontSize=
{
12
}
>
{
feeAmount
/
10000
}
%
</
TYPE
.
s
mall
>
<
T
hemedText
.
Small
fontSize=
{
12
}
>
{
feeAmount
/
10000
}
%
</
ThemedText
.
S
mall
>
</
PoolBadge
>
)
}
src/components/SearchModal/BlockedToken.tsx
View file @
bf7a40be
...
...
@@ -3,7 +3,7 @@ import { Token } from '@uniswap/sdk-core'
import
{
ButtonPrimary
}
from
'
components/Button
'
import
{
AlertCircle
,
ArrowLeft
}
from
'
react-feather
'
import
styled
from
'
styled-components/macro
'
import
{
CloseIcon
,
T
YPE
}
from
'
theme
'
import
{
CloseIcon
,
T
hemedText
}
from
'
theme
'
import
TokenImportCard
from
'
./TokenImportCard
'
...
...
@@ -22,7 +22,7 @@ const Button = styled(ButtonPrimary)`
const
Content
=
styled
.
div
`
padding: 1em;
`
const
Copy
=
styled
(
T
YPE
.
b
ody
)
`
const
Copy
=
styled
(
T
hemedText
.
B
ody
)
`
text-align: center;
margin: 0 2em 1em !important;
font-weight: 400;
...
...
@@ -51,9 +51,9 @@ const BlockedToken = ({ onBack, onDismiss, blockedTokens }: BlockedTokenProps) =
<
Wrapper
>
<
Header
>
{
onBack
?
<
ArrowLeft
style=
{
{
cursor
:
'
pointer
'
}
}
onClick=
{
onBack
}
/>
:
<
div
/>
}
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Token not supported
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
{
onDismiss
?
<
CloseIcon
onClick=
{
onDismiss
}
/>
:
<
div
/>
}
</
Header
>
<
Icon
/>
...
...
src/components/SearchModal/CurrencyList.tsx
View file @
bf7a40be
...
...
@@ -14,7 +14,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import
{
useCombinedActiveList
}
from
'
../../state/lists/hooks
'
import
{
WrappedTokenInfo
}
from
'
../../state/lists/wrappedTokenInfo
'
import
{
useCurrencyBalance
}
from
'
../../state/wallet/hooks
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
isTokenOnList
}
from
'
../../utils
'
import
Column
from
'
../Column
'
import
CurrencyLogo
from
'
../CurrencyLogo
'
...
...
@@ -135,13 +135,13 @@ function CurrencyRow({
<
Text
title=
{
currency
.
name
}
fontWeight=
{
500
}
>
{
currency
.
symbol
}
</
Text
>
<
T
YPE
.
d
arkGray
ml=
"0px"
fontSize=
{
'
12px
'
}
fontWeight=
{
300
}
>
<
T
hemedText
.
D
arkGray
ml=
"0px"
fontSize=
{
'
12px
'
}
fontWeight=
{
300
}
>
{
!
currency
.
isNative
&&
!
isOnSelectedList
&&
customAdded
?
(
<
Trans
>
{
currency
.
name
}
• Added by user
</
Trans
>
)
:
(
currency
.
name
)
}
</
T
YPE
.
d
arkGray
>
</
T
hemedText
.
D
arkGray
>
</
Column
>
<
TokenTags
currency=
{
currency
}
/>
{
showCurrencyAmount
&&
(
...
...
@@ -167,9 +167,9 @@ function BreakLineComponent({ style }: { style: CSSProperties }) {
<
RowBetween
>
<
RowFixed
>
<
TokenListLogoWrapper
src=
{
TokenListLogo
}
/>
<
T
YPE
.
m
ain
ml=
"6px"
fontSize=
"12px"
color=
{
theme
.
text1
}
>
<
T
hemedText
.
M
ain
ml=
"6px"
fontSize=
"12px"
color=
{
theme
.
text1
}
>
<
Trans
>
Expanded results from inactive Token Lists
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
RowFixed
>
<
QuestionHelper
text=
{
...
...
src/components/SearchModal/CurrencySearch.tsx
View file @
bf7a40be
...
...
@@ -16,7 +16,7 @@ import styled from 'styled-components/macro'
import
{
ExtendedEther
}
from
'
../../constants/tokens
'
import
{
useAllTokens
,
useIsUserAddedToken
,
useSearchInactiveTokenLists
,
useToken
}
from
'
../../hooks/Tokens
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
ButtonText
,
CloseIcon
,
IconWrapper
,
T
YPE
}
from
'
../../theme
'
import
{
ButtonText
,
CloseIcon
,
IconWrapper
,
T
hemedText
}
from
'
../../theme
'
import
{
isAddress
}
from
'
../../utils
'
import
Column
from
'
../Column
'
import
Row
,
{
RowBetween
,
RowFixed
}
from
'
../Row
'
...
...
@@ -224,9 +224,9 @@ export function CurrencySearch({
</
div
>
)
:
(
<
Column
style=
{
{
padding
:
'
20px
'
,
height
:
'
100%
'
}
}
>
<
T
YPE
.
m
ain
color=
{
theme
.
text3
}
textAlign=
"center"
mb=
"20px"
>
<
T
hemedText
.
M
ain
color=
{
theme
.
text3
}
textAlign=
"center"
mb=
"20px"
>
<
Trans
>
No results found.
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
Column
>
)
}
<
Footer
>
...
...
@@ -236,9 +236,9 @@ export function CurrencySearch({
<
IconWrapper
size=
"16px"
marginRight=
"6px"
stroke=
{
theme
.
primaryText1
}
>
<
Edit
/>
</
IconWrapper
>
<
T
YPE
.
m
ain
color=
{
theme
.
primaryText1
}
>
<
T
hemedText
.
M
ain
color=
{
theme
.
primaryText1
}
>
<
Trans
>
Manage Token Lists
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
RowFixed
>
</
ButtonText
>
</
Row
>
...
...
src/components/SearchModal/ImportList.tsx
View file @
bf7a40be
...
...
@@ -16,9 +16,9 @@ import { useAppDispatch } from 'state/hooks'
import
{
enableList
,
removeList
}
from
'
state/lists/actions
'
import
{
useAllLists
}
from
'
state/lists/hooks
'
import
styled
from
'
styled-components/macro
'
import
{
CloseIcon
,
T
YPE
}
from
'
theme
'
import
{
CloseIcon
,
T
hemedText
}
from
'
theme
'
import
{
ExternalLink
}
from
'
../../theme
/components
'
import
{
ExternalLink
}
from
'
../../theme
'
import
{
CurrencyModalView
}
from
'
./CurrencySearchModal
'
import
{
Checkbox
,
PaddedColumn
,
TextDot
}
from
'
./styleds
'
...
...
@@ -81,9 +81,9 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
<
PaddedColumn
gap=
"14px"
style=
{
{
width
:
'
100%
'
,
flex
:
'
1 1
'
}
}
>
<
RowBetween
>
<
ArrowLeft
style=
{
{
cursor
:
'
pointer
'
}
}
onClick=
{
()
=>
setModalView
(
CurrencyModalView
.
manage
)
}
/>
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Import List
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
CloseIcon
onClick=
{
onDismiss
}
/>
</
RowBetween
>
</
PaddedColumn
>
...
...
@@ -96,18 +96,18 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
{
list
.
logoURI
&&
<
ListLogo
logoURI=
{
list
.
logoURI
}
size=
"40px"
/>
}
<
AutoColumn
gap=
"sm"
style=
{
{
marginLeft
:
'
20px
'
}
}
>
<
RowFixed
>
<
T
YPE
.
b
ody
fontWeight=
{
600
}
mr=
"6px"
>
<
T
hemedText
.
B
ody
fontWeight=
{
600
}
mr=
"6px"
>
{
list
.
name
}
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
TextDot
/>
<
T
YPE
.
m
ain
fontSize=
{
'
16px
'
}
ml=
"6px"
>
<
T
hemedText
.
M
ain
fontSize=
{
'
16px
'
}
ml=
"6px"
>
<
Trans
>
{
list
.
tokens
.
length
}
tokens
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
RowFixed
>
<
ExternalLink
href=
{
`https://tokenlists.org/token-list?url=${listURL}`
}
>
<
T
YPE
.
m
ain
fontSize=
{
'
12px
'
}
color=
{
theme
.
blue1
}
>
<
T
hemedText
.
M
ain
fontSize=
{
'
12px
'
}
color=
{
theme
.
blue1
}
>
{
listURL
}
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
ExternalLink
>
</
AutoColumn
>
</
RowFixed
>
...
...
@@ -116,22 +116,22 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
<
Card
style=
{
{
backgroundColor
:
transparentize
(
0.8
,
theme
.
red1
)
}
}
>
<
AutoColumn
justify=
"center"
style=
{
{
textAlign
:
'
center
'
,
gap
:
'
16px
'
,
marginBottom
:
'
12px
'
}
}
>
<
AlertTriangle
stroke=
{
theme
.
red1
}
size=
{
32
}
/>
<
T
YPE
.
b
ody
fontWeight=
{
500
}
fontSize=
{
20
}
color=
{
theme
.
red1
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
500
}
fontSize=
{
20
}
color=
{
theme
.
red1
}
>
<
Trans
>
Import at your own risk
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
<
AutoColumn
style=
{
{
textAlign
:
'
center
'
,
gap
:
'
16px
'
,
marginBottom
:
'
12px
'
}
}
>
<
T
YPE
.
b
ody
fontWeight=
{
500
}
color=
{
theme
.
red1
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
500
}
color=
{
theme
.
red1
}
>
<
Trans
>
By adding this list you are implicitly trusting that the data is correct. Anyone can create a list,
including creating fake versions of existing lists and lists that claim to represent projects that do
not have one.
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
fontWeight=
{
600
}
color=
{
theme
.
red1
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
fontWeight=
{
600
}
color=
{
theme
.
red1
}
>
<
Trans
>
If you purchase a token from this list, you may not be able to sell it back.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
<
AutoRow
justify=
"center"
style=
{
{
cursor
:
'
pointer
'
}
}
onClick=
{
()
=>
setConfirmed
(
!
confirmed
)
}
>
<
Checkbox
...
...
@@ -140,9 +140,9 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
checked=
{
confirmed
}
onChange=
{
()
=>
setConfirmed
(
!
confirmed
)
}
/>
<
T
YPE
.
b
ody
ml=
"10px"
fontSize=
"16px"
color=
{
theme
.
red1
}
fontWeight=
{
500
}
>
<
T
hemedText
.
B
ody
ml=
"10px"
fontSize=
"16px"
color=
{
theme
.
red1
}
fontWeight=
{
500
}
>
<
Trans
>
I understand
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoRow
>
</
Card
>
...
...
@@ -156,9 +156,9 @@ export function ImportList({ listURL, list, setModalView, onDismiss }: ImportPro
<
Trans
>
Import
</
Trans
>
</
ButtonPrimary
>
{
addError
?
(
<
T
YPE
.
e
rror
title=
{
addError
}
style=
{
{
textOverflow
:
'
ellipsis
'
,
overflow
:
'
hidden
'
}
}
error
>
<
T
hemedText
.
E
rror
title=
{
addError
}
style=
{
{
textOverflow
:
'
ellipsis
'
,
overflow
:
'
hidden
'
}
}
error
>
{
addError
}
</
T
YPE
.
e
rror
>
</
T
hemedText
.
E
rror
>
)
:
null
}
</
AutoColumn
>
{
/* </Card> */
}
...
...
src/components/SearchModal/ImportRow.tsx
View file @
bf7a40be
...
...
@@ -10,7 +10,7 @@ import useTheme from 'hooks/useTheme'
import
{
CSSProperties
}
from
'
react
'
import
{
CheckCircle
}
from
'
react-feather
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
{
WrappedTokenInfo
}
from
'
../../state/lists/wrappedTokenInfo
'
...
...
@@ -67,16 +67,16 @@ export default function ImportRow({
<
CurrencyLogo
currency=
{
token
}
size=
{
'
24px
'
}
style=
{
{
opacity
:
dim
?
'
0.6
'
:
'
1
'
}
}
/>
<
AutoColumn
gap=
"4px"
style=
{
{
opacity
:
dim
?
'
0.6
'
:
'
1
'
}
}
>
<
AutoRow
>
<
T
YPE
.
body
fontWeight=
{
500
}
>
{
token
.
symbol
}
</
TYPE
.
b
ody
>
<
T
YPE
.
d
arkGray
ml=
"8px"
fontWeight=
{
300
}
>
<
T
hemedText
.
Body
fontWeight=
{
500
}
>
{
token
.
symbol
}
</
ThemedText
.
B
ody
>
<
T
hemedText
.
D
arkGray
ml=
"8px"
fontWeight=
{
300
}
>
<
NameOverflow
title=
{
token
.
name
}
>
{
token
.
name
}
</
NameOverflow
>
</
T
YPE
.
d
arkGray
>
</
T
hemedText
.
D
arkGray
>
</
AutoRow
>
{
list
&&
list
.
logoURI
&&
(
<
RowFixed
>
<
T
YPE
.
s
mall
mr=
"4px"
color=
{
theme
.
text3
}
>
<
T
hemedText
.
S
mall
mr=
"4px"
color=
{
theme
.
text3
}
>
<
Trans
>
via
{
list
.
name
}
</
Trans
>
</
T
YPE
.
s
mall
>
</
T
hemedText
.
S
mall
>
<
ListLogo
logoURI=
{
list
.
logoURI
}
size=
"12px"
/>
</
RowFixed
>
)
}
...
...
@@ -97,9 +97,9 @@ export default function ImportRow({
)
:
(
<
RowFixed
style=
{
{
minWidth
:
'
fit-content
'
}
}
>
<
CheckIcon
/>
<
T
YPE
.
m
ain
color=
{
theme
.
green1
}
>
<
T
hemedText
.
M
ain
color=
{
theme
.
green1
}
>
<
Trans
>
Active
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
RowFixed
>
)
}
</
TokenSection
>
...
...
src/components/SearchModal/ImportToken.tsx
View file @
bf7a40be
...
...
@@ -10,7 +10,7 @@ import useTheme from 'hooks/useTheme'
import
{
AlertCircle
,
ArrowLeft
}
from
'
react-feather
'
import
{
useAddUserToken
}
from
'
state/user/hooks
'
import
styled
from
'
styled-components/macro
'
import
{
CloseIcon
,
T
YPE
}
from
'
theme
'
import
{
CloseIcon
,
T
hemedText
}
from
'
theme
'
import
BlockedToken
from
'
./BlockedToken
'
import
{
PaddedColumn
}
from
'
./styleds
'
...
...
@@ -47,9 +47,9 @@ export function ImportToken(props: ImportProps) {
<
PaddedColumn
gap=
"14px"
style=
{
{
width
:
'
100%
'
,
flex
:
'
1 1
'
}
}
>
<
RowBetween
>
{
onBack
?
<
ArrowLeft
style=
{
{
cursor
:
'
pointer
'
}
}
onClick=
{
onBack
}
/>
:
<
div
/>
}
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Plural
value=
{
tokens
.
length
}
one=
"Import token"
other=
"Import tokens"
/>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
{
onDismiss
?
<
CloseIcon
onClick=
{
onDismiss
}
/>
:
<
div
/>
}
</
RowBetween
>
</
PaddedColumn
>
...
...
@@ -57,12 +57,12 @@ export function ImportToken(props: ImportProps) {
<
AutoColumn
gap=
"md"
style=
{
{
marginBottom
:
'
32px
'
,
padding
:
'
1rem
'
}
}
>
<
AutoColumn
justify=
"center"
style=
{
{
textAlign
:
'
center
'
,
gap
:
'
16px
'
,
padding
:
'
1rem
'
}
}
>
<
AlertCircle
size=
{
48
}
stroke=
{
theme
.
text2
}
strokeWidth=
{
1
}
/>
<
T
YPE
.
b
ody
fontWeight=
{
400
}
fontSize=
{
16
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
400
}
fontSize=
{
16
}
>
<
Trans
>
This token doesn
'
t appear on the active token list(s). Make sure this is the token that you want to
trade.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
{
tokens
.
map
((
token
)
=>
(
<
TokenImportCard
token=
{
token
}
list=
{
list
}
key=
{
'
import
'
+
token
.
address
}
/>
...
...
src/components/SearchModal/ManageLists.tsx
View file @
bf7a40be
...
...
@@ -18,7 +18,7 @@ import useTheme from '../../hooks/useTheme'
import
useToggle
from
'
../../hooks/useToggle
'
import
{
acceptListUpdate
,
disableList
,
enableList
,
removeList
}
from
'
../../state/lists/actions
'
import
{
useActiveListUrls
,
useAllLists
,
useIsListActive
}
from
'
../../state/lists/hooks
'
import
{
ExternalLink
,
IconWrapper
,
LinkStyledButton
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
IconWrapper
,
LinkStyledButton
,
T
hemedText
}
from
'
../../theme
'
import
listVersionLabel
from
'
../../utils/listVersionLabel
'
import
{
parseENSAddress
}
from
'
../../utils/parseENSAddress
'
import
uriToHttp
from
'
../../utils/uriToHttp
'
...
...
@@ -75,7 +75,7 @@ const StyledTitleText = styled.div<{ active: boolean }>`
color:
${({
theme
,
active
})
=>
(
active
?
theme
.
white
:
theme
.
text2
)}
;
`
const
StyledListUrlText
=
styled
(
T
YPE
.
m
ain
)
<
{
active
:
boolean
}
>
`
const
StyledListUrlText
=
styled
(
T
hemedText
.
M
ain
)
<
{
active
:
boolean
}
>
`
font-size: 12px;
color:
${({
theme
,
active
})
=>
(
active
?
theme
.
white
:
theme
.
text2
)}
;
`
...
...
@@ -361,9 +361,9 @@ export function ManageLists({
/>
</
Row
>
{
addError
?
(
<
T
YPE
.
e
rror
title=
{
addError
}
style=
{
{
textOverflow
:
'
ellipsis
'
,
overflow
:
'
hidden
'
}
}
error
>
<
T
hemedText
.
E
rror
title=
{
addError
}
style=
{
{
textOverflow
:
'
ellipsis
'
,
overflow
:
'
hidden
'
}
}
error
>
{
addError
}
</
T
YPE
.
e
rror
>
</
T
hemedText
.
E
rror
>
)
:
null
}
</
PaddedColumn
>
{
tempList
&&
(
...
...
@@ -373,10 +373,10 @@ export function ManageLists({
<
RowFixed
>
{
tempList
.
logoURI
&&
<
ListLogo
logoURI=
{
tempList
.
logoURI
}
size=
"40px"
/>
}
<
AutoColumn
gap=
"4px"
style=
{
{
marginLeft
:
'
20px
'
}
}
>
<
T
YPE
.
body
fontWeight=
{
600
}
>
{
tempList
.
name
}
</
TYPE
.
b
ody
>
<
T
YPE
.
m
ain
fontSize=
{
'
12px
'
}
>
<
T
hemedText
.
Body
fontWeight=
{
600
}
>
{
tempList
.
name
}
</
ThemedText
.
B
ody
>
<
T
hemedText
.
M
ain
fontSize=
{
'
12px
'
}
>
<
Trans
>
{
tempList
.
tokens
.
length
}
tokens
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
AutoColumn
>
</
RowFixed
>
{
isImported
?
(
...
...
@@ -384,9 +384,9 @@ export function ManageLists({
<
IconWrapper
stroke=
{
theme
.
text2
}
size=
"16px"
marginRight=
{
'
10px
'
}
>
<
CheckCircle
/>
</
IconWrapper
>
<
T
YPE
.
b
ody
color=
{
theme
.
text2
}
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text2
}
>
<
Trans
>
Loaded
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
RowFixed
>
)
:
(
<
ButtonPrimary
...
...
src/components/SearchModal/ManageTokens.tsx
View file @
bf7a40be
...
...
@@ -9,7 +9,7 @@ import { useActiveWeb3React } from 'hooks/web3'
import
{
RefObject
,
useCallback
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
{
useRemoveUserAddedToken
,
useUserAddedTokens
}
from
'
state/user/hooks
'
import
styled
from
'
styled-components/macro
'
import
{
ButtonText
,
ExternalLink
,
ExternalLinkIcon
,
T
rashIcon
,
TYPE
}
from
'
theme
'
import
{
ButtonText
,
ExternalLink
,
ExternalLinkIcon
,
T
hemedText
,
TrashIcon
}
from
'
theme
'
import
{
isAddress
}
from
'
utils
'
import
useTheme
from
'
../../hooks/useTheme
'
...
...
@@ -81,9 +81,9 @@ export default function ManageTokens({
<
RowFixed
>
<
CurrencyLogo
currency=
{
token
}
size=
{
'
20px
'
}
/>
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
token
.
address
,
ExplorerDataType
.
ADDRESS
)
}
>
<
T
YPE
.
m
ain
ml=
{
'
10px
'
}
fontWeight=
{
600
}
>
<
T
hemedText
.
M
ain
ml=
{
'
10px
'
}
fontWeight=
{
600
}
>
{
token
.
symbol
}
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
ExternalLink
>
</
RowFixed
>
<
RowFixed
>
...
...
@@ -111,9 +111,9 @@ export default function ManageTokens({
/>
</
Row
>
{
searchQuery
!==
''
&&
!
isAddressSearch
&&
(
<
T
YPE
.
e
rror
error=
{
true
}
>
<
T
hemedText
.
E
rror
error=
{
true
}
>
<
Trans
>
Enter valid token address
</
Trans
>
</
T
YPE
.
e
rror
>
</
T
hemedText
.
E
rror
>
)
}
{
searchToken
&&
(
<
Card
backgroundColor=
{
theme
.
bg2
}
padding=
"10px 0"
>
...
...
@@ -129,14 +129,14 @@ export default function ManageTokens({
<
Separator
/>
<
PaddedColumn
gap=
"lg"
style=
{
{
overflow
:
'
auto
'
,
marginBottom
:
'
10px
'
}
}
>
<
RowBetween
>
<
T
YPE
.
m
ain
fontWeight=
{
600
}
>
<
T
hemedText
.
M
ain
fontWeight=
{
600
}
>
<
Trans
>
{
userAddedTokens
?.
length
}
Custom Tokens
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
{
userAddedTokens
.
length
>
0
&&
(
<
ButtonText
onClick=
{
handleRemoveAll
}
>
<
T
YPE
.
b
lue
>
<
T
hemedText
.
B
lue
>
<
Trans
>
Clear all
</
Trans
>
</
T
YPE
.
b
lue
>
</
T
hemedText
.
B
lue
>
</
ButtonText
>
)
}
</
RowBetween
>
...
...
@@ -144,9 +144,9 @@ export default function ManageTokens({
</
PaddedColumn
>
</
Column
>
<
Footer
>
<
T
YPE
.
d
arkGray
>
<
T
hemedText
.
D
arkGray
>
<
Trans
>
Tip: Custom tokens are stored locally in your browser
</
Trans
>
</
T
YPE
.
d
arkGray
>
</
T
hemedText
.
D
arkGray
>
</
Footer
>
</
Wrapper
>
)
...
...
src/components/SearchModal/TokenImportCard.tsx
View file @
bf7a40be
...
...
@@ -10,7 +10,7 @@ import { useActiveWeb3React } from 'hooks/web3'
import
{
transparentize
}
from
'
polished
'
import
{
AlertCircle
}
from
'
react-feather
'
import
styled
,
{
useTheme
}
from
'
styled-components/macro
'
import
{
ExternalLink
,
T
YPE
}
from
'
theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
utils/getExplorerLink
'
const
WarningWrapper
=
styled
(
Card
)
<
{
highWarning
:
boolean
}
>
`
...
...
@@ -19,7 +19,7 @@ const WarningWrapper = styled(Card)<{ highWarning: boolean }>`
width: fit-content;
`
const
AddressText
=
styled
(
T
YPE
.
b
lue
)
`
const
AddressText
=
styled
(
T
hemedText
.
B
lue
)
`
font-size: 12px;
word-break: break-all;
...
...
@@ -39,12 +39,12 @@ const TokenImportCard = ({ list, token }: TokenImportCardProps) => {
<
AutoColumn
gap=
"10px"
justify=
"center"
>
<
CurrencyLogo
currency=
{
token
}
size=
{
'
32px
'
}
/>
<
AutoColumn
gap=
"4px"
justify=
"center"
>
<
T
YPE
.
b
ody
ml=
"8px"
mr=
"8px"
fontWeight=
{
500
}
fontSize=
{
20
}
>
<
T
hemedText
.
B
ody
ml=
"8px"
mr=
"8px"
fontWeight=
{
500
}
fontSize=
{
20
}
>
{
token
.
symbol
}
</
T
YPE
.
b
ody
>
<
T
YPE
.
d
arkGray
fontWeight=
{
400
}
fontSize=
{
14
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
D
arkGray
fontWeight=
{
400
}
fontSize=
{
14
}
>
{
token
.
name
}
</
T
YPE
.
d
arkGray
>
</
T
hemedText
.
D
arkGray
>
</
AutoColumn
>
{
chainId
&&
(
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
token
.
address
,
ExplorerDataType
.
ADDRESS
)
}
>
...
...
@@ -54,17 +54,17 @@ const TokenImportCard = ({ list, token }: TokenImportCardProps) => {
{
list
!==
undefined
?
(
<
RowFixed
>
{
list
.
logoURI
&&
<
ListLogo
logoURI=
{
list
.
logoURI
}
size=
"16px"
/>
}
<
T
YPE
.
s
mall
ml=
"6px"
fontSize=
{
14
}
color=
{
theme
.
text3
}
>
<
T
hemedText
.
S
mall
ml=
"6px"
fontSize=
{
14
}
color=
{
theme
.
text3
}
>
<
Trans
>
via
{
list
.
name
}
token list
</
Trans
>
</
T
YPE
.
s
mall
>
</
T
hemedText
.
S
mall
>
</
RowFixed
>
)
:
(
<
WarningWrapper
$borderRadius=
"4px"
padding=
"4px"
highWarning=
{
true
}
>
<
RowFixed
>
<
AlertCircle
stroke=
{
theme
.
red1
}
size=
"10px"
/>
<
T
YPE
.
b
ody
color=
{
theme
.
red1
}
ml=
"4px"
fontSize=
"10px"
fontWeight=
{
500
}
>
<
T
hemedText
.
B
ody
color=
{
theme
.
red1
}
ml=
"4px"
fontSize=
"10px"
fontWeight=
{
500
}
>
<
Trans
>
Unknown Source
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
RowFixed
>
</
WarningWrapper
>
)
}
...
...
src/components/Settings/index.tsx
View file @
bf7a40be
...
...
@@ -13,7 +13,7 @@ import { useOnClickOutside } from '../../hooks/useOnClickOutside'
import
{
useModalOpen
,
useToggleSettingsMenu
}
from
'
../../state/application/hooks
'
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
useClientSideRouter
,
useExpertModeManager
}
from
'
../../state/user/hooks
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
ButtonError
}
from
'
../Button
'
import
{
AutoColumn
}
from
'
../Column
'
import
Modal
from
'
../Modal
'
...
...
@@ -203,9 +203,9 @@ export default function SettingsTab({ placeholderSlippage }: { placeholderSlippa
{
chainId
===
SupportedChainId
.
MAINNET
&&
(
<
RowBetween
>
<
RowFixed
>
<
T
YPE
.
b
lack
fontWeight=
{
400
}
fontSize=
{
14
}
color=
{
theme
.
text2
}
>
<
T
hemedText
.
B
lack
fontWeight=
{
400
}
fontSize=
{
14
}
color=
{
theme
.
text2
}
>
<
Trans
>
Auto Router
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
<
QuestionHelper
text=
{
<
Trans
>
Use the Uniswap Labs API to get better pricing through a more efficient route.
</
Trans
>
}
/>
...
...
@@ -226,9 +226,9 @@ export default function SettingsTab({ placeholderSlippage }: { placeholderSlippa
<
RowBetween
>
<
RowFixed
>
<
T
YPE
.
b
lack
fontWeight=
{
400
}
fontSize=
{
14
}
color=
{
theme
.
text2
}
>
<
T
hemedText
.
B
lack
fontWeight=
{
400
}
fontSize=
{
14
}
color=
{
theme
.
text2
}
>
<
Trans
>
Expert Mode
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
<
QuestionHelper
text=
{
<
Trans
>
Allow high price impact trades and skip the confirm screen. Use at your own risk.
</
Trans
>
...
...
src/components/SwitchLocaleLink/index.tsx
View file @
bf7a40be
...
...
@@ -5,9 +5,9 @@ import styled from 'styled-components/macro'
import
{
DEFAULT_LOCALE
,
LOCALE_LABEL
,
SupportedLocale
}
from
'
../../constants/locales
'
import
{
navigatorLocale
,
useActiveLocale
}
from
'
../../hooks/useActiveLocale
'
import
{
StyledInternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
StyledInternalLink
,
T
hemedText
}
from
'
../../theme
'
const
Container
=
styled
(
T
YPE
.
s
mall
)
`
const
Container
=
styled
(
T
hemedText
.
S
mall
)
`
opacity: 0.6;
:hover {
opacity: 1;
...
...
src/components/Toggle/ListToggle.tsx
View file @
bf7a40be
import
{
Trans
}
from
'
@lingui/macro
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
const
Wrapper
=
styled
.
button
<
{
isActive
?:
boolean
;
activeElement
?:
boolean
}
>
`
border-radius: 20px;
...
...
@@ -25,7 +25,7 @@ const ToggleElement = styled.span<{ isActive?: boolean; bgColor?: string }>`
}
`
const
StatusText
=
styled
(
T
YPE
.
m
ain
)
<
{
isActive
?:
boolean
}
>
`
const
StatusText
=
styled
(
T
hemedText
.
M
ain
)
<
{
isActive
?:
boolean
}
>
`
margin: 0 10px;
width: 24px;
color:
${({
theme
,
isActive
})
=>
(
isActive
?
theme
.
text1
:
theme
.
text3
)}
;
...
...
src/components/TransactionConfirmationModal/index.tsx
View file @
bf7a40be
...
...
@@ -13,7 +13,7 @@ import Circle from '../../assets/images/blue-loader.svg'
import
MetaMaskLogo
from
'
../../assets/images/metamask.png
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
ExternalLink
}
from
'
../../theme
'
import
{
CloseIcon
,
CustomLightSpinner
}
from
'
../../theme
/components
'
import
{
CloseIcon
,
CustomLightSpinner
}
from
'
../../theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
TransactionSummary
}
from
'
../AccountDetails/TransactionSummary
'
import
{
ButtonLight
,
ButtonPrimary
}
from
'
../Button
'
...
...
@@ -284,11 +284,11 @@ function L2Content({
</
Text
>
</
ExternalLink
>
)
:
(
<
div
style=
{
{
height
:
'
17px
'
}
}
></
div
>
<
div
style=
{
{
height
:
'
17px
'
}
}
/
>
)
}
<
Text
color=
{
theme
.
text3
}
style=
{
{
margin
:
'
20px 0 0 0
'
}
}
fontSize=
{
'
14px
'
}
>
{
!
secondsToConfirm
?
(
<
div
style=
{
{
height
:
'
24px
'
}
}
></
div
>
<
div
style=
{
{
height
:
'
24px
'
}
}
/
>
)
:
(
<
div
>
<
Trans
>
Transaction completed in
</
Trans
>
...
...
src/components/TransactionSettings/index.tsx
View file @
bf7a40be
...
...
@@ -8,7 +8,7 @@ import { useContext, useState } from 'react'
import
{
useSetUserSlippageTolerance
,
useUserSlippageTolerance
,
useUserTransactionTTL
}
from
'
state/user/hooks
'
import
styled
,
{
ThemeContext
}
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
AutoColumn
}
from
'
../Column
'
import
QuestionHelper
from
'
../QuestionHelper
'
import
{
RowBetween
,
RowFixed
}
from
'
../Row
'
...
...
@@ -160,9 +160,9 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
<
AutoColumn
gap=
"md"
>
<
AutoColumn
gap=
"sm"
>
<
RowFixed
>
<
T
YPE
.
b
lack
fontWeight=
{
400
}
fontSize=
{
14
}
color=
{
theme
.
text2
}
>
<
T
hemedText
.
B
lack
fontWeight=
{
400
}
fontSize=
{
14
}
color=
{
theme
.
text2
}
>
<
Trans
>
Slippage tolerance
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
<
QuestionHelper
text=
{
<
Trans
>
Your transaction will revert if the price changes unfavorably by more than this percentage.
</
Trans
>
...
...
@@ -229,9 +229,9 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
{
showCustomDeadlineRow
&&
(
<
AutoColumn
gap=
"sm"
>
<
RowFixed
>
<
T
YPE
.
b
lack
fontSize=
{
14
}
fontWeight=
{
400
}
color=
{
theme
.
text2
}
>
<
T
hemedText
.
B
lack
fontSize=
{
14
}
fontWeight=
{
400
}
color=
{
theme
.
text2
}
>
<
Trans
>
Transaction deadline
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
<
QuestionHelper
text=
{
<
Trans
>
Your transaction will revert if it is pending for more than this period of time.
</
Trans
>
}
/>
...
...
@@ -255,9 +255,9 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
color=
{
deadlineError
?
'
red
'
:
''
}
/>
</
OptionCustom
>
<
T
YPE
.
b
ody
style=
{
{
paddingLeft
:
'
8px
'
}
}
fontSize=
{
14
}
>
<
T
hemedText
.
B
ody
style=
{
{
paddingLeft
:
'
8px
'
}
}
fontSize=
{
14
}
>
<
Trans
>
minutes
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
RowFixed
>
</
AutoColumn
>
)
}
...
...
src/components/WalletModal/index.tsx
View file @
bf7a40be
...
...
@@ -19,7 +19,7 @@ import { SUPPORTED_WALLETS } from '../../constants/wallet'
import
usePrevious
from
'
../../hooks/usePrevious
'
import
{
useModalOpen
,
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
ExternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
isMobile
}
from
'
../../utils/userAgent
'
import
AccountDetails
from
'
../AccountDetails
'
import
Card
,
{
LightCard
}
from
'
../Card
'
...
...
@@ -344,9 +344,9 @@ export default function WalletModal({
<
ArrowLeft
/>
</
HoverText
>
<
Row
justify=
"center"
>
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Legal
&
Privacy
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
</
Row
>
</
HeaderRow
>
<
PrivacyPolicy
/>
...
...
@@ -392,23 +392,23 @@ export default function WalletModal({
<
AutoColumn
gap=
"16px"
>
<
LightCard
>
<
AutoRow
style=
{
{
flexWrap
:
'
nowrap
'
}
}
>
<
T
YPE
.
b
lack
fontSize=
{
14
}
>
<
T
hemedText
.
B
lack
fontSize=
{
14
}
>
<
Trans
>
By connecting a wallet, you agree to Uniswap Labs’
{
'
'
}
<
ExternalLink
href=
"https://uniswap.org/terms-of-service/"
>
Terms of Service
</
ExternalLink
>
and
acknowledge that you have read and understand the Uniswap
{
'
'
}
<
ExternalLink
href=
"https://uniswap.org/disclaimer/"
>
Protocol Disclaimer
</
ExternalLink
>
.
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
AutoRow
>
</
LightCard
>
<
LinkCard
padding=
".5rem"
$borderRadius=
".75rem"
onClick=
{
()
=>
setWalletView
(
WALLET_VIEWS
.
LEGAL
)
}
>
<
RowBetween
>
<
AutoRow
gap=
"4px"
>
<
Info
size=
{
20
}
/>
<
T
YPE
.
w
hite
fontSize=
{
14
}
>
<
T
hemedText
.
W
hite
fontSize=
{
14
}
>
<
Trans
>
How this app uses APIs
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
AutoRow
>
<
ArrowRight
size=
{
16
}
/>
</
RowBetween
>
...
...
src/components/claim/AddressClaimModal.tsx
View file @
bf7a40be
...
...
@@ -11,7 +11,7 @@ import useENS from '../../hooks/useENS'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useClaimCallback
,
useUserHasAvailableClaim
,
useUserUnclaimedAmount
}
from
'
../../state/claim/hooks
'
import
{
useIsTransactionPending
}
from
'
../../state/transactions/hooks
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
T
YPE
,
UniTokenAnimated
}
from
'
../../theme
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
T
hemedText
,
UniTokenAnimated
}
from
'
../../theme
'
import
{
shortenAddress
}
from
'
../../utils
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
AddressInputPanel
from
'
../AddressInputPanel
'
...
...
@@ -105,29 +105,29 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
<
CardNoise
/>
<
CardSection
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontWeight=
{
500
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
500
}
>
<
Trans
>
Claim UNI Token
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
CloseIcon
onClick=
{
wrappedOnDismiss
}
style=
{
{
zIndex
:
99
}
}
stroke=
"white"
/>
</
RowBetween
>
<
T
YPE
.
w
hite
fontWeight=
{
700
}
fontSize=
{
36
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
700
}
fontSize=
{
36
}
>
<
Trans
>
{
unclaimedAmount
?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
}
??
'
-
'
)
}
UNI
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
CardSection
>
<
Break
/>
</
ModalUpper
>
<
AutoColumn
gap=
"md"
style=
{
{
padding
:
'
1rem
'
,
paddingTop
:
'
0
'
}
}
justify=
"center"
>
<
T
YPE
.
s
ubHeader
fontWeight=
{
500
}
>
<
T
hemedText
.
S
ubHeader
fontWeight=
{
500
}
>
<
Trans
>
Enter an address to trigger a UNI claim. If the address has any claimable UNI it will be sent to them on
submission.
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
<
AddressInputPanel
value=
{
typed
}
onChange=
{
handleRecipientType
}
/>
{
parsedAddress
&&
!
hasAvailableClaim
&&
(
<
T
YPE
.
e
rror
error=
{
true
}
>
<
T
hemedText
.
E
rror
error=
{
true
}
>
<
Trans
>
Address has no available claim
</
Trans
>
</
T
YPE
.
e
rror
>
</
T
hemedText
.
E
rror
>
)
}
<
ButtonPrimary
disabled=
{
!
isAddress
(
parsedAddress
??
''
)
||
!
hasAvailableClaim
}
...
...
@@ -159,23 +159,23 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
</
ConfirmedIcon
>
<
AutoColumn
gap=
"100px"
justify=
{
'
center
'
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
fontWeight=
{
600
}
color=
"black"
>
<
T
hemedText
.
L
argeHeader
fontWeight=
{
600
}
color=
"black"
>
{
claimConfirmed
?
<
Trans
>
Claimed
</
Trans
>
:
<
Trans
>
Claiming
</
Trans
>
}
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
{
!
claimConfirmed
&&
(
<
Text
fontSize=
{
36
}
color=
{
'
#ff007a
'
}
fontWeight=
{
800
}
>
<
Trans
>
{
unclaimedAmount
?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
}
??
'
-
'
)
}
UNI
</
Trans
>
</
Text
>
)
}
{
parsedAddress
&&
(
<
T
YPE
.
l
argeHeader
fontWeight=
{
600
}
color=
"black"
>
<
T
hemedText
.
L
argeHeader
fontWeight=
{
600
}
color=
"black"
>
<
Trans
>
for
{
shortenAddress
(
parsedAddress
)
}
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
)
}
</
AutoColumn
>
{
claimConfirmed
&&
(
<>
<
T
YPE
.
s
ubHeader
fontWeight=
{
500
}
color=
"black"
>
<
T
hemedText
.
S
ubHeader
fontWeight=
{
500
}
color=
"black"
>
<
span
role=
"img"
aria
-
label=
"party-hat"
>
🎉
{
'
'
}
</
span
>
...
...
@@ -183,13 +183,13 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
<
span
role=
"img"
aria
-
label=
"party-hat"
>
🎉
</
span
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</>
)
}
{
attempting
&&
!
hash
&&
(
<
T
YPE
.
s
ubHeader
color=
"black"
>
<
T
hemedText
.
S
ubHeader
color=
"black"
>
<
Trans
>
Confirm this transaction in your wallet
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
)
}
{
attempting
&&
hash
&&
!
claimConfirmed
&&
chainId
&&
hash
&&
(
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
hash
,
ExplorerDataType
.
TRANSACTION
)
}
style=
{
{
zIndex
:
99
}
}
>
...
...
src/components/claim/ClaimModal.tsx
View file @
bf7a40be
...
...
@@ -13,7 +13,7 @@ import { useModalOpen, useToggleSelfClaimModal } from '../../state/application/h
import
{
ApplicationModal
}
from
'
../../state/application/reducer
'
import
{
useClaimCallback
,
useUserClaimData
,
useUserUnclaimedAmount
}
from
'
../../state/claim/hooks
'
import
{
useUserHasSubmittedClaim
}
from
'
../../state/transactions/hooks
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
T
YPE
,
UniTokenAnimated
}
from
'
../../theme
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
T
hemedText
,
UniTokenAnimated
}
from
'
../../theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
ButtonPrimary
}
from
'
../Button
'
import
{
AutoColumn
,
ColumnCenter
}
from
'
../Column
'
...
...
@@ -100,63 +100,63 @@ export default function ClaimModal() {
<
CardNoise
/>
<
CardSection
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontWeight=
{
500
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
500
}
>
<
Trans
>
Claim UNI
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
CloseIcon
onClick=
{
toggleClaimModal
}
style=
{
{
zIndex
:
99
}
}
color=
"white"
/>
</
RowBetween
>
<
T
YPE
.
w
hite
fontWeight=
{
700
}
fontSize=
{
36
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
700
}
fontSize=
{
36
}
>
<
Trans
>
{
unclaimedAmount
?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
}
??
'
-
'
)
}
UNI
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
CardSection
>
<
Break
/>
<
CardSection
gap=
"sm"
>
{
userClaimData
?.
flags
?.
isSOCKS
&&
(
<
RowBetween
>
<
T
YPE
.
subHeader
color=
"white"
>
SOCKS
</
TYPE
.
s
ubHeader
>
<
T
YPE
.
s
ubHeader
color=
"white"
>
<
T
hemedText
.
SubHeader
color=
"white"
>
SOCKS
</
ThemedText
.
S
ubHeader
>
<
T
hemedText
.
S
ubHeader
color=
"white"
>
<
Trans
>
{
SOCKS_AMOUNT
}
UNI
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
RowBetween
>
)
}
{
userClaimData
?.
flags
?.
isLP
&&
unclaimedAmount
&&
JSBI
.
greaterThanOrEqual
(
unclaimedAmount
.
quotient
,
nonLPAmount
)
&&
(
<
RowBetween
>
<
T
YPE
.
s
ubHeader
color=
"white"
>
<
T
hemedText
.
S
ubHeader
color=
"white"
>
<
Trans
>
Liquidity
</
Trans
>
</
T
YPE
.
s
ubHeader
>
<
T
YPE
.
s
ubHeader
color=
"white"
>
</
T
hemedText
.
S
ubHeader
>
<
T
hemedText
.
S
ubHeader
color=
"white"
>
<
Trans
>
{
unclaimedAmount
.
subtract
(
CurrencyAmount
.
fromRawAmount
(
unclaimedAmount
.
currency
,
nonLPAmount
))
.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
})
}{
'
'
}
UNI
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
RowBetween
>
)
}
{
userClaimData
?.
flags
?.
isUser
&&
(
<
RowBetween
>
<
T
YPE
.
s
ubHeader
color=
"white"
>
<
T
hemedText
.
S
ubHeader
color=
"white"
>
<
Trans
>
User
</
Trans
>
</
T
YPE
.
s
ubHeader
>
<
T
YPE
.
s
ubHeader
color=
"white"
>
</
T
hemedText
.
S
ubHeader
>
<
T
hemedText
.
S
ubHeader
color=
"white"
>
<
Trans
>
{
USER_AMOUNT
}
UNI
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
RowBetween
>
)
}
</
CardSection
>
</
ModalUpper
>
<
AutoColumn
gap=
"md"
style=
{
{
padding
:
'
1rem
'
,
paddingTop
:
'
0
'
}
}
justify=
"center"
>
<
T
YPE
.
s
ubHeader
fontWeight=
{
500
}
>
<
T
hemedText
.
S
ubHeader
fontWeight=
{
500
}
>
<
Trans
>
As a member of the Uniswap community you may claim UNI to be used for voting and governance.
<
br
/>
<
br
/>
<
ExternalLink
href=
"https://uniswap.org/blog/uni"
>
Read more about UNI
</
ExternalLink
>
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
<
ButtonPrimary
disabled=
{
!
isAddress
(
account
??
''
)
}
padding=
"16px 16px"
...
...
@@ -187,9 +187,9 @@ export default function ClaimModal() {
</
ConfirmedIcon
>
<
AutoColumn
gap=
"100px"
justify=
{
'
center
'
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
fontWeight=
{
600
}
color=
"black"
>
<
T
hemedText
.
L
argeHeader
fontWeight=
{
600
}
color=
"black"
>
{
claimConfirmed
?
<
Trans
>
Claimed!
</
Trans
>
:
<
Trans
>
Claiming
</
Trans
>
}
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
{
!
claimConfirmed
&&
(
<
Text
fontSize=
{
36
}
color=
{
'
#ff007a
'
}
fontWeight=
{
800
}
>
<
Trans
>
{
unclaimedAmount
?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
}
??
'
-
'
)
}
UNI
</
Trans
>
...
...
@@ -198,7 +198,7 @@ export default function ClaimModal() {
</
AutoColumn
>
{
claimConfirmed
&&
(
<>
<
T
YPE
.
s
ubHeader
fontWeight=
{
500
}
color=
"black"
>
<
T
hemedText
.
S
ubHeader
fontWeight=
{
500
}
color=
"black"
>
<
Trans
>
<
span
role=
"img"
aria
-
label=
"party-hat"
>
🎉
{
'
'
}
...
...
@@ -208,13 +208,13 @@ export default function ClaimModal() {
🎉
</
span
>
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</>
)
}
{
attempting
&&
!
claimSubmitted
&&
(
<
T
YPE
.
s
ubHeader
color=
"black"
>
<
T
hemedText
.
S
ubHeader
color=
"black"
>
<
Trans
>
Confirm this transaction in your wallet
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
)
}
{
attempting
&&
claimSubmitted
&&
!
claimConfirmed
&&
chainId
&&
claimTxn
?.
hash
&&
(
<
ExternalLink
...
...
src/components/earn/ClaimRewardModal.tsx
View file @
bf7a40be
...
...
@@ -8,7 +8,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import
{
StakingInfo
}
from
'
../../state/stake/hooks
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
import
{
CloseIcon
,
T
YPE
}
from
'
../../theme
'
import
{
CloseIcon
,
T
hemedText
}
from
'
../../theme
'
import
{
ButtonError
}
from
'
../Button
'
import
{
AutoColumn
}
from
'
../Column
'
import
Modal
from
'
../Modal
'
...
...
@@ -74,24 +74,24 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta
{
!
attempting
&&
!
hash
&&
(
<
ContentWrapper
gap=
"lg"
>
<
RowBetween
>
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Claim
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
CloseIcon
onClick=
{
wrappedOnDismiss
}
/>
</
RowBetween
>
{
stakingInfo
?.
earnedAmount
&&
(
<
AutoColumn
justify=
"center"
gap=
"md"
>
<
T
YPE
.
b
ody
fontWeight=
{
600
}
fontSize=
{
36
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
600
}
fontSize=
{
36
}
>
{
stakingInfo
?.
earnedAmount
?.
toSignificant
(
6
)
}
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
Unclaimed UNI
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
)
}
<
T
YPE
.
s
ubHeader
style=
{
{
textAlign
:
'
center
'
}
}
>
<
T
hemedText
.
S
ubHeader
style=
{
{
textAlign
:
'
center
'
}
}
>
<
Trans
>
When you claim without withdrawing your liquidity remains in the mining pool.
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
<
ButtonError
disabled=
{
!!
error
}
error=
{
!!
error
&&
!!
stakingInfo
?.
stakedAmount
}
onClick=
{
onClaimReward
}
>
{
error
??
<
Trans
>
Claim
</
Trans
>
}
</
ButtonError
>
...
...
@@ -100,21 +100,21 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta
{
attempting
&&
!
hash
&&
(
<
LoadingView
onDismiss=
{
wrappedOnDismiss
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
b
ody
fontSize=
{
20
}
>
<
T
hemedText
.
B
ody
fontSize=
{
20
}
>
<
Trans
>
Claiming
{
stakingInfo
?.
earnedAmount
?.
toSignificant
(
6
)
}
UNI
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
</
LoadingView
>
)
}
{
hash
&&
(
<
SubmittedView
onDismiss=
{
wrappedOnDismiss
}
hash=
{
hash
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
Transaction Submitted
</
Trans
>
</
T
YPE
.
l
argeHeader
>
<
T
YPE
.
b
ody
fontSize=
{
20
}
>
</
T
hemedText
.
L
argeHeader
>
<
T
hemedText
.
B
ody
fontSize=
{
20
}
>
<
Trans
>
Claimed UNI!
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
</
SubmittedView
>
)
}
...
...
src/components/earn/PoolCard.tsx
View file @
bf7a40be
...
...
@@ -9,7 +9,7 @@ import { useTotalSupply } from '../../hooks/useTotalSupply'
import
useUSDCPrice
from
'
../../hooks/useUSDCPrice
'
import
{
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
StakingInfo
}
from
'
../../state/stake/hooks
'
import
{
StyledInternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
StyledInternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
import
{
unwrappedToken
}
from
'
../../utils/unwrappedToken
'
import
{
ButtonPrimary
}
from
'
../Button
'
...
...
@@ -115,9 +115,9 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
<
TopSection
>
<
DoubleCurrencyLogo
currency0=
{
currency0
}
currency1=
{
currency1
}
size=
{
24
}
/>
<
T
YPE
.
w
hite
fontWeight=
{
600
}
fontSize=
{
24
}
style=
{
{
marginLeft
:
'
8px
'
}
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
600
}
fontSize=
{
24
}
style=
{
{
marginLeft
:
'
8px
'
}
}
>
{
currency0
.
symbol
}
-
{
currency1
.
symbol
}
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
StyledInternalLink
to=
{
`/uni/${currencyId(currency0)}/${currencyId(currency1)}`
}
style=
{
{
width
:
'
100%
'
}
}
>
<
ButtonPrimary
padding=
"8px"
$borderRadius=
"8px"
>
...
...
@@ -128,22 +128,22 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
<
StatContainer
>
<
RowBetween
>
<
T
YPE
.
w
hite
>
<
T
hemedText
.
W
hite
>
<
Trans
>
Total deposited
</
Trans
>
</
T
YPE
.
w
hite
>
<
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
W
hite
>
{
valueOfTotalStakedAmountInUSDC
?
(
<
Trans
>
$
{
valueOfTotalStakedAmountInUSDC
.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
})
}
</
Trans
>
)
:
(
<
Trans
>
{
valueOfTotalStakedAmountInWETH
?.
toSignificant
(
4
,
{
groupSeparator
:
'
,
'
})
??
'
-
'
}
ETH
</
Trans
>
)
}
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
w
hite
>
<
T
hemedText
.
W
hite
>
<
Trans
>
Pool rate
</
Trans
>
</
T
YPE
.
w
hite
>
<
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
W
hite
>
{
stakingInfo
?
(
stakingInfo
.
active
?
(
<
Trans
>
...
...
@@ -156,7 +156,7 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
)
:
(
'
-
'
)
}
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
</
StatContainer
>
...
...
@@ -164,13 +164,13 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
<>
<
Break
/>
<
BottomSection
showBackground=
{
true
}
>
<
T
YPE
.
b
lack
color=
{
'
white
'
}
fontWeight=
{
500
}
>
<
T
hemedText
.
B
lack
color=
{
'
white
'
}
fontWeight=
{
500
}
>
<
span
>
<
Trans
>
Your rate
</
Trans
>
</
span
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
<
T
YPE
.
b
lack
style=
{
{
textAlign
:
'
right
'
}
}
color=
{
'
white
'
}
fontWeight=
{
500
}
>
<
T
hemedText
.
B
lack
style=
{
{
textAlign
:
'
right
'
}
}
color=
{
'
white
'
}
fontWeight=
{
500
}
>
<
span
role=
"img"
aria
-
label=
"wizard-icon"
style=
{
{
marginRight
:
'
0.5rem
'
}
}
>
⚡
</
span
>
...
...
@@ -188,7 +188,7 @@ export default function PoolCard({ stakingInfo }: { stakingInfo: StakingInfo })
)
:
(
'
-
'
)
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
BottomSection
>
</>
)
}
...
...
src/components/earn/StakingModal.tsx
View file @
bf7a40be
...
...
@@ -13,7 +13,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import
{
StakingInfo
,
useDerivedStakeInfo
}
from
'
../../state/stake/hooks
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
import
{
CloseIcon
,
T
YPE
}
from
'
../../theme
'
import
{
CloseIcon
,
T
hemedText
}
from
'
../../theme
'
import
{
formatCurrencyAmount
}
from
'
../../utils/formatCurrencyAmount
'
import
{
maxAmountSpend
}
from
'
../../utils/maxAmountSpend
'
import
{
ButtonConfirmed
,
ButtonError
}
from
'
../Button
'
...
...
@@ -159,9 +159,9 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
{
!
attempting
&&
!
hash
&&
(
<
ContentWrapper
gap=
"lg"
>
<
RowBetween
>
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Deposit
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
CloseIcon
onClick=
{
wrappedOnDismiss
}
/>
</
RowBetween
>
<
CurrencyInputPanel
...
...
@@ -178,19 +178,19 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
<
HypotheticalRewardRate
dim=
{
!
hypotheticalRewardRate
.
greaterThan
(
'
0
'
)
}
>
<
div
>
<
T
YPE
.
b
lack
fontWeight=
{
600
}
>
<
T
hemedText
.
B
lack
fontWeight=
{
600
}
>
<
Trans
>
Weekly Rewards
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
div
>
<
T
YPE
.
b
lack
>
<
T
hemedText
.
B
lack
>
<
Trans
>
{
hypotheticalRewardRate
.
multiply
((
60
*
60
*
24
*
7
).
toString
())
.
toSignificant
(
4
,
{
groupSeparator
:
'
,
'
})
}{
'
'
}
UNI / week
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
HypotheticalRewardRate
>
<
RowBetween
>
...
...
@@ -216,24 +216,24 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
{
attempting
&&
!
hash
&&
(
<
LoadingView
onDismiss=
{
wrappedOnDismiss
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
Depositing Liquidity
</
Trans
>
</
T
YPE
.
l
argeHeader
>
<
T
YPE
.
b
ody
fontSize=
{
20
}
>
</
T
hemedText
.
L
argeHeader
>
<
T
hemedText
.
B
ody
fontSize=
{
20
}
>
<
Trans
>
{
parsedAmount
?.
toSignificant
(
4
)
}
UNI-V2
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
</
LoadingView
>
)
}
{
attempting
&&
hash
&&
(
<
SubmittedView
onDismiss=
{
wrappedOnDismiss
}
hash=
{
hash
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
Transaction Submitted
</
Trans
>
</
T
YPE
.
l
argeHeader
>
<
T
YPE
.
b
ody
fontSize=
{
20
}
>
</
T
hemedText
.
L
argeHeader
>
<
T
hemedText
.
B
ody
fontSize=
{
20
}
>
<
Trans
>
Deposited
{
parsedAmount
?.
toSignificant
(
4
)
}
UNI-V2
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
</
SubmittedView
>
)
}
...
...
src/components/earn/UnstakingModal.tsx
View file @
bf7a40be
...
...
@@ -8,7 +8,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import
{
StakingInfo
}
from
'
../../state/stake/hooks
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
import
{
CloseIcon
,
T
YPE
}
from
'
../../theme
'
import
{
CloseIcon
,
T
hemedText
}
from
'
../../theme
'
import
{
ButtonError
}
from
'
../Button
'
import
{
AutoColumn
}
from
'
../Column
'
import
FormattedCurrencyAmount
from
'
../FormattedCurrencyAmount
'
...
...
@@ -76,34 +76,34 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki
{
!
attempting
&&
!
hash
&&
(
<
ContentWrapper
gap=
"lg"
>
<
RowBetween
>
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Withdraw
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
CloseIcon
onClick=
{
wrappedOndismiss
}
/>
</
RowBetween
>
{
stakingInfo
?.
stakedAmount
&&
(
<
AutoColumn
justify=
"center"
gap=
"md"
>
<
T
YPE
.
b
ody
fontWeight=
{
600
}
fontSize=
{
36
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
600
}
fontSize=
{
36
}
>
{
<
FormattedCurrencyAmount
currencyAmount=
{
stakingInfo
.
stakedAmount
}
/>
}
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
Deposited liquidity:
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
)
}
{
stakingInfo
?.
earnedAmount
&&
(
<
AutoColumn
justify=
"center"
gap=
"md"
>
<
T
YPE
.
b
ody
fontWeight=
{
600
}
fontSize=
{
36
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
600
}
fontSize=
{
36
}
>
{
<
FormattedCurrencyAmount
currencyAmount=
{
stakingInfo
?.
earnedAmount
}
/>
}
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
Unclaimed UNI
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
)
}
<
T
YPE
.
s
ubHeader
style=
{
{
textAlign
:
'
center
'
}
}
>
<
T
hemedText
.
S
ubHeader
style=
{
{
textAlign
:
'
center
'
}
}
>
<
Trans
>
When you withdraw, your UNI is claimed and your liquidity is removed from the mining pool.
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
<
ButtonError
disabled=
{
!!
error
}
error=
{
!!
error
&&
!!
stakingInfo
?.
stakedAmount
}
onClick=
{
onWithdraw
}
>
{
error
??
<
Trans
>
Withdraw
&
Claim
</
Trans
>
}
</
ButtonError
>
...
...
@@ -112,27 +112,27 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki
{
attempting
&&
!
hash
&&
(
<
LoadingView
onDismiss=
{
wrappedOndismiss
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
b
ody
fontSize=
{
20
}
>
<
T
hemedText
.
B
ody
fontSize=
{
20
}
>
<
Trans
>
Withdrawing
{
stakingInfo
?.
stakedAmount
?.
toSignificant
(
4
)
}
UNI-V2
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
fontSize=
{
20
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
fontSize=
{
20
}
>
<
Trans
>
Claiming
{
stakingInfo
?.
earnedAmount
?.
toSignificant
(
4
)
}
UNI
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
</
LoadingView
>
)
}
{
hash
&&
(
<
SubmittedView
onDismiss=
{
wrappedOndismiss
}
hash=
{
hash
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
Transaction Submitted
</
Trans
>
</
T
YPE
.
l
argeHeader
>
<
T
YPE
.
b
ody
fontSize=
{
20
}
>
</
T
hemedText
.
L
argeHeader
>
<
T
hemedText
.
B
ody
fontSize=
{
20
}
>
<
Trans
>
Withdrew UNI-V2!
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
fontSize=
{
20
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
fontSize=
{
20
}
>
<
Trans
>
Claimed UNI!
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
</
SubmittedView
>
)
}
...
...
src/components/swap/AdvancedSwapDetails.tsx
View file @
bf7a40be
...
...
@@ -6,7 +6,7 @@ import { LoadingRows } from 'components/Loader/styled'
import
{
useContext
,
useMemo
}
from
'
react
'
import
{
ThemeContext
}
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
computeRealizedLPFeePercent
}
from
'
../../utils/prices
'
import
{
AutoColumn
}
from
'
../Column
'
import
{
RowBetween
,
RowFixed
}
from
'
../Row
'
...
...
@@ -56,55 +56,55 @@ export function AdvancedSwapDetails({ trade, allowedSlippage, syncing = false }:
</
TransactionDetailsLabel
>
<
RowBetween
>
<
RowFixed
>
<
T
YPE
.
s
ubHeader
color=
{
theme
.
text1
}
>
<
T
hemedText
.
S
ubHeader
color=
{
theme
.
text1
}
>
<
Trans
>
Liquidity Provider Fee
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
RowFixed
>
<
TextWithLoadingPlaceholder
syncing=
{
syncing
}
width=
{
65
}
>
<
T
YPE
.
b
lack
textAlign=
"right"
fontSize=
{
14
}
>
<
T
hemedText
.
B
lack
textAlign=
"right"
fontSize=
{
14
}
>
{
realizedLPFee
?
`${realizedLPFee.toSignificant(4)} ${realizedLPFee.currency.symbol}`
:
'
-
'
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
TextWithLoadingPlaceholder
>
</
RowBetween
>
<
RowBetween
>
<
RowFixed
>
<
T
YPE
.
s
ubHeader
color=
{
theme
.
text1
}
>
<
T
hemedText
.
S
ubHeader
color=
{
theme
.
text1
}
>
<
Trans
>
Price Impact
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
RowFixed
>
<
TextWithLoadingPlaceholder
syncing=
{
syncing
}
width=
{
50
}
>
<
T
YPE
.
b
lack
textAlign=
"right"
fontSize=
{
14
}
>
<
T
hemedText
.
B
lack
textAlign=
"right"
fontSize=
{
14
}
>
<
FormattedPriceImpact
priceImpact=
{
priceImpact
}
/>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
TextWithLoadingPlaceholder
>
</
RowBetween
>
<
RowBetween
>
<
RowFixed
>
<
T
YPE
.
s
ubHeader
color=
{
theme
.
text1
}
>
<
T
hemedText
.
S
ubHeader
color=
{
theme
.
text1
}
>
<
Trans
>
Allowed Slippage
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
RowFixed
>
<
TextWithLoadingPlaceholder
syncing=
{
syncing
}
width=
{
45
}
>
<
T
YPE
.
b
lack
textAlign=
"right"
fontSize=
{
14
}
>
<
T
hemedText
.
B
lack
textAlign=
"right"
fontSize=
{
14
}
>
{
allowedSlippage
.
toFixed
(
2
)
}
%
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
TextWithLoadingPlaceholder
>
</
RowBetween
>
<
RowBetween
>
<
RowFixed
>
<
T
YPE
.
s
ubHeader
color=
{
theme
.
text1
}
>
<
T
hemedText
.
S
ubHeader
color=
{
theme
.
text1
}
>
{
trade
.
tradeType
===
TradeType
.
EXACT_INPUT
?
<
Trans
>
Minimum received
</
Trans
>
:
<
Trans
>
Maximum sent
</
Trans
>
}
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
RowFixed
>
<
TextWithLoadingPlaceholder
syncing=
{
syncing
}
width=
{
70
}
>
<
T
YPE
.
b
lack
textAlign=
"right"
fontSize=
{
14
}
>
<
T
hemedText
.
B
lack
textAlign=
"right"
fontSize=
{
14
}
>
{
trade
.
tradeType
===
TradeType
.
EXACT_INPUT
?
`${trade.minimumAmountOut(allowedSlippage).toSignificant(6)} ${trade.outputAmount.currency.symbol}`
:
`${trade.maximumAmountIn(allowedSlippage).toSignificant(6)} ${trade.inputAmount.currency.symbol}`
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
TextWithLoadingPlaceholder
>
</
RowBetween
>
</
AutoColumn
>
...
...
src/components/swap/RouterLabel.tsx
View file @
bf7a40be
import
{
Trans
}
from
'
@lingui/macro
'
import
{
useRoutingAPIEnabled
}
from
'
state/user/hooks
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
{
ReactComponent
as
AutoRouterIcon
}
from
'
../../assets/svg/auto_router.svg
'
import
{
ReactComponent
as
StaticRouterIcon
}
from
'
../../assets/svg/static_route.svg
'
...
...
@@ -26,7 +26,7 @@ const StyledStaticRouterIcon = styled(StaticRouterIcon)`
}
`
const
StyledAutoRouterLabel
=
styled
(
T
YPE
.
b
lack
)
`
const
StyledAutoRouterLabel
=
styled
(
T
hemedText
.
B
lack
)
`
line-height: 1rem;
/* fallback color */
...
...
@@ -51,8 +51,8 @@ export function AutoRouterLabel() {
return
routingAPIEnabled
?
(
<
StyledAutoRouterLabel
fontSize=
{
14
}
>
Auto Router
</
StyledAutoRouterLabel
>
)
:
(
<
T
YPE
.
b
lack
fontSize=
{
14
}
>
<
T
hemedText
.
B
lack
fontSize=
{
14
}
>
<
Trans
>
Trade Route
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
)
}
src/components/swap/SwapHeader.tsx
View file @
bf7a40be
...
...
@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
import
{
Percent
}
from
'
@uniswap/sdk-core
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
RowBetween
,
RowFixed
}
from
'
../Row
'
import
SettingsTab
from
'
../Settings
'
...
...
@@ -17,9 +17,9 @@ export default function SwapHeader({ allowedSlippage }: { allowedSlippage: Perce
<
StyledSwapHeader
>
<
RowBetween
>
<
RowFixed
>
<
T
YPE
.
b
lack
fontWeight=
{
500
}
fontSize=
{
16
}
style=
{
{
marginRight
:
'
8px
'
}
}
>
<
T
hemedText
.
B
lack
fontWeight=
{
500
}
fontSize=
{
16
}
style=
{
{
marginRight
:
'
8px
'
}
}
>
<
Trans
>
Swap
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
RowFixed
>
<
RowFixed
>
<
SettingsTab
placeholderSlippage=
{
allowedSlippage
}
/>
...
...
src/components/swap/SwapModalHeader.tsx
View file @
bf7a40be
...
...
@@ -8,7 +8,7 @@ import { Text } from 'rebass'
import
styled
,
{
ThemeContext
}
from
'
styled-components/macro
'
import
{
useUSDCValue
}
from
'
../../hooks/useUSDCPrice
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
isAddress
,
shortenAddress
}
from
'
../../utils
'
import
{
computeFiatValuePriceImpact
}
from
'
../../utils/computeFiatValuePriceImpact
'
import
{
ButtonPrimary
}
from
'
../Button
'
...
...
@@ -64,9 +64,9 @@ export default function SwapModalHeader({
<
LightCard
padding=
"0.75rem 1rem"
>
<
AutoColumn
gap=
{
'
8px
'
}
>
<
RowBetween
>
<
T
YPE
.
b
ody
color=
{
theme
.
text3
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text3
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
Trans
>
From
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
FiatValue
fiatValue=
{
fiatValueInput
}
/>
</
RowBetween
>
<
RowBetween
align=
"center"
>
...
...
@@ -94,15 +94,15 @@ export default function SwapModalHeader({
<
LightCard
padding=
"0.75rem 1rem"
style=
{
{
marginBottom
:
'
0.25rem
'
}
}
>
<
AutoColumn
gap=
{
'
8px
'
}
>
<
RowBetween
>
<
T
YPE
.
b
ody
color=
{
theme
.
text3
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text3
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
Trans
>
To
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
fontSize=
{
14
}
color=
{
theme
.
text3
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
fontSize=
{
14
}
color=
{
theme
.
text3
}
>
<
FiatValue
fiatValue=
{
fiatValueOutput
}
priceImpact=
{
computeFiatValuePriceImpact
(
fiatValueInput
,
fiatValueOutput
)
}
/>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
RowBetween
>
<
RowBetween
align=
"flex-end"
>
<
RowFixed
gap=
{
'
0px
'
}
>
...
...
@@ -120,9 +120,9 @@ export default function SwapModalHeader({
</
AutoColumn
>
</
LightCard
>
<
RowBetween
style=
{
{
marginTop
:
'
0.25rem
'
,
padding
:
'
0 1rem
'
}
}
>
<
T
YPE
.
b
ody
color=
{
theme
.
text2
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text2
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
Trans
>
Price
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
TradePrice
price=
{
trade
.
executionPrice
}
showInverted=
{
showInverted
}
setShowInverted=
{
setShowInverted
}
/>
</
RowBetween
>
...
...
@@ -135,9 +135,9 @@ export default function SwapModalHeader({
<
RowBetween
>
<
RowFixed
>
<
AlertTriangle
size=
{
20
}
style=
{
{
marginRight
:
'
8px
'
,
minWidth
:
24
}
}
/>
<
T
YPE
.
m
ain
color=
{
theme
.
primary1
}
>
<
T
hemedText
.
M
ain
color=
{
theme
.
primary1
}
>
<
Trans
>
Price Updated
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
RowFixed
>
<
ButtonPrimary
style=
{
{
padding
:
'
.5rem
'
,
width
:
'
fit-content
'
,
fontSize
:
'
0.825rem
'
,
borderRadius
:
'
12px
'
}
}
...
...
@@ -151,7 +151,7 @@ export default function SwapModalHeader({
<
AutoColumn
justify=
"flex-start"
gap=
"sm"
style=
{
{
padding
:
'
.75rem 1rem
'
}
}
>
{
trade
.
tradeType
===
TradeType
.
EXACT_INPUT
?
(
<
T
YPE
.
i
talic
fontWeight=
{
400
}
textAlign=
"left"
style=
{
{
width
:
'
100%
'
}
}
>
<
T
hemedText
.
I
talic
fontWeight=
{
400
}
textAlign=
"left"
style=
{
{
width
:
'
100%
'
}
}
>
<
Trans
>
Output is estimated. You will receive at least
{
'
'
}
<
b
>
...
...
@@ -159,9 +159,9 @@ export default function SwapModalHeader({
</
b
>
{
'
'
}
or the transaction will revert.
</
Trans
>
</
T
YPE
.
i
talic
>
</
T
hemedText
.
I
talic
>
)
:
(
<
T
YPE
.
i
talic
fontWeight=
{
400
}
textAlign=
"left"
style=
{
{
width
:
'
100%
'
}
}
>
<
T
hemedText
.
I
talic
fontWeight=
{
400
}
textAlign=
"left"
style=
{
{
width
:
'
100%
'
}
}
>
<
Trans
>
Input is estimated. You will sell at most
{
'
'
}
<
b
>
...
...
@@ -169,17 +169,17 @@ export default function SwapModalHeader({
</
b
>
{
'
'
}
or the transaction will revert.
</
Trans
>
</
T
YPE
.
i
talic
>
</
T
hemedText
.
I
talic
>
)
}
</
AutoColumn
>
{
recipient
!==
null
?
(
<
AutoColumn
justify=
"flex-start"
gap=
"sm"
style=
{
{
padding
:
'
12px 0 0 0px
'
}
}
>
<
T
YPE
.
m
ain
>
<
T
hemedText
.
M
ain
>
<
Trans
>
Output will be sent to
{
'
'
}
<
b
title=
{
recipient
}
>
{
isAddress
(
recipient
)
?
shortenAddress
(
recipient
)
:
recipient
}
</
b
>
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
AutoColumn
>
)
:
null
}
</
AutoColumn
>
...
...
src/components/swap/SwapRoute.tsx
View file @
bf7a40be
...
...
@@ -11,7 +11,7 @@ import { Version } from 'hooks/useToggledVersion'
import
{
memo
}
from
'
react
'
import
{
useRoutingAPIEnabled
}
from
'
state/user/hooks
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
{
getTradeVersion
}
from
'
utils/getTradeVersion
'
import
{
AutoRouterLabel
,
AutoRouterLogo
}
from
'
./RouterLabel
'
...
...
@@ -46,9 +46,9 @@ export default memo(function SwapRoute({
</
LoadingRows
>
)
:
(
<
Badge
>
<
T
YPE
.
b
lack
fontSize=
{
12
}
>
<
T
hemedText
.
B
lack
fontSize=
{
12
}
>
{
getTradeVersion
(
trade
)
===
Version
.
v2
?
<
Trans
>
V2
</
Trans
>
:
<
Trans
>
V3
</
Trans
>
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
Badge
>
)
}
</
RowBetween
>
...
...
@@ -65,9 +65,9 @@ export default memo(function SwapRoute({
/>
)
}
{
routingAPIEnabled
&&
(
<
T
YPE
.
m
ain
fontSize=
{
12
}
width=
{
400
}
>
<
T
hemedText
.
M
ain
fontSize=
{
12
}
width=
{
400
}
>
<
Trans
>
This route optimizes your price by considering split routes, multiple hops, and gas costs.
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
)
}
</
AutoColumn
>
)
...
...
src/components/swap/TradePrice.tsx
View file @
bf7a40be
...
...
@@ -4,7 +4,7 @@ import useUSDCPrice from 'hooks/useUSDCPrice'
import
{
useCallback
,
useContext
}
from
'
react
'
import
{
Text
}
from
'
rebass
'
import
styled
,
{
ThemeContext
}
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
interface
TradePriceProps
{
price
:
Price
<
Currency
,
Currency
>
...
...
@@ -49,9 +49,9 @@ export default function TradePrice({ price, showInverted, setShowInverted }: Tra
{text}
</Text>{' '}
{usdcPrice && (
<T
YPE.d
arkGray>
<T
hemedText.D
arkGray>
<Trans>(
${
usdcPrice
.
toSignificant
(
6
,
{
groupSeparator
:
'
,
'
})}
)</Trans>
</T
YPE.d
arkGray>
</T
hemedText.D
arkGray>
)}
</StyledPriceContainer>
)
...
...
src/components/swap/UnsupportedCurrencyFooter.tsx
View file @
bf7a40be
...
...
@@ -9,7 +9,7 @@ import { AutoRow, RowBetween } from 'components/Row'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
{
useState
}
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
{
CloseIcon
,
ExternalLink
,
T
YPE
,
Z_INDEX
}
from
'
theme
'
import
{
CloseIcon
,
ExternalLink
,
T
hemedText
,
Z_INDEX
}
from
'
theme
'
import
{
useUnsupportedTokens
}
from
'
../../hooks/Tokens
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
...
...
@@ -37,7 +37,7 @@ const StyledButtonEmpty = styled(ButtonEmpty)`
text-decoration: none;
`
const
AddressText
=
styled
(
T
YPE
.
b
lue
)
`
const
AddressText
=
styled
(
T
hemedText
.
B
lue
)
`
font-size: 12px;
${({
theme
})
=>
theme
.
mediaWidth
.
upToSmall
`
...
...
@@ -70,9 +70,9 @@ export default function UnsupportedCurrencyFooter({
<
Card
padding=
"2rem"
>
<
AutoColumn
gap=
"lg"
>
<
RowBetween
>
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Unsupported Assets
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
CloseIcon
onClick=
{
()
=>
setShowDetails
(
false
)
}
/>
</
RowBetween
>
{
tokens
.
map
((
token
)
=>
{
...
...
@@ -84,7 +84,7 @@ export default function UnsupportedCurrencyFooter({
<
AutoColumn
gap=
"10px"
>
<
AutoRow
gap=
"5px"
align=
"center"
>
<
CurrencyLogo
currency=
{
token
}
size=
{
'
24px
'
}
/>
<
T
YPE
.
body
fontWeight=
{
500
}
>
{
token
.
symbol
}
</
TYPE
.
b
ody
>
<
T
hemedText
.
Body
fontWeight=
{
500
}
>
{
token
.
symbol
}
</
ThemedText
.
B
ody
>
</
AutoRow
>
{
chainId
&&
(
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
token
.
address
,
ExplorerDataType
.
ADDRESS
)
}
>
...
...
@@ -97,20 +97,20 @@ export default function UnsupportedCurrencyFooter({
)
})
}
<
AutoColumn
gap=
"lg"
>
<
T
YPE
.
b
ody
fontWeight=
{
500
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
500
}
>
<
Trans
>
Some assets are not available through this interface because they may not work well with the smart
contracts or we are unable to allow trading for legal reasons.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
</
AutoColumn
>
</
Card
>
</
Modal
>
<
StyledButtonEmpty
padding=
{
'
0
'
}
onClick=
{
()
=>
setShowDetails
(
true
)
}
>
<
T
YPE
.
b
lue
>
<
T
hemedText
.
B
lue
>
<
Trans
>
Read more about unsupported assets
</
Trans
>
</
T
YPE
.
b
lue
>
</
T
hemedText
.
B
lue
>
</
StyledButtonEmpty
>
</
DetailsFooter
>
)
...
...
src/components/swap/styleds.tsx
View file @
bf7a40be
...
...
@@ -5,8 +5,8 @@ import { ReactNode } from 'react'
import
{
AlertTriangle
}
from
'
react-feather
'
import
{
Text
}
from
'
rebass
'
import
styled
,
{
css
}
from
'
styled-components/macro
'
import
{
TYPE
}
from
'
theme
'
import
{
ThemedText
}
from
'
../../theme
'
import
{
AutoColumn
}
from
'
../Column
'
import
TradePrice
from
'
./TradePrice
'
...
...
@@ -133,7 +133,7 @@ export const SwapShowAcceptChanges = styled(AutoColumn)`
margin-top: 8px;
`
export
const
TransactionDetailsLabel
=
styled
(
T
YPE
.
b
lack
)
`
export
const
TransactionDetailsLabel
=
styled
(
T
hemedText
.
B
lack
)
`
border-bottom: 1px solid
${({
theme
})
=>
theme
.
bg2
}
;
padding-bottom: 0.5rem;
`
...
...
src/components/vote/DelegateModal.tsx
View file @
bf7a40be
...
...
@@ -10,7 +10,7 @@ import useENS from '../../hooks/useENS'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useDelegateCallback
}
from
'
../../state/governance/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
AddressInputPanel
from
'
../AddressInputPanel
'
import
{
ButtonPrimary
}
from
'
../Button
'
import
{
AutoColumn
}
from
'
../Column
'
...
...
@@ -95,23 +95,25 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
<
ContentWrapper
gap=
"lg"
>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
RowBetween
>
<
T
YPE
.
mediumHeader
fontWeight=
{
500
}
>
{
title
}
</
TYPE
.
m
ediumHeader
>
<
T
hemedText
.
MediumHeader
fontWeight=
{
500
}
>
{
title
}
</
ThemedText
.
M
ediumHeader
>
<
StyledClosed
stroke=
"black"
onClick=
{
wrappedOndismiss
}
/>
</
RowBetween
>
<
T
YPE
.
b
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
Earned UNI tokens represent voting shares in Uniswap governance.
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
You can either vote on each proposal yourself or delegate your votes to a third party.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
{
usingDelegate
&&
<
AddressInputPanel
value=
{
typed
}
onChange=
{
handleRecipientType
}
/>
}
<
ButtonPrimary
disabled=
{
!
isAddress
(
parsedAddress
??
''
)
}
onClick=
{
onDelegate
}
>
<
T
YPE
.
m
ediumHeader
color=
"white"
>
<
T
hemedText
.
M
ediumHeader
color=
"white"
>
{
usingDelegate
?
<
Trans
>
Delegate Votes
</
Trans
>
:
<
Trans
>
Self Delegate
</
Trans
>
}
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
</
ButtonPrimary
>
<
TextButton
onClick=
{
()
=>
setUsingDelegate
(
!
usingDelegate
)
}
>
<
TYPE
.
blue
>
{
usingDelegate
?
<
Trans
>
Remove Delegate
</
Trans
>
:
<
Trans
>
Add Delegate +
</
Trans
>
}
</
TYPE
.
blue
>
<
ThemedText
.
Blue
>
{
usingDelegate
?
<
Trans
>
Remove Delegate
</
Trans
>
:
<
Trans
>
Add Delegate +
</
Trans
>
}
</
ThemedText
.
Blue
>
</
TextButton
>
</
AutoColumn
>
</
ContentWrapper
>
...
...
@@ -119,20 +121,20 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
{
attempting
&&
!
hash
&&
(
<
LoadingView
onDismiss=
{
wrappedOndismiss
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
{
usingDelegate
?
<
Trans
>
Delegating votes
</
Trans
>
:
<
Trans
>
Unlocking Votes
</
Trans
>
}
</
T
YPE
.
l
argeHeader
>
<
T
YPE
.
main
fontSize=
{
36
}
>
{
formatCurrencyAmount
(
uniBalance
,
4
)
}
</
TYPE
.
m
ain
>
</
T
hemedText
.
L
argeHeader
>
<
T
hemedText
.
Main
fontSize=
{
36
}
>
{
formatCurrencyAmount
(
uniBalance
,
4
)
}
</
ThemedText
.
M
ain
>
</
AutoColumn
>
</
LoadingView
>
)
}
{
hash
&&
(
<
SubmittedView
onDismiss=
{
wrappedOndismiss
}
hash=
{
hash
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
Transaction Submitted
</
Trans
>
</
T
YPE
.
l
argeHeader
>
<
T
YPE
.
main
fontSize=
{
36
}
>
{
formatCurrencyAmount
(
uniBalance
,
4
)
}
</
TYPE
.
m
ain
>
</
T
hemedText
.
L
argeHeader
>
<
T
hemedText
.
Main
fontSize=
{
36
}
>
{
formatCurrencyAmount
(
uniBalance
,
4
)
}
</
ThemedText
.
M
ain
>
</
AutoColumn
>
</
SubmittedView
>
)
}
...
...
src/components/vote/ProposalEmptyState.tsx
View file @
bf7a40be
...
...
@@ -2,7 +2,7 @@ import { Trans } from '@lingui/macro'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
const
EmptyProposals
=
styled
.
div
`
border: 1px solid
${({
theme
})
=>
theme
.
text4
}
;
...
...
@@ -25,14 +25,14 @@ interface EmptyStateProps {
}
const
EmptyState
=
({
HeaderContent
,
SubHeaderContent
}:
EmptyStateProps
)
=>
(
<
EmptyProposals
>
<
T
YPE
.
b
ody
style=
{
{
marginBottom
:
'
8px
'
}
}
>
<
T
hemedText
.
B
ody
style=
{
{
marginBottom
:
'
8px
'
}
}
>
<
HeaderContent
/>
</
T
YPE
.
b
ody
>
<
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
S
ubHeader
>
<
Sub
>
<
SubHeaderContent
/>
</
Sub
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
EmptyProposals
>
)
...
...
src/components/vote/VoteModal.tsx
View file @
bf7a40be
...
...
@@ -8,8 +8,8 @@ import Circle from '../../assets/images/blue-loader.svg'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useUserVotes
,
useVoteCallback
}
from
'
../../state/governance/hooks
'
import
{
VoteOption
}
from
'
../../state/governance/types
'
import
{
CustomLightSpinner
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme
/components
'
import
{
CustomLightSpinner
,
T
hemedText
}
from
'
../../theme
'
import
{
ExternalLink
}
from
'
../../theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
ButtonPrimary
}
from
'
../Button
'
import
{
AutoColumn
,
ColumnCenter
}
from
'
../Column
'
...
...
@@ -85,7 +85,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
<
ContentWrapper
gap=
"lg"
>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
RowBetween
>
<
T
YPE
.
m
ediumHeader
fontWeight=
{
500
}
>
<
T
hemedText
.
M
ediumHeader
fontWeight=
{
500
}
>
{
voteOption
===
VoteOption
.
Against
?
(
<
Trans
>
Vote against proposal
{
proposalId
}
</
Trans
>
)
:
voteOption
===
VoteOption
.
For
?
(
...
...
@@ -93,14 +93,14 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
)
:
(
<
Trans
>
Vote to abstain on proposal
{
proposalId
}
</
Trans
>
)
}
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
StyledClosed
stroke=
"black"
onClick=
{
wrappedOndismiss
}
/>
</
RowBetween
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
{
formatCurrencyAmount
(
availableVotes
,
4
)
}
Votes
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
<
ButtonPrimary
onClick=
{
onVote
}
>
<
T
YPE
.
m
ediumHeader
color=
"white"
>
<
T
hemedText
.
M
ediumHeader
color=
"white"
>
{
voteOption
===
VoteOption
.
Against
?
(
<
Trans
>
Vote against proposal
{
proposalId
}
</
Trans
>
)
:
voteOption
===
VoteOption
.
For
?
(
...
...
@@ -108,7 +108,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
)
:
(
<
Trans
>
Vote to abstain on proposal
{
proposalId
}
</
Trans
>
)
}
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
</
ButtonPrimary
>
</
AutoColumn
>
</
ContentWrapper
>
...
...
@@ -124,13 +124,13 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
</
ConfirmedIcon
>
<
AutoColumn
gap=
"100px"
justify=
{
'
center
'
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
Submitting Vote
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
</
AutoColumn
>
<
T
YPE
.
s
ubHeader
>
<
T
hemedText
.
S
ubHeader
>
<
Trans
>
Confirm this transaction in your wallet
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
AutoColumn
>
</
ConfirmOrLoadingWrapper
>
)
}
...
...
@@ -145,18 +145,18 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
</
ConfirmedIcon
>
<
AutoColumn
gap=
"100px"
justify=
{
'
center
'
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
Transaction Submitted
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
</
AutoColumn
>
{
chainId
&&
(
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
hash
,
ExplorerDataType
.
TRANSACTION
)
}
style=
{
{
marginLeft
:
'
4px
'
}
}
>
<
T
YPE
.
s
ubHeader
>
<
T
hemedText
.
S
ubHeader
>
<
Trans
>
View transaction on Explorer
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
ExternalLink
>
)
}
</
AutoColumn
>
...
...
src/connectors/Fortmatic.ts
View file @
bf7a40be
...
...
@@ -5,10 +5,10 @@ export const OVERLAY_READY = 'OVERLAY_READY'
type
FormaticSupportedChains
=
1
|
3
|
4
|
42
const
CHAIN_ID_NETWORK_ARGUMENT
:
{
readonly
[
chainId
in
FormaticSupportedChains
]:
string
|
undefined
}
=
{
[
1
]
:
undefined
,
[
3
]
:
'
ropsten
'
,
[
4
]
:
'
rinkeby
'
,
[
42
]
:
'
kovan
'
,
1
:
undefined
,
3
:
'
ropsten
'
,
4
:
'
rinkeby
'
,
42
:
'
kovan
'
,
}
export
class
FortmaticConnector
extends
FortmaticConnectorCore
{
...
...
src/constants/governance.ts
View file @
bf7a40be
...
...
@@ -19,5 +19,5 @@ export const DEFAULT_AVERAGE_BLOCK_TIME_IN_SECS = 13
// Block time here is slightly higher (~1s) than average in order to avoid ongoing proposals past the displayed time
export
const
AVERAGE_BLOCK_TIME_IN_SECS
:
{
[
chainId
:
number
]:
number
}
=
{
[
1
]
:
DEFAULT_AVERAGE_BLOCK_TIME_IN_SECS
,
1
:
DEFAULT_AVERAGE_BLOCK_TIME_IN_SECS
,
}
src/constants/routing.ts
View file @
bf7a40be
...
...
@@ -13,6 +13,9 @@ import {
FRAX
,
FXS
,
renBTC
,
rETH2
,
sETH2
,
SWISE
,
TRIBE
,
USDC
,
USDC_ARBITRUM
,
...
...
@@ -53,6 +56,8 @@ export const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = {
export
const
ADDITIONAL_BASES
:
{
[
chainId
:
number
]:
{
[
tokenAddress
:
string
]:
Token
[]
}
}
=
{
[
SupportedChainId
.
MAINNET
]:
{
'
0xF16E4d813f4DcfDe4c5b44f305c908742De84eF0
'
:
[
ETH2X_FLI
],
[
rETH2
.
address
]:
[
sETH2
],
[
SWISE
.
address
]:
[
sETH2
],
[
FEI
.
address
]:
[
TRIBE
],
[
TRIBE
.
address
]:
[
FEI
],
[
FRAX
.
address
]:
[
FXS
],
...
...
src/constants/tokens.ts
View file @
bf7a40be
...
...
@@ -136,6 +136,27 @@ export const ETH2X_FLI = new Token(
'
ETH2x-FLI
'
,
'
ETH 2x Flexible Leverage Index
'
)
export
const
sETH2
=
new
Token
(
SupportedChainId
.
MAINNET
,
'
0xFe2e637202056d30016725477c5da089Ab0A043A
'
,
18
,
'
sETH2
'
,
'
StakeWise Staked ETH2
'
)
export
const
rETH2
=
new
Token
(
SupportedChainId
.
MAINNET
,
'
0x20BC832ca081b91433ff6c17f85701B6e92486c5
'
,
18
,
'
rETH2
'
,
'
StakeWise Reward ETH2
'
)
export
const
SWISE
=
new
Token
(
SupportedChainId
.
MAINNET
,
'
0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2
'
,
18
,
'
SWISE
'
,
'
StakeWise
'
)
export
const
UNI
:
{
[
chainId
:
number
]:
Token
}
=
{
[
SupportedChainId
.
MAINNET
]:
new
Token
(
SupportedChainId
.
MAINNET
,
UNI_ADDRESS
[
1
],
18
,
'
UNI
'
,
'
Uniswap
'
),
[
SupportedChainId
.
RINKEBY
]:
new
Token
(
SupportedChainId
.
RINKEBY
,
UNI_ADDRESS
[
4
],
18
,
'
UNI
'
,
'
Uniswap
'
),
...
...
src/hooks/useERC20Permit.ts
View file @
bf7a40be
...
...
@@ -34,23 +34,23 @@ const PERMITTABLE_TOKENS: {
[
checksummedTokenAddress
:
string
]:
PermitInfo
}
}
=
{
[
1
]
:
{
1
:
{
[
USDC
.
address
]:
{
type
:
PermitType
.
AMOUNT
,
name
:
'
USD Coin
'
,
version
:
'
2
'
},
[
DAI
.
address
]:
{
type
:
PermitType
.
ALLOWED
,
name
:
'
Dai Stablecoin
'
,
version
:
'
1
'
},
[
UNI
[
1
].
address
]:
{
type
:
PermitType
.
AMOUNT
,
name
:
'
Uniswap
'
},
},
[
4
]
:
{
[
'
0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735
'
]
:
{
type
:
PermitType
.
ALLOWED
,
name
:
'
Dai Stablecoin
'
,
version
:
'
1
'
},
4
:
{
'
0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735
'
:
{
type
:
PermitType
.
ALLOWED
,
name
:
'
Dai Stablecoin
'
,
version
:
'
1
'
},
[
UNI
[
4
].
address
]:
{
type
:
PermitType
.
AMOUNT
,
name
:
'
Uniswap
'
},
},
[
3
]
:
{
3
:
{
[
UNI
[
3
].
address
]:
{
type
:
PermitType
.
AMOUNT
,
name
:
'
Uniswap
'
},
[
'
0x07865c6E87B9F70255377e024ace6630C1Eaa37F
'
]
:
{
type
:
PermitType
.
AMOUNT
,
name
:
'
USD Coin
'
,
version
:
'
2
'
},
'
0x07865c6E87B9F70255377e024ace6630C1Eaa37F
'
:
{
type
:
PermitType
.
AMOUNT
,
name
:
'
USD Coin
'
,
version
:
'
2
'
},
},
[
5
]
:
{
5
:
{
[
UNI
[
5
].
address
]:
{
type
:
PermitType
.
AMOUNT
,
name
:
'
Uniswap
'
},
},
[
42
]
:
{
42
:
{
[
UNI
[
42
].
address
]:
{
type
:
PermitType
.
AMOUNT
,
name
:
'
Uniswap
'
},
},
}
...
...
src/hooks/useMonitoringEventCallback.ts
0 → 100644
View file @
bf7a40be
import
{
TransactionResponse
}
from
'
@ethersproject/providers
'
import
{
initializeApp
}
from
'
firebase/app
'
import
{
getDatabase
,
push
,
ref
}
from
'
firebase/database
'
import
{
useCallback
}
from
'
react
'
import
{
TransactionInfo
,
TransactionType
}
from
'
state/transactions/actions
'
import
{
useActiveWeb3React
}
from
'
./web3
'
type
PartialTransactionResponse
=
Pick
<
TransactionResponse
,
'
hash
'
|
'
v
'
|
'
r
'
|
'
s
'
>
const
SUPPORTED_TRANSACTION_TYPES
=
[
TransactionType
.
ADD_LIQUIDITY_V2_POOL
,
TransactionType
.
ADD_LIQUIDITY_V3_POOL
,
TransactionType
.
CREATE_V3_POOL
,
TransactionType
.
REMOVE_LIQUIDITY_V3
,
TransactionType
.
SWAP
,
]
const
FIREBASE_API_KEY
=
process
.
env
.
REACT_APP_FIREBASE_KEY
const
firebaseEnabled
=
typeof
FIREBASE_API_KEY
!==
'
undefined
'
if
(
firebaseEnabled
)
initializeFirebase
()
function
useMonitoringEventCallback
()
{
const
{
chainId
}
=
useActiveWeb3React
()
return
useCallback
(
async
function
log
(
type
:
string
,
{
transactionResponse
,
walletAddress
,
}:
{
transactionResponse
:
PartialTransactionResponse
;
walletAddress
:
string
|
undefined
}
)
{
if
(
!
firebaseEnabled
)
return
const
db
=
getDatabase
()
if
(
!
walletAddress
)
{
console
.
debug
(
'
Wallet address required to log monitoring events.
'
)
return
}
try
{
push
(
ref
(
db
,
'
trm
'
),
{
chainId
,
origin
:
window
.
location
.
origin
,
timestamp
:
Date
.
now
(),
tx
:
transactionResponse
,
type
,
walletAddress
,
})
}
catch
(
e
)
{
console
.
debug
(
'
Error adding document:
'
,
e
)
}
},
[
chainId
]
)
}
export
function
useTransactionMonitoringEventCallback
()
{
const
{
account
}
=
useActiveWeb3React
()
const
log
=
useMonitoringEventCallback
()
return
useCallback
(
(
info
:
TransactionInfo
,
transactionResponse
:
TransactionResponse
)
=>
{
if
(
SUPPORTED_TRANSACTION_TYPES
.
includes
(
info
.
type
))
{
log
(
TransactionType
[
info
.
type
],
{
transactionResponse
:
(({
hash
,
v
,
r
,
s
}:
PartialTransactionResponse
)
=>
({
hash
,
v
,
r
,
s
}))(
transactionResponse
),
walletAddress
:
account
??
undefined
,
})
}
},
[
account
,
log
]
)
}
export
function
useWalletConnectMonitoringEventCallback
()
{
const
log
=
useMonitoringEventCallback
()
return
useCallback
(
(
walletAddress
)
=>
{
log
(
'
WALLET_CONNECTED
'
,
{
transactionResponse
:
{
hash
:
''
,
r
:
''
,
s
:
''
,
v
:
-
1
},
walletAddress
})
},
[
log
]
)
}
function
initializeFirebase
()
{
initializeApp
({
apiKey
:
process
.
env
.
REACT_APP_FIREBASE_KEY
,
authDomain
:
'
interface-monitoring.firebaseapp.com
'
,
databaseURL
:
'
https://interface-monitoring-default-rtdb.firebaseio.com
'
,
projectId
:
'
interface-monitoring
'
,
storageBucket
:
'
interface-monitoring.appspot.com
'
,
messagingSenderId
:
'
968187720053
'
,
appId
:
'
1:968187720053:web:acedf72dce629d470be33c
'
,
})
}
src/locales/ja-JP.po
View file @
bf7a40be
...
...
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2021-11-
18 19:06
\n"
"PO-Revision-Date: 2021-11-
30 02:11
\n"
"Last-Translator: \n"
"Language: ja_JP\n"
"Language-Team: Japanese\n"
...
...
@@ -309,7 +309,7 @@ msgstr "安定的なペアに最適"
#: src/components/FeeSelector/shared.tsx
msgid "Best for very stable pairs."
msgstr "非常に安定したペアに最適
です。
"
msgstr "非常に安定したペアに最適"
#: src/components/Blocklist/index.tsx
msgid "Blocked address"
...
...
@@ -329,7 +329,7 @@ msgstr "このリストを追加することで、データが正しいことを
#: src/components/WalletModal/index.tsx
msgid "By connecting a wallet, you agree to Uniswap Labs’ <0>Terms of Service</0> and acknowledge that you have read and understand the Uniswap <1>Protocol Disclaimer</1>."
msgstr "
財布を接続することにより、あなたはUniswap Labsのに同意 <0>サービス規約</0> 、あなたが読んでUniswap理解していることを認める <1>プロトコル免責事項</1>
。"
msgstr "
ウォレットを接続することにより、あなたはUniswap Labsのに <0>サービス規約</0>に同意し、あなたがUniswap<1>プロトコル免責事項</1>を読み、理解していることに同意するものとします
。"
#: src/pages/Vote/styled.tsx
msgid "Canceled"
...
...
@@ -1541,7 +1541,7 @@ msgstr "スワップ"
#: src/components/AccountDetails/TransactionSummary.tsx
msgid "Swap <0/> for exactly <1/>"
msgstr "<0/> を <1/>に
正確にスワップする
"
msgstr "<0/> を <1/>に
スワップ
"
#: src/pages/Swap/index.tsx
#: src/pages/Swap/index.tsx
...
...
@@ -1550,7 +1550,7 @@ msgstr "問題発生の可能性があるが、スワップする"
#: src/components/AccountDetails/TransactionSummary.tsx
msgid "Swap exactly <0/> for <1/>"
msgstr "
正確に<0/>を<1/>に交換します
"
msgstr "
<0/>を<1/>にスワップ
"
#: src/hooks/useSwapCallback.tsx
#: src/hooks/useSwapCallback.tsx
...
...
src/locales/ru-RU.po
View file @
bf7a40be
...
...
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2021-11-
18 19
:06\n"
"PO-Revision-Date: 2021-11-
25 20
:06\n"
"Last-Translator: \n"
"Language: ru_RU\n"
"Language-Team: Russian\n"
...
...
@@ -305,11 +305,11 @@ msgstr "Подходит для большинства пар."
#: src/components/FeeSelector/shared.tsx
msgid "Best for stable pairs."
msgstr "Подходит для
пар стейблкоинов
."
msgstr "Подходит для
стабильных пар
."
#: src/components/FeeSelector/shared.tsx
msgid "Best for very stable pairs."
msgstr "Подходит для
пар очень стабильных стейблкоинов
."
msgstr "Подходит для
очень стабильных пар
."
#: src/components/Blocklist/index.tsx
msgid "Blocked address"
...
...
src/locales/zh-CN.po
View file @
bf7a40be
...
...
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: uniswap-interface\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2021-11-
18 19:06
\n"
"PO-Revision-Date: 2021-11-
30 02:11
\n"
"Last-Translator: \n"
"Language: zh_CN\n"
"Language-Team: Chinese Simplified\n"
...
...
src/pages/AddLiquidity/index.tsx
View file @
bf7a40be
...
...
@@ -51,7 +51,7 @@ import { Bound, Field } from '../../state/mint/v3/actions'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
import
{
useIsExpertMode
,
useUserSlippageToleranceWithDefault
}
from
'
../../state/user/hooks
'
import
{
ExternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
../../theme
'
import
approveAmountCalldata
from
'
../../utils/approveAmountCalldata
'
import
{
calculateGasMargin
}
from
'
../../utils/calculateGasMargin
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
...
...
@@ -406,9 +406,9 @@ export default function AddLiquidity({
const Buttons = () =>
addIsUnsupported ? (
<ButtonPrimary disabled={true} $borderRadius="12px" padding={'12px'}>
<T
YPE.m
ain mb="4px">
<T
hemedText.M
ain mb="4px">
<Trans>Unsupported Asset</Trans>
</T
YPE.m
ain>
</T
hemedText.M
ain>
</ButtonPrimary>
) : !account ? (
<ButtonLight onClick={toggleWalletModal} $borderRadius="12px" padding={'12px'}>
...
...
@@ -517,9 +517,9 @@ export default function AddLiquidity({
<Row justifyContent="flex-end" style={{ width: 'fit-content', minWidth: 'fit-content' }}>
<MediumOnly>
<ButtonText onClick={clearAll} margin="0 15px 0 0">
<T
YPE.b
lue fontSize="12px">
<T
hemedText.B
lue fontSize="12px">
<Trans>Clear All</Trans>
</T
YPE.b
lue>
</T
hemedText.B
lue>
</ButtonText>
</MediumOnly>
{baseCurrency && quoteCurrency ? (
...
...
@@ -548,9 +548,9 @@ export default function AddLiquidity({
<>
<AutoColumn gap="md">
<RowBetween paddingBottom="20px">
<T
YPE.l
abel>
<T
hemedText.L
abel>
<Trans>Select Pair</Trans>
</T
YPE.l
abel>
</T
hemedText.L
abel>
</RowBetween>
<RowBetween>
<CurrencyDropdown
...
...
@@ -608,9 +608,9 @@ export default function AddLiquidity({
disabled={tickLower === undefined || tickUpper === undefined || invalidPool || invalidRange}
>
<AutoColumn gap="md">
<T
YPE.l
abel>
<T
hemedText.L
abel>
{hasExistingPosition ? <Trans>Add more liquidity</Trans> : <Trans>Deposit Amounts</Trans>}
</T
YPE.l
abel>
</T
hemedText.L
abel>
<CurrencyInputPanel
value={formattedAmounts[Field.CURRENCY_A]}
...
...
@@ -653,26 +653,26 @@ export default function AddLiquidity({
{!noLiquidity ? (
<>
<RowBetween>
<T
YPE.l
abel>
<T
hemedText.L
abel>
<Trans>Set Price Range</Trans>
</T
YPE.l
abel>
</T
hemedText.L
abel>
</RowBetween>
{price && baseCurrency && quoteCurrency && !noLiquidity && (
<AutoRow gap="4px" justify="center" style={{ marginTop:
'
0.5
rem
'
}}>
<Trans>
<T
YPE.m
ain fontWeight={500} textAlign="center" fontSize={12} color="text1">
<T
hemedText.M
ain fontWeight={500} textAlign="center" fontSize={12} color="text1">
Current Price:
</T
YPE.m
ain>
<T
YPE.b
ody fontWeight={500} textAlign="center" fontSize={12} color="text1">
</T
hemedText.M
ain>
<T
hemedText.B
ody fontWeight={500} textAlign="center" fontSize={12} color="text1">
<HoverInlineText
maxCharacters={20}
text={invertPrice ? price.invert().toSignificant(6) : price.toSignificant(6)}
/>
</T
YPE.b
ody>
<T
YPE.b
ody color="text2" fontSize={12}>
</T
hemedText.B
ody>
<T
hemedText.B
ody color="text2" fontSize={12}>
{quoteCurrency?.symbol} per {baseCurrency.symbol}
</T
YPE.b
ody>
</T
hemedText.B
ody>
</Trans>
</AutoRow>
)}
...
...
@@ -695,9 +695,9 @@ export default function AddLiquidity({
) : (
<AutoColumn gap="md">
<RowBetween>
<T
YPE.l
abel>
<T
hemedText.L
abel>
<Trans>Set Starting Price</Trans>
</T
YPE.l
abel>
</T
hemedText.L
abel>
</RowBetween>
{noLiquidity && (
<BlueCard
...
...
@@ -708,7 +708,7 @@ export default function AddLiquidity({
padding:
'
1
rem
1
rem
'
,
}}
>
<T
YPE.b
ody
<T
hemedText.B
ody
fontSize={14}
style={{ fontWeight: 500 }}
textAlign="left"
...
...
@@ -719,7 +719,7 @@ export default function AddLiquidity({
starting price for the pool. Then, enter your liquidity price range and deposit
amount. Gas fees will be higher than usual due to the initialization transaction.
</Trans>
</T
YPE.b
ody>
</T
hemedText.B
ody>
</BlueCard>
)}
<OutlineCard padding="12px">
...
...
@@ -730,12 +730,12 @@ export default function AddLiquidity({
/>
</OutlineCard>
<RowBetween style={{ backgroundColor: theme.bg1, padding:
'
12
px
'
, borderRadius:
'
12
px
'
}}>
<T
YPE.m
ain>
<T
hemedText.M
ain>
<Trans>Current {baseCurrency?.symbol} Price:</Trans>
</T
YPE.m
ain>
<T
YPE.m
ain>
</T
hemedText.M
ain>
<T
hemedText.M
ain>
{price ? (
<T
YPE.m
ain>
<T
hemedText.M
ain>
<RowFixed>
<HoverInlineText
maxCharacters={20}
...
...
@@ -743,11 +743,11 @@ export default function AddLiquidity({
/>{
'
'
}
<span style={{ marginLeft:
'
4
px
'
}}>{quoteCurrency?.symbol}</span>
</RowFixed>
</T
YPE.m
ain>
</T
hemedText.M
ain>
) : (
'
-
'
)}
</T
YPE.m
ain>
</T
hemedText.M
ain>
</RowBetween>
</AutoColumn>
)}
...
...
@@ -762,9 +762,9 @@ export default function AddLiquidity({
<AutoColumn gap="md">
{noLiquidity && (
<RowBetween>
<T
YPE.l
abel>
<T
hemedText.L
abel>
<Trans>Set Price Range</Trans>
</T
YPE.l
abel>
</T
hemedText.L
abel>
</RowBetween>
)}
<RangeSelector
...
...
@@ -805,12 +805,12 @@ export default function AddLiquidity({
<AutoColumn gap="8px" style={{ height:
'
100
%
'
}}>
<RowFixed>
<AlertTriangle stroke={theme.yellow3} size="16px" />
<T
YPE.y
ellow ml="12px" fontSize="15px">
<T
hemedText.Y
ellow ml="12px" fontSize="15px">
<Trans>Efficiency Comparison</Trans>
</T
YPE.y
ellow>
</T
hemedText.Y
ellow>
</RowFixed>
<RowFixed>
<T
YPE.y
ellow ml="12px" fontSize="13px" margin={0} fontWeight={400}>
<T
hemedText.Y
ellow ml="12px" fontSize="13px" margin={0} fontWeight={400}>
<Trans>
Full range positions may earn less fees than concentrated positions. Learn more{
'
'
}
<ExternalLink
...
...
@@ -823,7 +823,7 @@ export default function AddLiquidity({
<
/ExternalLink
>
.
<
/Trans
>
<
/T
YPE.y
ellow
>
<
/T
hemedText.Y
ellow
>
<
/RowFixed
>
<
Row
>
<
ButtonYellow
...
...
@@ -836,9 +836,9 @@ export default function AddLiquidity({
getSetFullRange
()
}
}
>
<
T
YPE
.
b
lack
fontSize=
{
13
}
color=
"black"
>
<
T
hemedText
.
B
lack
fontSize=
{
13
}
color=
"black"
>
<
Trans
>
I understand
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
ButtonYellow
>
<
/
Row
>
</
AutoColumn
>
...
...
@@ -851,12 +851,12 @@ export default function AddLiquidity({
<
YellowCard
padding=
"8px 12px"
$borderRadius=
"12px"
>
<
RowBetween
>
<
AlertTriangle
stroke=
{
theme
.
yellow3
}
size=
"16px"
/>
<
T
YPE
.
y
ellow
ml=
"12px"
fontSize=
"12px"
>
<
T
hemedText
.
Y
ellow
ml=
"12px"
fontSize=
"12px"
>
<
Trans
>
Your position will not earn fees or be used in trades until the market price moves into
your range.
</
Trans
>
</
T
YPE
.
y
ellow
>
</
T
hemedText
.
Y
ellow
>
</
RowBetween
>
</
YellowCard
>
)
:
null
}
...
...
@@ -865,9 +865,9 @@ export default function AddLiquidity({
<
YellowCard
padding=
"8px 12px"
$borderRadius=
"12px"
>
<
RowBetween
>
<
AlertTriangle
stroke=
{
theme
.
yellow3
}
size=
"16px"
/>
<
T
YPE
.
y
ellow
ml=
"12px"
fontSize=
"12px"
>
<
T
hemedText
.
Y
ellow
ml=
"12px"
fontSize=
"12px"
>
<
Trans
>
Invalid range selected. The min price must be lower than the max price.
</
Trans
>
</
T
YPE
.
y
ellow
>
</
T
hemedText
.
Y
ellow
>
</
RowBetween
>
</
YellowCard
>
)
:
null
}
...
...
src/pages/AddLiquidityV2/ConfirmAddModalBottom.tsx
View file @
bf7a40be
...
...
@@ -6,7 +6,7 @@ import { ButtonPrimary } from '../../components/Button'
import
CurrencyLogo
from
'
../../components/CurrencyLogo
'
import
{
RowBetween
,
RowFixed
}
from
'
../../components/Row
'
import
{
Field
}
from
'
../../state/mint/actions
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
export
function
ConfirmAddModalBottom
({
noLiquidity
,
...
...
@@ -26,47 +26,47 @@ export function ConfirmAddModalBottom({
return
(
<>
<
RowBetween
>
<
T
YPE
.
b
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
{
currencies
[
Field
.
CURRENCY_A
]?.
symbol
}
Deposited
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
RowFixed
>
<
CurrencyLogo
currency=
{
currencies
[
Field
.
CURRENCY_A
]
}
style=
{
{
marginRight
:
'
8px
'
}
}
/>
<
T
YPE
.
body
>
{
parsedAmounts
[
Field
.
CURRENCY_A
]?.
toSignificant
(
6
)
}
</
TYPE
.
b
ody
>
<
T
hemedText
.
Body
>
{
parsedAmounts
[
Field
.
CURRENCY_A
]?.
toSignificant
(
6
)
}
</
ThemedText
.
B
ody
>
</
RowFixed
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
b
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
{
currencies
[
Field
.
CURRENCY_B
]?.
symbol
}
Deposited
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
RowFixed
>
<
CurrencyLogo
currency=
{
currencies
[
Field
.
CURRENCY_B
]
}
style=
{
{
marginRight
:
'
8px
'
}
}
/>
<
T
YPE
.
body
>
{
parsedAmounts
[
Field
.
CURRENCY_B
]?.
toSignificant
(
6
)
}
</
TYPE
.
b
ody
>
<
T
hemedText
.
Body
>
{
parsedAmounts
[
Field
.
CURRENCY_B
]?.
toSignificant
(
6
)
}
</
ThemedText
.
B
ody
>
</
RowFixed
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
b
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
Rates
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
>
{
`1 ${currencies[Field.CURRENCY_A]?.symbol} = ${price?.toSignificant(4)} ${
currencies[Field.CURRENCY_B]?.symbol
}`
}
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
RowBetween
>
<
RowBetween
style=
{
{
justifyContent
:
'
flex-end
'
}
}
>
<
T
YPE
.
b
ody
>
<
T
hemedText
.
B
ody
>
{
`1 ${currencies[Field.CURRENCY_B]?.symbol} = ${price?.invert().toSignificant(4)} ${
currencies[Field.CURRENCY_A]?.symbol
}`
}
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
b
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
Share of Pool:
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
>
<
Trans
>
{
noLiquidity
?
'
100
'
:
poolTokenPercentage
?.
toSignificant
(
4
)
}
%
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
RowBetween
>
<
ButtonPrimary
style=
{
{
margin
:
'
20px 0 0 0
'
}
}
onClick=
{
onAdd
}
>
<
Text
fontWeight=
{
500
}
fontSize=
{
20
}
>
...
...
src/pages/AddLiquidityV2/PoolPriceBar.tsx
View file @
bf7a40be
...
...
@@ -8,7 +8,7 @@ import { AutoColumn } from '../../components/Column'
import
{
AutoRow
}
from
'
../../components/Row
'
import
{
ONE_BIPS
}
from
'
../../constants/misc
'
import
{
Field
}
from
'
../../state/mint/actions
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
export
function
PoolPriceBar
({
currencies
,
...
...
@@ -26,7 +26,7 @@ export function PoolPriceBar({
<
AutoColumn
gap=
"md"
>
<
AutoRow
justify=
"space-around"
gap=
"4px"
>
<
AutoColumn
justify=
"center"
>
<
T
YPE
.
black
>
{
price
?.
toSignificant
(
6
)
??
'
-
'
}
</
TYPE
.
b
lack
>
<
T
hemedText
.
Black
>
{
price
?.
toSignificant
(
6
)
??
'
-
'
}
</
ThemedText
.
B
lack
>
<
Text
fontWeight=
{
500
}
fontSize=
{
14
}
color=
{
theme
.
text2
}
pt=
{
1
}
>
<
Trans
>
{
currencies
[
Field
.
CURRENCY_B
]?.
symbol
}
per
{
currencies
[
Field
.
CURRENCY_A
]?.
symbol
}
...
...
@@ -34,7 +34,7 @@ export function PoolPriceBar({
</
Text
>
</
AutoColumn
>
<
AutoColumn
justify=
"center"
>
<
T
YPE
.
black
>
{
price
?.
invert
()?.
toSignificant
(
6
)
??
'
-
'
}
</
TYPE
.
b
lack
>
<
T
hemedText
.
Black
>
{
price
?.
invert
()?.
toSignificant
(
6
)
??
'
-
'
}
</
ThemedText
.
B
lack
>
<
Text
fontWeight=
{
500
}
fontSize=
{
14
}
color=
{
theme
.
text2
}
pt=
{
1
}
>
<
Trans
>
{
currencies
[
Field
.
CURRENCY_A
]?.
symbol
}
per
{
currencies
[
Field
.
CURRENCY_B
]?.
symbol
}
...
...
@@ -42,12 +42,12 @@ export function PoolPriceBar({
</
Text
>
</
AutoColumn
>
<
AutoColumn
justify=
"center"
>
<
T
YPE
.
b
lack
>
<
T
hemedText
.
B
lack
>
{
noLiquidity
&&
price
?
'
100
'
:
(
poolTokenPercentage
?.
lessThan
(
ONE_BIPS
)
?
'
<0.01
'
:
poolTokenPercentage
?.
toFixed
(
2
))
??
'
0
'
}
%
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
<
Text
fontWeight=
{
500
}
fontSize=
{
14
}
color=
{
theme
.
text2
}
pt=
{
1
}
>
<
Trans
>
Share of Pool
</
Trans
>
</
Text
>
...
...
src/pages/AddLiquidityV2/index.tsx
View file @
bf7a40be
...
...
@@ -35,7 +35,7 @@ import { useDerivedMintInfo, useMintActionHandlers, useMintState } from '../../s
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
import
{
useIsExpertMode
,
useUserSlippageToleranceWithDefault
}
from
'
../../state/user/hooks
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
calculateGasMargin
}
from
'
../../utils/calculateGasMargin
'
import
{
calculateSlippageAmount
}
from
'
../../utils/calculateSlippageAmount
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
...
...
@@ -247,12 +247,12 @@ export default function AddLiquidity({
{
currencies
[
Field
.
CURRENCY_A
]?.
symbol
+
'
/
'
+
currencies
[
Field
.
CURRENCY_B
]?.
symbol
+
'
Pool Tokens
'
}
</
Text
>
</
Row
>
<
T
YPE
.
i
talic
fontSize=
{
12
}
textAlign=
"left"
padding=
{
'
8px 0 0 0
'
}
>
<
T
hemedText
.
I
talic
fontSize=
{
12
}
textAlign=
"left"
padding=
{
'
8px 0 0 0
'
}
>
<
Trans
>
Output is estimated. If the price changes by more than
{
allowedSlippage
.
toSignificant
(
4
)
}
% your transaction
will revert.
</
Trans
>
</
T
YPE
.
i
talic
>
</
T
hemedText
.
I
talic
>
</
AutoColumn
>
)
}
...
...
@@ -344,15 +344,15 @@ export default function AddLiquidity({
<
ColumnCenter
>
<
BlueCard
>
<
AutoColumn
gap=
"10px"
>
<
T
YPE
.
l
ink
fontWeight=
{
600
}
color=
{
'
primaryText1
'
}
>
<
T
hemedText
.
L
ink
fontWeight=
{
600
}
color=
{
'
primaryText1
'
}
>
<
Trans
>
You are the first liquidity provider.
</
Trans
>
</
T
YPE
.
l
ink
>
<
T
YPE
.
l
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
</
T
hemedText
.
L
ink
>
<
T
hemedText
.
L
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
Trans
>
The ratio of tokens you add will set the price of this pool.
</
Trans
>
</
T
YPE
.
l
ink
>
<
T
YPE
.
l
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
</
T
hemedText
.
L
ink
>
<
T
hemedText
.
L
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
Trans
>
Once you are happy with the rate click supply to review.
</
Trans
>
</
T
YPE
.
l
ink
>
</
T
hemedText
.
L
ink
>
</
AutoColumn
>
</
BlueCard
>
</
ColumnCenter
>
...
...
@@ -360,7 +360,7 @@ export default function AddLiquidity({
<
ColumnCenter
>
<
BlueCard
>
<
AutoColumn
gap=
"10px"
>
<
T
YPE
.
l
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
T
hemedText
.
L
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
Trans
>
<
b
>
<
Trans
>
Tip:
</
Trans
>
...
...
@@ -369,7 +369,7 @@ export default function AddLiquidity({
automatically earn fees proportional to your share of the pool, and can be redeemed at any
time.
</
Trans
>
</
T
YPE
.
l
ink
>
</
T
hemedText
.
L
ink
>
</
AutoColumn
>
</
BlueCard
>
</
ColumnCenter
>
...
...
@@ -405,13 +405,13 @@ export default function AddLiquidity({
<>
<
LightCard
padding=
"0px"
$borderRadius=
{
'
20px
'
}
>
<
RowBetween
padding=
"1rem"
>
<
T
YPE
.
s
ubHeader
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
T
hemedText
.
S
ubHeader
fontWeight=
{
500
}
fontSize=
{
14
}
>
{
noLiquidity
?
(
<
Trans
>
Initial prices and pool share
</
Trans
>
)
:
(
<
Trans
>
Prices and pool share
</
Trans
>
)
}
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
RowBetween
>
{
'
'
}
<
LightCard
padding=
"1rem"
$borderRadius=
{
'
20px
'
}
>
<
PoolPriceBar
...
...
@@ -427,9 +427,9 @@ export default function AddLiquidity({
{
addIsUnsupported
?
(
<
ButtonPrimary
disabled=
{
true
}
>
<
T
YPE
.
m
ain
mb=
"4px"
>
<
T
hemedText
.
M
ain
mb=
"4px"
>
<
Trans
>
Unsupported Asset
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
ButtonPrimary
>
)
:
!
account
?
(
<
ButtonLight
onClick=
{
toggleWalletModal
}
>
...
...
src/pages/CreateProposal/ProposalSubmissionModal.tsx
View file @
bf7a40be
...
...
@@ -7,7 +7,7 @@ import React, { useContext } from 'react'
import
{
Link
}
from
'
react-router-dom
'
import
{
Text
}
from
'
rebass
'
import
{
ThemeContext
}
from
'
styled-components/macro
'
import
{
ExternalLink
,
T
YPE
}
from
'
theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
theme
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
utils/getExplorerLink
'
export
const
ProposalSubmissionModal
=
({
...
...
@@ -26,9 +26,9 @@ export const ProposalSubmissionModal = ({
{
!
hash
?
(
<
LoadingView
onDismiss=
{
onDismiss
}
>
<
AutoColumn
gap=
"12px"
justify=
{
'
center
'
}
>
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
Submitting Proposal
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
</
AutoColumn
>
</
LoadingView
>
)
:
(
...
...
src/pages/CreateProposal/index.tsx
View file @
bf7a40be
...
...
@@ -20,7 +20,7 @@ import {
}
from
'
state/governance/hooks
'
import
{
tryParseAmount
}
from
'
state/swap/hooks
'
import
styled
from
'
styled-components/macro
'
import
{
ExternalLink
,
T
YPE
}
from
'
theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
theme
'
import
{
CreateProposalTabs
}
from
'
../../components/NavigationTabs
'
import
{
UNI
}
from
'
../../constants/tokens
'
...
...
@@ -230,7 +230,7 @@ ${bodyValue}
<
CreateProposalWrapper
>
<
BlueCard
>
<
AutoColumn
gap=
"10px"
>
<
T
YPE
.
l
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
T
hemedText
.
L
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
Trans
>
<
strong
>
Tip:
</
strong
>
Select an action and describe your proposal for the community. The proposal cannot
be modified after submission, so please verify all information before submitting. The voting period will
...
...
@@ -240,7 +240,7 @@ ${bodyValue}
</
ExternalLink
>
.
</
Trans
>
</
T
YPE
.
l
ink
>
</
T
hemedText
.
L
ink
>
</
AutoColumn
>
</
BlueCard
>
...
...
src/pages/Earn/Countdown.tsx
View file @
bf7a40be
import
{
useEffect
,
useMemo
,
useState
}
from
'
react
'
import
{
REWARDS_DURATION_DAYS
,
STAKING_GENESIS
}
from
'
../../state/stake/hooks
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
const
MINUTE
=
60
const
HOUR
=
MINUTE
*
60
...
...
@@ -56,7 +56,7 @@ export function Countdown({ exactEnd }: { exactEnd?: Date }) {
const
seconds
=
timeRemaining
return
(
<
T
YPE
.
b
lack
fontWeight=
{
400
}
>
<
T
hemedText
.
B
lack
fontWeight=
{
400
}
>
{
message
}{
'
'
}
{
Number
.
isFinite
(
timeRemaining
)
&&
(
<
code
>
...
...
@@ -65,6 +65,6 @@ export function Countdown({ exactEnd }: { exactEnd?: Date }) {
.padStart(2, '0')}`
}
</
code
>
)
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
)
}
src/pages/Earn/Manage.tsx
View file @
bf7a40be
...
...
@@ -26,7 +26,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
const
PageWrapper
=
styled
(
AutoColumn
)
`
...
...
@@ -155,33 +155,33 @@ export default function Manage({
return
(
<
PageWrapper
gap=
"lg"
justify=
"center"
>
<
RowBetween
style=
{
{
gap
:
'
24px
'
}
}
>
<
T
YPE
.
m
ediumHeader
style=
{
{
margin
:
0
}
}
>
<
T
hemedText
.
M
ediumHeader
style=
{
{
margin
:
0
}
}
>
<
Trans
>
{
currencyA
?.
symbol
}
-
{
currencyB
?.
symbol
}
Liquidity Mining
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
DoubleCurrencyLogo
currency0=
{
currencyA
??
undefined
}
currency1=
{
currencyB
??
undefined
}
size=
{
24
}
/>
</
RowBetween
>
<
DataRow
style=
{
{
gap
:
'
24px
'
}
}
>
<
PoolData
>
<
AutoColumn
gap=
"sm"
>
<
T
YPE
.
b
ody
style=
{
{
margin
:
0
}
}
>
<
T
hemedText
.
B
ody
style=
{
{
margin
:
0
}
}
>
<
Trans
>
Total deposits
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
fontSize=
{
24
}
fontWeight=
{
500
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
fontSize=
{
24
}
fontWeight=
{
500
}
>
{
valueOfTotalStakedAmountInUSDC
?
`$${valueOfTotalStakedAmountInUSDC.toFixed(0, { groupSeparator: ',' })}`
:
`${valueOfTotalStakedAmountInWETH?.toSignificant(4, { groupSeparator: ',' }) ?? '-'} ETH`
}
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
</
PoolData
>
<
PoolData
>
<
AutoColumn
gap=
"sm"
>
<
T
YPE
.
b
ody
style=
{
{
margin
:
0
}
}
>
<
T
hemedText
.
B
ody
style=
{
{
margin
:
0
}
}
>
<
Trans
>
Pool Rate
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
ody
fontSize=
{
24
}
fontWeight=
{
500
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
ody
fontSize=
{
24
}
fontWeight=
{
500
}
>
{
stakingInfo
?.
active
?
(
<
Trans
>
{
stakingInfo
.
totalRewardRate
?.
multiply
(
BIG_INT_SECONDS_IN_WEEK
)?.
toFixed
(
0
,
{
groupSeparator
:
'
,
'
})
}{
'
'
}
...
...
@@ -190,7 +190,7 @@ export default function Manage({
)
:
(
<
Trans
>
0 UNI / week
</
Trans
>
)
}
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
AutoColumn
>
</
PoolData
>
</
DataRow
>
...
...
@@ -202,17 +202,17 @@ export default function Manage({
<
CardSection
>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontWeight=
{
600
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
600
}
>
<
Trans
>
Step 1. Get UNI-V2 Liquidity tokens
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
<
RowBetween
style=
{
{
marginBottom
:
'
1rem
'
}
}
>
<
T
YPE
.
w
hite
fontSize=
{
14
}
>
<
T
hemedText
.
W
hite
fontSize=
{
14
}
>
<
Trans
>
UNI-V2 LP tokens are required. Once you
'
ve added liquidity to the
{
currencyA
?.
symbol
}
-
{
currencyB
?.
symbol
}
pool you can stake your liquidity tokens on this page.
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
<
ButtonPrimary
padding=
"8px"
...
...
@@ -261,19 +261,19 @@ export default function Manage({
<
CardNoise
/>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontWeight=
{
600
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
600
}
>
<
Trans
>
Your liquidity deposits
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
<
RowBetween
style=
{
{
alignItems
:
'
baseline
'
}
}
>
<
T
YPE
.
w
hite
fontSize=
{
36
}
fontWeight=
{
600
}
>
<
T
hemedText
.
W
hite
fontSize=
{
36
}
fontWeight=
{
600
}
>
{
stakingInfo
?.
stakedAmount
?.
toSignificant
(
6
)
??
'
-
'
}
</
T
YPE
.
w
hite
>
<
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
<
T
hemedText
.
W
hite
>
<
Trans
>
UNI-V2
{
currencyA
?.
symbol
}
-
{
currencyB
?.
symbol
}
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
</
AutoColumn
>
</
CardSection
>
...
...
@@ -284,9 +284,9 @@ export default function Manage({
<
AutoColumn
gap=
"sm"
>
<
RowBetween
>
<
div
>
<
T
YPE
.
b
lack
>
<
T
hemedText
.
B
lack
>
<
Trans
>
Your unclaimed UNI
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
div
>
{
stakingInfo
?.
earnedAmount
&&
JSBI
.
notEqual
(
BIG_INT_ZERO
,
stakingInfo
?.
earnedAmount
?.
quotient
)
&&
(
<
ButtonEmpty
...
...
@@ -300,7 +300,7 @@ export default function Manage({
)
}
</
RowBetween
>
<
RowBetween
style=
{
{
alignItems
:
'
baseline
'
}
}
>
<
T
YPE
.
l
argeHeader
fontSize=
{
36
}
fontWeight=
{
600
}
>
<
T
hemedText
.
L
argeHeader
fontSize=
{
36
}
fontWeight=
{
600
}
>
<
CountUp
key=
{
countUpAmount
}
isCounting
...
...
@@ -310,8 +310,8 @@ export default function Manage({
thousandsSeparator=
{
'
,
'
}
duration=
{
1
}
/>
</
T
YPE
.
l
argeHeader
>
<
T
YPE
.
b
lack
fontSize=
{
16
}
fontWeight=
{
500
}
>
</
T
hemedText
.
L
argeHeader
>
<
T
hemedText
.
B
lack
fontSize=
{
16
}
fontWeight=
{
500
}
>
<
span
role=
"img"
aria
-
label=
"wizard-icon"
style=
{
{
marginRight
:
'
8px
'
}
}
>
⚡
</
span
>
...
...
@@ -324,17 +324,17 @@ export default function Manage({
)
:
(
<
Trans
>
0 UNI / week
</
Trans
>
)
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
RowBetween
>
</
AutoColumn
>
</
StyledBottomCard
>
</
BottomSection
>
<
T
YPE
.
m
ain
style=
{
{
textAlign
:
'
center
'
}
}
fontSize=
{
14
}
>
<
T
hemedText
.
M
ain
style=
{
{
textAlign
:
'
center
'
}
}
fontSize=
{
14
}
>
<
span
role=
"img"
aria
-
label=
"wizard-icon"
style=
{
{
marginRight
:
'
8px
'
}
}
>
⭐️
</
span
>
<
Trans
>
When you withdraw, the contract will automagically claim UNI on your behalf!
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
{
!
showAddLiquidityButton
&&
(
<
DataRow
style=
{
{
marginBottom
:
'
1rem
'
}
}
>
...
...
@@ -363,9 +363,9 @@ export default function Manage({
</
DataRow
>
)
}
{
!
userLiquidityUnstaked
?
null
:
userLiquidityUnstaked
.
equalTo
(
'
0
'
)
?
null
:
!
stakingInfo
?.
active
?
null
:
(
<
T
YPE
.
m
ain
>
<
T
hemedText
.
M
ain
>
<
Trans
>
{
userLiquidityUnstaked
.
toSignificant
(
6
)
}
UNI-V2 LP tokens available
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
)
}
</
PositionInfo
>
</
PageWrapper
>
...
...
src/pages/Earn/index.tsx
View file @
bf7a40be
...
...
@@ -11,7 +11,7 @@ import { RowBetween } from '../../components/Row'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
STAKING_REWARDS_INFO
,
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
ExternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
Countdown
}
from
'
./Countdown
'
const
PageWrapper
=
styled
(
AutoColumn
)
`
...
...
@@ -63,25 +63,25 @@ export default function Earn() {
<
CardSection
>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontWeight=
{
600
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
600
}
>
<
Trans
>
Uniswap liquidity mining
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontSize=
{
14
}
>
<
T
hemedText
.
W
hite
fontSize=
{
14
}
>
<
Trans
>
Deposit your Liquidity Provider tokens to receive UNI, the Uniswap protocol governance token.
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
{
'
'
}
<
ExternalLink
style=
{
{
color
:
'
white
'
,
textDecoration
:
'
underline
'
}
}
href=
"https://uniswap.org/blog/uni/"
target=
"_blank"
>
<
T
YPE
.
w
hite
fontSize=
{
14
}
>
<
T
hemedText
.
W
hite
fontSize=
{
14
}
>
<
Trans
>
Read more about UNI
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
ExternalLink
>
</
AutoColumn
>
</
CardSection
>
...
...
@@ -92,9 +92,9 @@ export default function Earn() {
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
,
maxWidth
:
'
720px
'
}
}
>
<
DataRow
style=
{
{
alignItems
:
'
baseline
'
}
}
>
<
T
YPE
.
m
ediumHeader
style=
{
{
marginTop
:
'
0.5rem
'
}
}
>
<
T
hemedText
.
M
ediumHeader
style=
{
{
marginTop
:
'
0.5rem
'
}
}
>
<
Trans
>
Participating pools
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
Countdown
exactEnd=
{
stakingInfos
?.[
0
]?.
periodFinish
}
/>
</
DataRow
>
...
...
src/pages/MigrateV2/MigrateV2Pair.tsx
View file @
bf7a40be
...
...
@@ -46,7 +46,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import
{
NEVER_RELOAD
,
useSingleCallResult
}
from
'
../../state/multicall/hooks
'
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
BackArrow
,
ExternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
BackArrow
,
ExternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
isAddress
}
from
'
../../utils
'
import
{
calculateGasMargin
}
from
'
../../utils/calculateGasMargin
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
...
...
@@ -60,7 +60,7 @@ const DEFAULT_MIGRATE_SLIPPAGE_TOLERANCE = new Percent(75, 10_000)
function
EmptyState
({
message
}:
{
message
:
ReactNode
})
{
return
(
<
AutoColumn
style=
{
{
minHeight
:
200
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
}
}
>
<
T
YPE
.
body
>
{
message
}
</
TYPE
.
b
ody
>
<
T
hemedText
.
Body
>
{
message
}
</
ThemedText
.
B
ody
>
</
AutoColumn
>
)
}
...
...
@@ -382,31 +382,31 @@ function V2PairMigration({
return
(
<
AutoColumn
gap=
"20px"
>
<
T
YPE
.
b
ody
my=
{
9
}
style=
{
{
fontWeight
:
400
}
}
>
<
T
hemedText
.
B
ody
my=
{
9
}
style=
{
{
fontWeight
:
400
}
}
>
<
Trans
>
This tool will safely migrate your
{
isNotUniswap
?
'
SushiSwap
'
:
'
V2
'
}
liquidity to V3. The process is
completely trustless thanks to the
{
'
'
}
</
Trans
>
{
chainId
&&
migrator
&&
(
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
migrator
.
address
,
ExplorerDataType
.
ADDRESS
)
}
>
<
T
YPE
.
b
lue
display=
"inline"
>
<
T
hemedText
.
B
lue
display=
"inline"
>
<
Trans
>
Uniswap migration contract↗
</
Trans
>
</
T
YPE
.
b
lue
>
</
T
hemedText
.
B
lue
>
</
ExternalLink
>
)
}
.
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
LightCard
>
<
AutoColumn
gap=
"lg"
>
<
RowBetween
>
<
RowFixed
style=
{
{
marginLeft
:
'
8px
'
}
}
>
<
DoubleCurrencyLogo
currency0=
{
currency0
}
currency1=
{
currency1
}
margin=
{
false
}
size=
{
20
}
/>
<
T
YPE
.
m
ediumHeader
style=
{
{
marginLeft
:
'
8px
'
}
}
>
<
T
hemedText
.
M
ediumHeader
style=
{
{
marginLeft
:
'
8px
'
}
}
>
<
Trans
>
{
currency0
.
symbol
}
/
{
currency1
.
symbol
}
LP Tokens
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
</
RowFixed
>
<
Badge
variant=
{
BadgeVariant
.
WARNING
}
>
{
isNotUniswap
?
'
Sushi
'
:
'
V2
'
}
</
Badge
>
</
RowBetween
>
...
...
@@ -423,11 +423,11 @@ function V2PairMigration({
<
RowBetween
>
<
RowFixed
style=
{
{
marginLeft
:
'
8px
'
}
}
>
<
DoubleCurrencyLogo
currency0=
{
currency0
}
currency1=
{
currency1
}
margin=
{
false
}
size=
{
20
}
/>
<
T
YPE
.
m
ediumHeader
style=
{
{
marginLeft
:
'
8px
'
}
}
>
<
T
hemedText
.
M
ediumHeader
style=
{
{
marginLeft
:
'
8px
'
}
}
>
<
Trans
>
{
currency0
.
symbol
}
/
{
currency1
.
symbol
}
LP NFT
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
</
RowFixed
>
<
Badge
variant=
{
BadgeVariant
.
PRIMARY
}
>
V3
</
Badge
>
</
RowBetween
>
...
...
@@ -436,28 +436,37 @@ function V2PairMigration({
{
noLiquidity
&&
(
<
BlueCard
style=
{
{
display
:
'
flex
'
,
flexDirection
:
'
column
'
,
alignItems
:
'
center
'
}
}
>
<
AlertCircle
color=
{
theme
.
text1
}
style=
{
{
marginBottom
:
'
12px
'
,
opacity
:
0.8
}
}
/>
<
TYPE
.
body
fontSize=
{
14
}
style=
{
{
marginBottom
:
8
,
fontWeight
:
500
,
opacity
:
0.8
}
}
textAlign=
"center"
>
<
ThemedText
.
Body
fontSize=
{
14
}
style=
{
{
marginBottom
:
8
,
fontWeight
:
500
,
opacity
:
0.8
}
}
textAlign=
"center"
>
<
Trans
>
You are the first liquidity provider for this Uniswap V3 pool. Your liquidity will migrate at the
current
{
isNotUniswap
?
'
SushiSwap
'
:
'
V2
'
}
price.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
TYPE
.
body
fontWeight=
{
500
}
textAlign=
"center"
fontSize=
{
14
}
style=
{
{
marginTop
:
'
8px
'
,
opacity
:
0.8
}
}
>
<
ThemedText
.
Body
fontWeight=
{
500
}
textAlign=
"center"
fontSize=
{
14
}
style=
{
{
marginTop
:
'
8px
'
,
opacity
:
0.8
}
}
>
<
Trans
>
Your transaction cost will be much higher as it includes the gas to create the pool.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
{
v2SpotPrice
&&
(
<
AutoColumn
gap=
"8px"
style=
{
{
marginTop
:
'
12px
'
}
}
>
<
RowBetween
>
<
T
YPE
.
b
ody
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
500
}
fontSize=
{
14
}
>
<
Trans
>
{
isNotUniswap
?
'
SushiSwap
'
:
'
V2
'
}
{
invertPrice
?
currency1
.
symbol
:
currency0
.
symbol
}
Price:
</
Trans
>
{
'
'
}
{
invertPrice
?
`${v2SpotPrice?.invert()?.toSignificant(6)} ${currency0.symbol}`
:
`${v2SpotPrice?.toSignificant(6)} ${currency1.symbol}`
}
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
RowBetween
>
</
AutoColumn
>
)
}
...
...
@@ -468,63 +477,63 @@ function V2PairMigration({
<
YellowCard
>
<
AutoColumn
gap=
"8px"
>
<
RowBetween
>
<
T
YPE
.
b
ody
fontSize=
{
14
}
>
<
T
hemedText
.
B
ody
fontSize=
{
14
}
>
<
Trans
>
{
isNotUniswap
?
'
SushiSwap
'
:
'
V2
'
}
{
invertPrice
?
currency1
.
symbol
:
currency0
.
symbol
}
Price:
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
lack
fontSize=
{
14
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
lack
fontSize=
{
14
}
>
{
invertPrice
?
`${v2SpotPrice?.invert()?.toSignificant(6)} ${currency0.symbol}`
:
`${v2SpotPrice?.toSignificant(6)} ${currency1.symbol}`
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
b
ody
fontSize=
{
14
}
>
<
T
hemedText
.
B
ody
fontSize=
{
14
}
>
<
Trans
>
V3
{
invertPrice
?
currency1
.
symbol
:
currency0
.
symbol
}
Price:
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
lack
fontSize=
{
14
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
lack
fontSize=
{
14
}
>
{
invertPrice
?
`${v3SpotPrice?.invert()?.toSignificant(6)} ${currency0.symbol}`
:
`${v3SpotPrice?.toSignificant(6)} ${currency1.symbol}`
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
b
ody
fontSize=
{
14
}
color=
"inherit"
>
<
T
hemedText
.
B
ody
fontSize=
{
14
}
color=
"inherit"
>
<
Trans
>
Price Difference:
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
lack
fontSize=
{
14
}
color=
"inherit"
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
lack
fontSize=
{
14
}
color=
"inherit"
>
<
Trans
>
{
priceDifferenceFraction
?.
toSignificant
(
4
)
}
%
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
RowBetween
>
</
AutoColumn
>
<
T
YPE
.
b
ody
fontSize=
{
14
}
style=
{
{
marginTop
:
8
,
fontWeight
:
400
}
}
>
<
T
hemedText
.
B
ody
fontSize=
{
14
}
style=
{
{
marginTop
:
8
,
fontWeight
:
400
}
}
>
<
Trans
>
You should only deposit liquidity into Uniswap V3 at a price you believe is correct.
<
br
/>
If the price seems incorrect, you can either make a swap to move the price or wait for someone else to
do so.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
YellowCard
>
)
:
!
noLiquidity
&&
v3SpotPrice
?
(
<
RowBetween
>
<
T
YPE
.
b
ody
fontSize=
{
14
}
>
<
T
hemedText
.
B
ody
fontSize=
{
14
}
>
<
Trans
>
V3
{
invertPrice
?
currency1
.
symbol
:
currency0
.
symbol
}
Price:
</
Trans
>
</
T
YPE
.
b
ody
>
<
T
YPE
.
b
lack
fontSize=
{
14
}
>
</
T
hemedText
.
B
ody
>
<
T
hemedText
.
B
lack
fontSize=
{
14
}
>
{
invertPrice
?
`${v3SpotPrice?.invert()?.toSignificant(6)} ${currency0.symbol}`
:
`${v3SpotPrice?.toSignificant(6)} ${currency1.symbol}`
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
RowBetween
>
)
:
null
}
<
RowBetween
>
<
T
YPE
.
l
abel
>
<
T
hemedText
.
L
abel
>
<
Trans
>
Set Price Range
</
Trans
>
</
T
YPE
.
l
abel
>
</
T
hemedText
.
L
abel
>
<
RateToggle
currencyA=
{
invertPrice
?
currency1
:
currency0
}
currencyB=
{
invertPrice
?
currency0
:
currency1
}
...
...
@@ -555,11 +564,11 @@ function V2PairMigration({
<
YellowCard
padding=
"8px 12px"
$borderRadius=
"12px"
>
<
RowBetween
>
<
AlertTriangle
stroke=
{
theme
.
yellow3
}
size=
"16px"
/>
<
T
YPE
.
y
ellow
ml=
"12px"
fontSize=
"12px"
>
<
T
hemedText
.
Y
ellow
ml=
"12px"
fontSize=
"12px"
>
<
Trans
>
Your position will not earn fees or be used in trades until the market price moves into your range.
</
Trans
>
</
T
YPE
.
y
ellow
>
</
T
hemedText
.
Y
ellow
>
</
RowBetween
>
</
YellowCard
>
)
:
null
}
...
...
@@ -568,9 +577,9 @@ function V2PairMigration({
<
YellowCard
padding=
"8px 12px"
$borderRadius=
"12px"
>
<
RowBetween
>
<
AlertTriangle
stroke=
{
theme
.
yellow3
}
size=
"16px"
/>
<
T
YPE
.
y
ellow
ml=
"12px"
fontSize=
"12px"
>
<
T
hemedText
.
Y
ellow
ml=
"12px"
fontSize=
"12px"
>
<
Trans
>
Invalid range selected. The min price must be lower than the max price.
</
Trans
>
</
T
YPE
.
y
ellow
>
</
T
hemedText
.
Y
ellow
>
</
RowBetween
>
</
YellowCard
>
)
:
null
}
...
...
@@ -580,7 +589,7 @@ function V2PairMigration({
<
AutoColumn
gap=
"md"
>
<
LiquidityInfo
token0Amount=
{
position
.
amount0
}
token1Amount=
{
position
.
amount1
}
/>
{
chainId
&&
refund0
&&
refund1
?
(
<
T
YPE
.
b
lack
fontSize=
{
12
}
>
<
T
hemedText
.
B
lack
fontSize=
{
12
}
>
<
Trans
>
At least
{
formatCurrencyAmount
(
refund0
,
4
)
}{
'
'
}
{
token0
.
equals
(
WETH9_EXTENDED
[
chainId
])
?
'
ETH
'
:
token0
.
symbol
}
and
{
'
'
}
...
...
@@ -588,7 +597,7 @@ function V2PairMigration({
{
token1
.
equals
(
WETH9_EXTENDED
[
chainId
])
?
'
ETH
'
:
token1
.
symbol
}
will be refunded to your wallet
due to selected price range.
</
Trans
>
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
)
:
null
}
</
AutoColumn
>
</
DarkGreyCard
>
...
...
@@ -720,16 +729,16 @@ export default function MigrateV2Pair({
<
AutoColumn
gap=
"16px"
>
<
AutoRow
style=
{
{
alignItems
:
'
center
'
,
justifyContent
:
'
space-between
'
}
}
gap=
"8px"
>
<
BackArrow
to=
"/migrate/v2"
/>
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Migrate V2 Liquidity
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
SettingsTab
placeholderSlippage=
{
DEFAULT_MIGRATE_SLIPPAGE_TOLERANCE
}
/>
</
AutoRow
>
{
!
account
?
(
<
T
YPE
.
l
argeHeader
>
<
T
hemedText
.
L
argeHeader
>
<
Trans
>
You must connect an account.
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
)
:
pairBalance
&&
totalSupply
&&
reserve0
&&
reserve1
&&
token0
&&
token1
?
(
<
V2PairMigration
pair=
{
pair
}
...
...
src/pages/MigrateV2/index.tsx
View file @
bf7a40be
...
...
@@ -20,13 +20,13 @@ import { V2_FACTORY_ADDRESSES } from '../../constants/addresses'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
toV2LiquidityToken
,
useTrackedTokenPairs
}
from
'
../../state/user/hooks
'
import
{
useTokenBalancesWithLoadingIndicator
}
from
'
../../state/wallet/hooks
'
import
{
BackArrow
,
StyledInternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
BackArrow
,
StyledInternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
BodyWrapper
}
from
'
../AppBody
'
function
EmptyState
({
message
}:
{
message
:
ReactNode
})
{
return
(
<
AutoColumn
style=
{
{
minHeight
:
200
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
}
}
>
<
T
YPE
.
body
>
{
message
}
</
TYPE
.
b
ody
>
<
T
hemedText
.
Body
>
{
message
}
</
ThemedText
.
B
ody
>
</
AutoColumn
>
)
}
...
...
@@ -117,34 +117,34 @@ export default function MigrateV2() {
<
AutoColumn
gap=
"16px"
>
<
AutoRow
style=
{
{
alignItems
:
'
center
'
,
justifyContent
:
'
space-between
'
}
}
gap=
"8px"
>
<
BackArrow
to=
"/pool/v2"
/>
<
T
YPE
.
m
ediumHeader
>
<
T
hemedText
.
M
ediumHeader
>
<
Trans
>
Migrate V2 Liquidity
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
div
>
<
QuestionHelper
text=
{
<
Trans
>
Migrate your liquidity tokens from Uniswap V2 to Uniswap V3.
</
Trans
>
}
/>
</
div
>
</
AutoRow
>
<
T
YPE
.
b
ody
style=
{
{
marginBottom
:
8
,
fontWeight
:
400
}
}
>
<
T
hemedText
.
B
ody
style=
{
{
marginBottom
:
8
,
fontWeight
:
400
}
}
>
<
Trans
>
For each pool shown below, click migrate to remove your liquidity from Uniswap V2 and deposit it into
Uniswap V3.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
{
!
account
?
(
<
LightCard
padding=
"40px"
>
<
T
YPE
.
b
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
Trans
>
Connect to a wallet to view your V2 liquidity.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
LightCard
>
)
:
v2IsLoading
?
(
<
LightCard
padding=
"40px"
>
<
T
YPE
.
b
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
Dots
>
<
Trans
>
Loading
</
Trans
>
</
Dots
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
LightCard
>
)
:
v2Pairs
.
filter
(([,
pair
])
=>
!!
pair
).
length
>
0
?
(
<>
...
...
src/pages/Pool/CTACards.tsx
View file @
bf7a40be
...
...
@@ -3,7 +3,7 @@ import { AutoColumn } from 'components/Column'
import
{
CHAIN_INFO
,
SupportedChainId
}
from
'
constants/chains
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
styled
from
'
styled-components/macro
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
Texture
from
'
../../assets/images/sandtexture.webp
'
import
{
ExternalLink
}
from
'
../../theme
'
...
...
@@ -102,7 +102,7 @@ const CTA2 = styled(ExternalLink)`
}
`
const
HeaderText
=
styled
(
T
YPE
.
l
abel
)
`
const
HeaderText
=
styled
(
T
hemedText
.
L
abel
)
`
align-items: center;
display: flex;
margin-bottom: 24px;
...
...
@@ -133,9 +133,9 @@ export default function CTACards() {
<
HeaderText
>
<
Trans
>
Learn about providing liquidity
</
Trans
>
↗
</
HeaderText
>
<
T
YPE
.
b
ody
fontWeight=
{
300
}
style=
{
{
alignItems
:
'
center
'
,
display
:
'
flex
'
,
maxWidth
:
'
80%
'
}
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
300
}
style=
{
{
alignItems
:
'
center
'
,
display
:
'
flex
'
,
maxWidth
:
'
80%
'
}
}
>
<
Trans
>
Check out our v3 LP walkthrough and migration guides.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
ResponsiveColumn
>
</
CTA1
>
<
CTA2
href=
{
infoLink
+
'
pools
'
}
>
...
...
@@ -143,9 +143,9 @@ export default function CTACards() {
<
HeaderText
style=
{
{
alignSelf
:
'
flex-start
'
}
}
>
<
Trans
>
Top pools
</
Trans
>
↗
</
HeaderText
>
<
T
YPE
.
b
ody
fontWeight=
{
300
}
style=
{
{
alignSelf
:
'
flex-start
'
}
}
>
<
T
hemedText
.
B
ody
fontWeight=
{
300
}
style=
{
{
alignSelf
:
'
flex-start
'
}
}
>
<
Trans
>
Explore popular pools on Uniswap Analytics.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
ResponsiveColumn
>
</
CTA2
>
</
CTASection
>
...
...
src/pages/Pool/PositionPage.tsx
View file @
bf7a40be
...
...
@@ -29,7 +29,7 @@ import { Bound } from 'state/mint/v3/actions'
import
{
useSingleCallResult
}
from
'
state/multicall/hooks
'
import
{
useIsTransactionPending
,
useTransactionAdder
}
from
'
state/transactions/hooks
'
import
styled
from
'
styled-components/macro
'
import
{
ExternalLink
,
HideExtraSmall
,
T
YPE
}
from
'
theme
'
import
{
ExternalLink
,
HideExtraSmall
,
T
hemedText
}
from
'
theme
'
import
{
currencyId
}
from
'
utils/currencyId
'
import
{
formatCurrencyAmount
}
from
'
utils/formatCurrencyAmount
'
import
{
formatTickPrice
}
from
'
utils/formatTickPrice
'
...
...
@@ -79,7 +79,7 @@ const BadgeText = styled.div`
// responsive text
// disable the warning because we don't use the end prop, we just want to filter it out
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const
Label
=
styled
(({
end
,
...
props
})
=>
<
T
YPE
.
l
abel
{
...
props
}
/>)
<
{
end
?:
boolean
}
>
`
const
Label
=
styled
(({
end
,
...
props
})
=>
<
T
hemedText
.
L
abel
{
...
props
}
/>)
<
{
end
?:
boolean
}
>
`
display: flex;
font-size: 16px;
justify-content:
${({
end
})
=>
(
end
?
'
flex-end
'
:
'
flex-start
'
)}
;
...
...
@@ -94,7 +94,7 @@ const ExtentsText = styled.span`
font-weight: 500;
`
const
HoverText
=
styled
(
T
YPE
.
m
ain
)
`
const
HoverText
=
styled
(
T
hemedText
.
M
ain
)
`
text-decoration: none;
color:
${({
theme
})
=>
theme
.
text3
}
;
:hover {
...
...
@@ -164,9 +164,9 @@ function CurrentPriceCard({
<
ExtentsText
>
<
Trans
>
Current price
</
Trans
>
</
ExtentsText
>
<
T
YPE
.
m
ediumHeader
textAlign=
"center"
>
<
T
hemedText
.
M
ediumHeader
textAlign=
"center"
>
{
(
inverted
?
pool
.
token1Price
:
pool
.
token0Price
).
toSignificant
(
6
)
}{
'
'
}
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
ExtentsText
>
<
Trans
>
{
currencyQuote
?.
symbol
}
per
{
currencyBase
?.
symbol
}
...
...
@@ -185,7 +185,7 @@ function LinkedCurrency({ chainId, currency }: { chainId?: number; currency?: Cu
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
address
,
ExplorerDataType
.
TOKEN
)
}
>
<
RowFixed
>
<
CurrencyLogo
currency=
{
currency
}
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
T
YPE
.
main
>
{
currency
?.
symbol
}
↗
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
>
{
currency
?.
symbol
}
↗
</
ThemedText
.
M
ain
>
</
RowFixed
>
</
ExternalLink
>
)
...
...
@@ -194,7 +194,7 @@ function LinkedCurrency({ chainId, currency }: { chainId?: number; currency?: Cu
return
(
<
RowFixed
>
<
CurrencyLogo
currency=
{
currency
}
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
T
YPE
.
main
>
{
currency
?.
symbol
}
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
>
{
currency
?.
symbol
}
</
ThemedText
.
M
ain
>
</
RowFixed
>
)
}
...
...
@@ -490,22 +490,22 @@ export function PositionPage({
<
RowBetween
>
<
RowFixed
>
<
CurrencyLogo
currency=
{
feeValueUpper
?.
currency
}
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
T
YPE
.
main
>
{
feeValueUpper
?
formatCurrencyAmount
(
feeValueUpper
,
4
)
:
'
-
'
}
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
>
{
feeValueUpper
?
formatCurrencyAmount
(
feeValueUpper
,
4
)
:
'
-
'
}
</
ThemedText
.
M
ain
>
</
RowFixed
>
<
T
YPE
.
main
>
{
feeValueUpper
?.
currency
?.
symbol
}
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
>
{
feeValueUpper
?.
currency
?.
symbol
}
</
ThemedText
.
M
ain
>
</
RowBetween
>
<
RowBetween
>
<
RowFixed
>
<
CurrencyLogo
currency=
{
feeValueLower
?.
currency
}
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
T
YPE
.
main
>
{
feeValueLower
?
formatCurrencyAmount
(
feeValueLower
,
4
)
:
'
-
'
}
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
>
{
feeValueLower
?
formatCurrencyAmount
(
feeValueLower
,
4
)
:
'
-
'
}
</
ThemedText
.
M
ain
>
</
RowFixed
>
<
T
YPE
.
main
>
{
feeValueLower
?.
currency
?.
symbol
}
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
>
{
feeValueLower
?.
currency
?.
symbol
}
</
ThemedText
.
M
ain
>
</
RowBetween
>
</
AutoColumn
>
</
LightCard
>
<
T
YPE
.
i
talic
>
<
T
hemedText
.
I
talic
>
<
Trans
>
Collecting fees will withdraw currently available fees for you.
</
Trans
>
</
T
YPE
.
i
talic
>
</
T
hemedText
.
I
talic
>
<
ButtonPrimary
onClick=
{
collect
}
>
<
Trans
>
Collect
</
Trans
>
</
ButtonPrimary
>
...
...
@@ -564,9 +564,9 @@ export function PositionPage({
<
ResponsiveRow
>
<
RowFixed
>
<
DoubleCurrencyLogo
currency0=
{
currencyBase
}
currency1=
{
currencyQuote
}
size=
{
24
}
margin=
{
true
}
/>
<
T
YPE
.
l
abel
fontSize=
{
'
24px
'
}
mr=
"10px"
>
<
T
hemedText
.
L
abel
fontSize=
{
'
24px
'
}
mr=
"10px"
>
{
currencyQuote
?.
symbol
}
/
{
currencyBase
?.
symbol
}
</
T
YPE
.
l
abel
>
</
T
hemedText
.
L
abel
>
<
Badge
style=
{
{
marginRight
:
'
8px
'
}
}
>
<
BadgeText
>
<
Trans
>
{
new
Percent
(
feeAmount
,
1
_000_000
).
toSignificant
()
}
%
</
Trans
>
...
...
@@ -646,13 +646,13 @@ export function PositionPage({
<
Trans
>
Liquidity
</
Trans
>
</
Label
>
{
fiatValueOfLiquidity
?.
greaterThan
(
new
Fraction
(
1
,
100
))
?
(
<
T
YPE
.
l
argeHeader
fontSize=
"36px"
fontWeight=
{
500
}
>
<
T
hemedText
.
L
argeHeader
fontSize=
"36px"
fontWeight=
{
500
}
>
<
Trans
>
$
{
fiatValueOfLiquidity
.
toFixed
(
2
,
{
groupSeparator
:
'
,
'
})
}
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
)
:
(
<
T
YPE
.
l
argeHeader
color=
{
theme
.
text1
}
fontSize=
"36px"
fontWeight=
{
500
}
>
<
T
hemedText
.
L
argeHeader
color=
{
theme
.
text1
}
fontSize=
"36px"
fontWeight=
{
500
}
>
<
Trans
>
$-
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
)
}
</
AutoColumn
>
<
LightCard
padding=
"12px 16px"
>
...
...
@@ -660,14 +660,14 @@ export function PositionPage({
<
RowBetween
>
<
LinkedCurrency
chainId=
{
chainId
}
currency=
{
currencyQuote
}
/>
<
RowFixed
>
<
T
YPE
.
m
ain
>
<
T
hemedText
.
M
ain
>
{
inverted
?
position
?.
amount0
.
toSignificant
(
4
)
:
position
?.
amount1
.
toSignificant
(
4
)
}
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
{
typeof
ratio
===
'
number
'
&&
!
removed
?
(
<
Badge
style=
{
{
marginLeft
:
'
10px
'
}
}
>
<
T
YPE
.
m
ain
fontSize=
{
11
}
>
<
T
hemedText
.
M
ain
fontSize=
{
11
}
>
<
Trans
>
{
inverted
?
ratio
:
100
-
ratio
}
%
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
Badge
>
)
:
null
}
</
RowFixed
>
...
...
@@ -675,14 +675,14 @@ export function PositionPage({
<
RowBetween
>
<
LinkedCurrency
chainId=
{
chainId
}
currency=
{
currencyBase
}
/>
<
RowFixed
>
<
T
YPE
.
m
ain
>
<
T
hemedText
.
M
ain
>
{
inverted
?
position
?.
amount1
.
toSignificant
(
4
)
:
position
?.
amount0
.
toSignificant
(
4
)
}
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
{
typeof
ratio
===
'
number
'
&&
!
removed
?
(
<
Badge
style=
{
{
marginLeft
:
'
10px
'
}
}
>
<
T
YPE
.
m
ain
color=
{
theme
.
text2
}
fontSize=
{
11
}
>
<
T
hemedText
.
M
ain
color=
{
theme
.
text2
}
fontSize=
{
11
}
>
<
Trans
>
{
inverted
?
100
-
ratio
:
ratio
}
%
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
Badge
>
)
:
null
}
</
RowFixed
>
...
...
@@ -700,13 +700,13 @@ export function PositionPage({
<
Trans
>
Unclaimed fees
</
Trans
>
</
Label
>
{
fiatValueOfFees
?.
greaterThan
(
new
Fraction
(
1
,
100
))
?
(
<
T
YPE
.
l
argeHeader
color=
{
theme
.
green1
}
fontSize=
"36px"
fontWeight=
{
500
}
>
<
T
hemedText
.
L
argeHeader
color=
{
theme
.
green1
}
fontSize=
"36px"
fontWeight=
{
500
}
>
<
Trans
>
$
{
fiatValueOfFees
.
toFixed
(
2
,
{
groupSeparator
:
'
,
'
})
}
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
)
:
(
<
T
YPE
.
l
argeHeader
color=
{
theme
.
text1
}
fontSize=
"36px"
fontWeight=
{
500
}
>
<
T
hemedText
.
L
argeHeader
color=
{
theme
.
text1
}
fontSize=
"36px"
fontWeight=
{
500
}
>
<
Trans
>
$-
</
Trans
>
</
T
YPE
.
l
argeHeader
>
</
T
hemedText
.
L
argeHeader
>
)
}
</
AutoColumn
>
{
ownsNFT
&&
(
feeValue0
?.
greaterThan
(
0
)
||
feeValue1
?.
greaterThan
(
0
)
||
!!
collectMigrationHash
)
?
(
...
...
@@ -719,21 +719,21 @@ export function PositionPage({
onClick=
{
()
=>
setShowConfirm
(
true
)
}
>
{
!!
collectMigrationHash
&&
!
isCollectPending
?
(
<
T
YPE
.
m
ain
color=
{
theme
.
text1
}
>
<
T
hemedText
.
M
ain
color=
{
theme
.
text1
}
>
<
Trans
>
Collected
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
)
:
isCollectPending
||
collecting
?
(
<
T
YPE
.
m
ain
color=
{
theme
.
text1
}
>
<
T
hemedText
.
M
ain
color=
{
theme
.
text1
}
>
{
'
'
}
<
Dots
>
<
Trans
>
Collecting
</
Trans
>
</
Dots
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
)
:
(
<>
<
T
YPE
.
m
ain
color=
{
theme
.
white
}
>
<
T
hemedText
.
M
ain
color=
{
theme
.
white
}
>
<
Trans
>
Collect fees
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</>
)
}
</
ButtonConfirmed
>
...
...
@@ -749,10 +749,12 @@ export function PositionPage({
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
T
YPE
.
main
>
{
feeValueUpper
?.
currency
?.
symbol
}
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
>
{
feeValueUpper
?.
currency
?.
symbol
}
</
ThemedText
.
M
ain
>
</
RowFixed
>
<
RowFixed
>
<
TYPE
.
main
>
{
feeValueUpper
?
formatCurrencyAmount
(
feeValueUpper
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
<
ThemedText
.
Main
>
{
feeValueUpper
?
formatCurrencyAmount
(
feeValueUpper
,
4
)
:
'
-
'
}
</
ThemedText
.
Main
>
</
RowFixed
>
</
RowBetween
>
<
RowBetween
>
...
...
@@ -762,10 +764,12 @@ export function PositionPage({
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
T
YPE
.
main
>
{
feeValueLower
?.
currency
?.
symbol
}
</
TYPE
.
m
ain
>
<
T
hemedText
.
Main
>
{
feeValueLower
?.
currency
?.
symbol
}
</
ThemedText
.
M
ain
>
</
RowFixed
>
<
RowFixed
>
<
TYPE
.
main
>
{
feeValueLower
?
formatCurrencyAmount
(
feeValueLower
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
<
ThemedText
.
Main
>
{
feeValueLower
?
formatCurrencyAmount
(
feeValueLower
,
4
)
:
'
-
'
}
</
ThemedText
.
Main
>
</
RowFixed
>
</
RowBetween
>
</
AutoColumn
>
...
...
@@ -773,9 +777,9 @@ export function PositionPage({
{
showCollectAsWeth
&&
(
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
m
ain
>
<
T
hemedText
.
M
ain
>
<
Trans
>
Collect as WETH
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
<
Toggle
id=
"receive-as-weth"
isActive=
{
receiveWETH
}
...
...
@@ -819,9 +823,9 @@ export function PositionPage({
<
ExtentsText
>
<
Trans
>
Min price
</
Trans
>
</
ExtentsText
>
<
T
YPE
.
m
ediumHeader
textAlign=
"center"
>
<
T
hemedText
.
M
ediumHeader
textAlign=
"center"
>
{
formatTickPrice
(
priceLower
,
tickAtLimit
,
Bound
.
LOWER
)
}
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
ExtentsText
>
{
'
'
}
<
Trans
>
...
...
@@ -830,9 +834,9 @@ export function PositionPage({
</
ExtentsText
>
{
inRange
&&
(
<
T
YPE
.
s
mall
color=
{
theme
.
text3
}
>
<
T
hemedText
.
S
mall
color=
{
theme
.
text3
}
>
<
Trans
>
Your position will be 100%
{
currencyBase
?.
symbol
}
at this price.
</
Trans
>
</
T
YPE
.
s
mall
>
</
T
hemedText
.
S
mall
>
)
}
</
AutoColumn
>
</
LightCard
>
...
...
@@ -843,9 +847,9 @@ export function PositionPage({
<
ExtentsText
>
<
Trans
>
Max price
</
Trans
>
</
ExtentsText
>
<
T
YPE
.
m
ediumHeader
textAlign=
"center"
>
<
T
hemedText
.
M
ediumHeader
textAlign=
"center"
>
{
formatTickPrice
(
priceUpper
,
tickAtLimit
,
Bound
.
UPPER
)
}
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
ExtentsText
>
{
'
'
}
<
Trans
>
...
...
@@ -854,9 +858,9 @@ export function PositionPage({
</
ExtentsText
>
{
inRange
&&
(
<
T
YPE
.
s
mall
color=
{
theme
.
text3
}
>
<
T
hemedText
.
S
mall
color=
{
theme
.
text3
}
>
<
Trans
>
Your position will be 100%
{
currencyQuote
?.
symbol
}
at this price.
</
Trans
>
</
T
YPE
.
s
mall
>
</
T
hemedText
.
S
mall
>
)
}
</
AutoColumn
>
</
LightCard
>
...
...
src/pages/Pool/index.tsx
View file @
bf7a40be
...
...
@@ -17,7 +17,7 @@ import { Link } from 'react-router-dom'
import
{
useWalletModalToggle
}
from
'
state/application/hooks
'
import
{
useUserHideClosedPositions
}
from
'
state/user/hooks
'
import
styled
,
{
ThemeContext
}
from
'
styled-components/macro
'
import
{
HideSmall
,
T
YPE
}
from
'
theme
'
import
{
HideSmall
,
T
hemedText
}
from
'
theme
'
import
{
PositionDetails
}
from
'
types/position
'
import
CTACards
from
'
./CTACards
'
...
...
@@ -199,9 +199,9 @@ export default function Pool() {
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
}
}
>
<
TitleRow
style=
{
{
marginTop
:
'
1rem
'
}
}
padding=
{
'
0
'
}
>
<
T
YPE
.
b
ody
fontSize=
{
'
20px
'
}
>
<
T
hemedText
.
B
ody
fontSize=
{
'
20px
'
}
>
<
Trans
>
Pools Overview
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
ButtonRow
>
{
showV2Features
&&
(
<
Menu
...
...
@@ -209,10 +209,10 @@ export default function Pool() {
flyoutAlignment=
{
FlyoutAlignment
.
LEFT
}
ToggleUI=
{
(
props
:
any
)
=>
(
<
MoreOptionsButton
{
...
props
}
>
<
T
YPE
.
b
ody
style=
{
{
alignItems
:
'
center
'
,
display
:
'
flex
'
}
}
>
<
T
hemedText
.
B
ody
style=
{
{
alignItems
:
'
center
'
,
display
:
'
flex
'
}
}
>
<
Trans
>
More
</
Trans
>
<
ChevronDown
size=
{
15
}
/>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
MoreOptionsButton
>
)
}
/>
...
...
@@ -249,12 +249,12 @@ export default function Pool() {
<
PositionList
positions=
{
filteredPositions
}
/>
)
:
(
<
NoLiquidity
>
<
T
YPE
.
b
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
Inbox
size=
{
48
}
strokeWidth=
{
1
}
style=
{
{
marginBottom
:
'
.5rem
'
}
}
/>
<
div
>
<
Trans
>
Your V3 liquidity positions will appear here.
</
Trans
>
</
div
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
{
showConnectAWallet
&&
(
<
ButtonPrimary
style=
{
{
marginTop
:
'
2em
'
,
padding
:
'
8px 16px
'
}
}
onClick=
{
toggleWalletModal
}
>
<
Trans
>
Connect a wallet
</
Trans
>
...
...
@@ -306,9 +306,9 @@ export default function Pool() {
{
closedPositions
.
length
>
0
?
(
<
ShowInactiveToggle
>
<
label
>
<
T
YPE
.
b
ody
onClick=
{
()
=>
setUserHideClosedPositions
(
!
userHideClosedPositions
)
}
>
<
T
hemedText
.
B
ody
onClick=
{
()
=>
setUserHideClosedPositions
(
!
userHideClosedPositions
)
}
>
<
Trans
>
Show closed positions
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
label
>
<
input
type=
"checkbox"
...
...
src/pages/Pool/v2.tsx
View file @
bf7a40be
...
...
@@ -23,7 +23,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import
{
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
toV2LiquidityToken
,
useTrackedTokenPairs
}
from
'
../../state/user/hooks
'
import
{
useTokenBalancesWithLoadingIndicator
}
from
'
../../state/wallet/hooks
'
import
{
ExternalLink
,
HideSmall
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
HideSmall
,
T
hemedText
}
from
'
../../theme
'
const
PageWrapper
=
styled
(
AutoColumn
)
`
max-width: 640px;
...
...
@@ -144,26 +144,26 @@ export default function Pool() {
<
CardSection
>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontWeight=
{
600
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
600
}
>
<
Trans
>
Liquidity provider rewards
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontSize=
{
14
}
>
<
T
hemedText
.
W
hite
fontSize=
{
14
}
>
<
Trans
>
Liquidity providers earn a 0.3% fee on all trades proportional to their share of the pool. Fees are
added to the pool, accrue in real time and can be claimed by withdrawing your liquidity.
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
<
ExternalLink
style=
{
{
color
:
'
white
'
,
textDecoration
:
'
underline
'
}
}
target=
"_blank"
href=
"https://uniswap.org/docs/v2/core-concepts/pools/"
>
<
T
YPE
.
w
hite
fontSize=
{
14
}
>
<
T
hemedText
.
W
hite
fontSize=
{
14
}
>
<
Trans
>
Read more about providing liquidity
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
ExternalLink
>
</
AutoColumn
>
</
CardSection
>
...
...
@@ -175,9 +175,9 @@ export default function Pool() {
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"md"
style=
{
{
width
:
'
100%
'
}
}
>
<
Layer2Prompt
>
<
T
YPE
.
b
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
Trans
>
V2 is not available on Layer 2. Switch to Layer 1 Ethereum.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
Layer2Prompt
>
</
AutoColumn
>
</
AutoColumn
>
...
...
@@ -186,9 +186,9 @@ export default function Pool() {
<
AutoColumn
gap=
"md"
style=
{
{
width
:
'
100%
'
}
}
>
<
TitleRow
style=
{
{
marginTop
:
'
1rem
'
}
}
padding=
{
'
0
'
}
>
<
HideSmall
>
<
T
YPE
.
m
ediumHeader
style=
{
{
marginTop
:
'
0.5rem
'
,
justifySelf
:
'
flex-start
'
}
}
>
<
T
hemedText
.
M
ediumHeader
style=
{
{
marginTop
:
'
0.5rem
'
,
justifySelf
:
'
flex-start
'
}
}
>
<
Trans
>
Your V2 liquidity
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
</
HideSmall
>
<
ButtonRow
>
<
ResponsiveButtonSecondary
as=
{
Link
}
padding=
"6px 8px"
to=
"/add/v2/ETH"
>
...
...
@@ -209,17 +209,17 @@ export default function Pool() {
{
!
account
?
(
<
Card
padding=
"40px"
>
<
T
YPE
.
b
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
Trans
>
Connect to a wallet to view your liquidity.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
Card
>
)
:
v2IsLoading
?
(
<
EmptyProposals
>
<
T
YPE
.
b
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
Dots
>
<
Trans
>
Loading
</
Trans
>
</
Dots
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
EmptyProposals
>
)
:
allV2PairsWithLiquidity
?.
length
>
0
||
stakingPairs
?.
length
>
0
?
(
<>
...
...
@@ -266,9 +266,9 @@ export default function Pool() {
</>
)
:
(
<
EmptyProposals
>
<
T
YPE
.
b
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
T
hemedText
.
B
ody
color=
{
theme
.
text3
}
textAlign=
"center"
>
<
Trans
>
No liquidity found.
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
</
EmptyProposals
>
)
}
</
AutoColumn
>
...
...
src/pages/PoolFinder/index.tsx
View file @
bf7a40be
...
...
@@ -22,7 +22,7 @@ import { useActiveWeb3React } from '../../hooks/web3'
import
{
usePairAdder
}
from
'
../../state/user/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
StyledInternalLink
}
from
'
../../theme
'
import
{
T
YPE
}
from
'
../../theme
'
import
{
T
hemedText
}
from
'
../../theme
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
import
AppBody
from
'
../AppBody
'
import
{
Dots
}
from
'
../Pool/styleds
'
...
...
@@ -101,11 +101,11 @@ export default function PoolFinder() {
<
AutoColumn
style=
{
{
padding
:
'
1rem
'
}
}
gap=
"md"
>
<
BlueCard
>
<
AutoColumn
gap=
"10px"
>
<
T
YPE
.
l
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
T
hemedText
.
L
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
Trans
>
<
b
>
Tip:
</
b
>
Use this tool to find v2 pools that don
'
t automatically appear in the interface.
</
Trans
>
</
T
YPE
.
l
ink
>
</
T
hemedText
.
L
ink
>
</
AutoColumn
>
</
BlueCard
>
<
ButtonDropdownLight
...
...
src/pages/RemoveLiquidity/V3.tsx
View file @
bf7a40be
...
...
@@ -29,7 +29,7 @@ import { Text } from 'rebass'
import
{
useBurnV3ActionHandlers
,
useBurnV3State
,
useDerivedV3BurnInfo
}
from
'
state/burn/v3/hooks
'
import
{
useTransactionAdder
}
from
'
state/transactions/hooks
'
import
{
useUserSlippageToleranceWithDefault
}
from
'
state/user/hooks
'
import
{
T
YPE
}
from
'
theme
'
import
{
T
hemedText
}
from
'
theme
'
import
TransactionConfirmationModal
,
{
ConfirmationModalContent
}
from
'
../../components/TransactionConfirmationModal
'
import
{
WETH9_EXTENDED
}
from
'
../../constants/tokens
'
...
...
@@ -227,9 +227,9 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
</
RowBetween
>
{
feeValue0
?.
greaterThan
(
0
)
||
feeValue1
?.
greaterThan
(
0
)
?
(
<>
<
T
YPE
.
i
talic
fontSize=
{
12
}
color=
{
theme
.
text2
}
textAlign=
"left"
padding=
{
'
8px 0 0 0
'
}
>
<
T
hemedText
.
I
talic
fontSize=
{
12
}
color=
{
theme
.
text2
}
textAlign=
"left"
padding=
{
'
8px 0 0 0
'
}
>
<
Trans
>
You will also collect fees earned from this position.
</
Trans
>
</
T
YPE
.
i
talic
>
</
T
hemedText
.
I
talic
>
<
RowBetween
>
<
Text
fontSize=
{
16
}
fontWeight=
{
500
}
>
<
Trans
>
{
feeValue0
?.
currency
?.
symbol
}
Fees Earned:
</
Trans
>
...
...
@@ -303,18 +303,18 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
size=
{
20
}
margin=
{
true
}
/>
<
T
YPE
.
l
abel
<
T
hemedText
.
L
abel
ml=
"10px"
fontSize=
"20px"
>
{
`${feeValue0?.currency?.symbol}/${feeValue1?.currency?.symbol}`
}
</
T
YPE
.
l
abel
>
>
{
`${feeValue0?.currency?.symbol}/${feeValue1?.currency?.symbol}`
}
</
T
hemedText
.
L
abel
>
</
RowFixed
>
<
RangeBadge
removed=
{
removed
}
inRange=
{
!
outOfRange
}
/>
</
RowBetween
>
<
LightCard
>
<
AutoColumn
gap=
"md"
>
<
T
YPE
.
m
ain
fontWeight=
{
400
}
>
<
T
hemedText
.
M
ain
fontWeight=
{
400
}
>
<
Trans
>
Amount
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
<
RowBetween
>
<
ResponsiveHeaderText
>
<
Trans
>
{
percentForSlider
}
%
</
Trans
>
...
...
@@ -393,9 +393,9 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
{
showCollectAsWeth
&&
(
<
RowBetween
>
<
T
YPE
.
m
ain
>
<
T
hemedText
.
M
ain
>
<
Trans
>
Collect as WETH
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
<
Toggle
id=
"receive-as-weth"
isActive=
{
receiveWETH
}
...
...
src/pages/RemoveLiquidity/index.tsx
View file @
bf7a40be
...
...
@@ -36,7 +36,7 @@ import { useBurnActionHandlers, useBurnState, useDerivedBurnInfo } from '../../s
import
{
TransactionType
}
from
'
../../state/transactions/actions
'
import
{
useTransactionAdder
}
from
'
../../state/transactions/hooks
'
import
{
useUserSlippageToleranceWithDefault
}
from
'
../../state/user/hooks
'
import
{
StyledInternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
StyledInternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
calculateGasMargin
}
from
'
../../utils/calculateGasMargin
'
import
{
calculateSlippageAmount
}
from
'
../../utils/calculateSlippageAmount
'
import
{
currencyId
}
from
'
../../utils/currencyId
'
...
...
@@ -318,12 +318,12 @@ export default function RemoveLiquidity({
</
RowFixed
>
</
RowBetween
>
<
T
YPE
.
i
talic
fontSize=
{
12
}
color=
{
theme
.
text2
}
textAlign=
"left"
padding=
{
'
12px 0 0 0
'
}
>
<
T
hemedText
.
I
talic
fontSize=
{
12
}
color=
{
theme
.
text2
}
textAlign=
"left"
padding=
{
'
12px 0 0 0
'
}
>
<
Trans
>
Output is estimated. If the price changes by more than
{
allowedSlippage
.
toSignificant
(
4
)
}
% your transaction
will revert.
</
Trans
>
</
T
YPE
.
i
talic
>
</
T
hemedText
.
I
talic
>
</
AutoColumn
>
)
}
...
...
@@ -450,12 +450,12 @@ export default function RemoveLiquidity({
<
AutoColumn
gap=
"md"
>
<
BlueCard
>
<
AutoColumn
gap=
"10px"
>
<
T
YPE
.
l
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
T
hemedText
.
L
ink
fontWeight=
{
400
}
color=
{
'
primaryText1
'
}
>
<
Trans
>
<
b
>
Tip:
</
b
>
Removing pool tokens converts your position back into underlying tokens at the current
rate, proportional to your share of the pool. Accrued fees are included in the amounts you receive.
</
Trans
>
</
T
YPE
.
l
ink
>
</
T
hemedText
.
L
ink
>
</
AutoColumn
>
</
BlueCard
>
<
LightCard
>
...
...
src/pages/Swap/index.tsx
View file @
bf7a40be
...
...
@@ -59,7 +59,7 @@ import {
useSwapState
,
}
from
'
../../state/swap/hooks
'
import
{
useExpertModeManager
}
from
'
../../state/user/hooks
'
import
{
LinkStyledButton
,
T
YPE
}
from
'
../../theme
'
import
{
LinkStyledButton
,
T
hemedText
}
from
'
../../theme
'
import
{
computeFiatValuePriceImpact
}
from
'
../../utils/computeFiatValuePriceImpact
'
import
{
getTradeVersion
}
from
'
../../utils/getTradeVersion
'
import
{
maxAmountSpend
}
from
'
../../utils/maxAmountSpend
'
...
...
@@ -468,7 +468,7 @@ export default function Swap({ history }: RouteComponentProps) {
<
AutoRouterLogo
/>
<
LoadingOpacityContainer
$loading=
{
routeIsSyncing
}
>
{
trade
instanceof
V3Trade
&&
trade
.
swaps
.
length
>
1
&&
(
<
T
YPE
.
blue
fontSize=
{
14
}
>
{
trade
.
swaps
.
length
}
routes
</
TYPE
.
b
lue
>
<
T
hemedText
.
Blue
fontSize=
{
14
}
>
{
trade
.
swaps
.
length
}
routes
</
ThemedText
.
B
lue
>
)
}
</
LoadingOpacityContainer
>
</
AutoRow
>
...
...
@@ -506,9 +506,9 @@ export default function Swap({ history }: RouteComponentProps) {
<
div
>
{
swapIsUnsupported
?
(
<
ButtonPrimary
disabled=
{
true
}
>
<
T
YPE
.
m
ain
mb=
"4px"
>
<
T
hemedText
.
M
ain
mb=
"4px"
>
<
Trans
>
Unsupported Asset
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
ButtonPrimary
>
)
:
!
account
?
(
<
ButtonLight
onClick=
{
toggleWalletModal
}
>
...
...
@@ -525,17 +525,17 @@ export default function Swap({ history }: RouteComponentProps) {
</
ButtonPrimary
>
)
:
routeIsSyncing
||
routeIsLoading
?
(
<
GreyCard
style=
{
{
textAlign
:
'
center
'
}
}
>
<
T
YPE
.
m
ain
mb=
"4px"
>
<
T
hemedText
.
M
ain
mb=
"4px"
>
<
Dots
>
<
Trans
>
Loading
</
Trans
>
</
Dots
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
GreyCard
>
)
:
routeNotFound
&&
userHasSpecifiedInputOutput
?
(
<
GreyCard
style=
{
{
textAlign
:
'
center
'
}
}
>
<
T
YPE
.
m
ain
mb=
"4px"
>
<
T
hemedText
.
M
ain
mb=
"4px"
>
<
Trans
>
Insufficient liquidity for this trade.
</
Trans
>
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
GreyCard
>
)
:
showApproveFlow
?
(
<
AutoRow
style=
{
{
flexWrap
:
'
nowrap
'
,
width
:
'
100%
'
}
}
>
...
...
src/pages/Vote/Landing.tsx
View file @
bf7a40be
...
...
@@ -20,7 +20,7 @@ import { ProposalData } from 'state/governance/hooks'
import
{
useAllProposalData
,
useUserDelegatee
,
useUserVotes
}
from
'
state/governance/hooks
'
import
{
useTokenBalance
}
from
'
state/wallet/hooks
'
import
styled
from
'
styled-components/macro
'
import
{
ExternalLink
,
T
YPE
}
from
'
theme
'
import
{
ExternalLink
,
T
hemedText
}
from
'
theme
'
import
{
shortenAddress
}
from
'
utils
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
utils/getExplorerLink
'
...
...
@@ -40,8 +40,8 @@ const Proposal = styled(Button)`
width: 100%;
margin-top: 1rem;
border-radius: 12px;
display:
grid
;
grid-template-columns: 48px 1fr 120px
;
display:
flex
;
justify-content: space-between
;
align-items: center;
text-align: left;
outline: none;
...
...
@@ -59,10 +59,16 @@ const Proposal = styled(Button)`
const
ProposalNumber
=
styled
.
span
`
opacity: 0.6;
flex: 0 0 40px;
`
const
ProposalTitle
=
styled
.
span
`
font-weight: 600;
flex: 1;
max-width: 420px;
white-space: initial;
word-wrap: break-word;
padding-right: 10px;
`
const
VoteCard
=
styled
(
DataCard
)
`
...
...
@@ -77,7 +83,7 @@ const WrapSmall = styled(RowBetween)`
`
}
;
`
const
TextButton
=
styled
(
T
YPE
.
m
ain
)
`
const
TextButton
=
styled
(
T
hemedText
.
M
ain
)
`
color:
${({
theme
})
=>
theme
.
primary1
}
;
:hover {
cursor: pointer;
...
...
@@ -135,26 +141,26 @@ export default function Landing() {
<
CardSection
>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontWeight=
{
600
}
>
<
T
hemedText
.
W
hite
fontWeight=
{
600
}
>
<
Trans
>
Uniswap Governance
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
w
hite
fontSize=
{
14
}
>
<
T
hemedText
.
W
hite
fontSize=
{
14
}
>
<
Trans
>
UNI tokens represent voting shares in Uniswap governance. You can vote on each proposal yourself
or delegate your votes to a third party.
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
RowBetween
>
<
ExternalLink
style=
{
{
color
:
'
white
'
,
textDecoration
:
'
underline
'
}
}
href=
"https://uniswap.org/blog/uni"
target=
"_blank"
>
<
T
YPE
.
w
hite
fontSize=
{
14
}
>
<
T
hemedText
.
W
hite
fontSize=
{
14
}
>
<
Trans
>
Read more about Uniswap governance
</
Trans
>
</
T
YPE
.
w
hite
>
</
T
hemedText
.
W
hite
>
</
ExternalLink
>
</
AutoColumn
>
</
CardSection
>
...
...
@@ -164,9 +170,9 @@ export default function Landing() {
</
TopSection
>
<
TopSection
gap=
"2px"
>
<
WrapSmall
>
<
T
YPE
.
m
ediumHeader
style=
{
{
margin
:
'
0.5rem 0.5rem 0.5rem 0
'
,
flexShrink
:
0
}
}
>
<
T
hemedText
.
M
ediumHeader
style=
{
{
margin
:
'
0.5rem 0.5rem 0.5rem 0
'
,
flexShrink
:
0
}
}
>
<
Trans
>
Proposals
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
AutoRow
gap=
"6px"
justify=
"flex-end"
>
{
loadingProposals
||
loadingAvailableVotes
?
<
Loader
/>
:
null
}
{
showUnlockVoting
?
(
...
...
@@ -179,20 +185,20 @@ export default function Landing() {
<
Trans
>
Unlock Voting
</
Trans
>
</
ButtonPrimary
>
)
:
availableVotes
&&
JSBI
.
notEqual
(
JSBI
.
BigInt
(
0
),
availableVotes
?.
quotient
)
?
(
<
T
YPE
.
b
ody
fontWeight=
{
500
}
mr=
"6px"
>
<
T
hemedText
.
B
ody
fontWeight=
{
500
}
mr=
"6px"
>
<
Trans
>
<
FormattedCurrencyAmount
currencyAmount=
{
availableVotes
}
/>
Votes
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
)
:
uniBalance
&&
userDelegatee
&&
userDelegatee
!==
ZERO_ADDRESS
&&
JSBI
.
notEqual
(
JSBI
.
BigInt
(
0
),
uniBalance
?.
quotient
)
?
(
<
T
YPE
.
b
ody
fontWeight=
{
500
}
mr=
"6px"
>
<
T
hemedText
.
B
ody
fontWeight=
{
500
}
mr=
"6px"
>
<
Trans
>
<
FormattedCurrencyAmount
currencyAmount=
{
uniBalance
}
/>
Votes
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
)
:
(
''
)
}
...
...
@@ -211,9 +217,9 @@ export default function Landing() {
<
div
/>
{
userDelegatee
&&
userDelegatee
!==
ZERO_ADDRESS
?
(
<
RowFixed
>
<
T
YPE
.
b
ody
fontWeight=
{
500
}
mr=
"4px"
>
<
T
hemedText
.
B
ody
fontWeight=
{
500
}
mr=
"4px"
>
<
Trans
>
Delegated to:
</
Trans
>
</
T
YPE
.
b
ody
>
</
T
hemedText
.
B
ody
>
<
AddressButton
>
<
StyledExternalLink
href=
{
getExplorerLink
(
1
,
userDelegatee
,
ExplorerDataType
.
ADDRESS
)
}
...
...
@@ -247,9 +253,9 @@ export default function Landing() {
)
})
}
</
TopSection
>
<
T
YPE
.
s
ubHeader
color=
"text3"
>
<
T
hemedText
.
S
ubHeader
color=
"text3"
>
<
Trans
>
A minimum threshold of 0.25% of the total UNI supply is required to submit proposals
</
Trans
>
</
T
YPE
.
s
ubHeader
>
</
T
hemedText
.
S
ubHeader
>
</
PageWrapper
>
<
SwitchLocaleLink
/>
</>
...
...
src/pages/Vote/VotePage.tsx
View file @
bf7a40be
...
...
@@ -38,7 +38,7 @@ import {
}
from
'
../../state/governance/hooks
'
import
{
VoteOption
}
from
'
../../state/governance/types
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
ExternalLink
,
StyledInternalLink
,
T
YPE
}
from
'
../../theme
'
import
{
ExternalLink
,
StyledInternalLink
,
T
hemedText
}
from
'
../../theme
'
import
{
isAddress
}
from
'
../../utils
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
../../utils/getExplorerLink
'
import
{
ProposalStatus
}
from
'
./styled
'
...
...
@@ -249,27 +249,27 @@ export default function VotePage({
{
proposalData
&&
<
ProposalStatus
status=
{
proposalData
.
status
}
/>
}
</
RowBetween
>
<
AutoColumn
gap=
"10px"
style=
{
{
width
:
'
100%
'
}
}
>
<
T
YPE
.
largeHeader
style=
{
{
marginBottom
:
'
.5rem
'
}
}
>
{
proposalData
?.
title
}
</
TYPE
.
l
argeHeader
>
<
T
hemedText
.
LargeHeader
style=
{
{
marginBottom
:
'
.5rem
'
}
}
>
{
proposalData
?.
title
}
</
ThemedText
.
L
argeHeader
>
<
RowBetween
>
<
T
YPE
.
m
ain
>
<
T
hemedText
.
M
ain
>
{
startDate
&&
startDate
>
now
?
(
<
Trans
>
Voting starts approximately
{
startDate
.
toLocaleString
(
locale
,
dateFormat
)
}
</
Trans
>
)
:
null
}
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
RowBetween
>
<
RowBetween
>
<
T
YPE
.
m
ain
>
<
T
hemedText
.
M
ain
>
{
endDate
&&
(
endDate
<
now
?
(
<
Trans
>
Voting ended
{
endDate
.
toLocaleString
(
locale
,
dateFormat
)
}
</
Trans
>
)
:
(
<
Trans
>
Voting ends approximately
{
endDate
.
toLocaleString
(
locale
,
dateFormat
)
}
</
Trans
>
))
}
</
T
YPE
.
m
ain
>
</
T
hemedText
.
M
ain
>
</
RowBetween
>
{
proposalData
&&
proposalData
.
status
===
ProposalState
.
ACTIVE
&&
!
showVotingButtons
&&
(
<
GreyCard
>
<
T
YPE
.
b
lack
>
<
T
hemedText
.
B
lack
>
<
Trans
>
Only UNI votes that were self delegated or delegated to another address before block
{
'
'
}
{
proposalData
.
startBlock
}
are eligible for voting.
{
'
'
}
...
...
@@ -282,7 +282,7 @@ export default function VotePage({
</
Trans
>
</
span
>
)
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
GreyCard
>
)
}
</
AutoColumn
>
...
...
@@ -317,12 +317,12 @@ export default function VotePage({
<
CardSection
>
<
AutoColumn
gap=
"md"
>
<
WrapSmall
>
<
T
YPE
.
b
lack
fontWeight=
{
600
}
>
<
T
hemedText
.
B
lack
fontWeight=
{
600
}
>
<
Trans
>
For
</
Trans
>
</
T
YPE
.
b
lack
>
<
T
YPE
.
b
lack
fontWeight=
{
600
}
>
</
T
hemedText
.
B
lack
>
<
T
hemedText
.
B
lack
fontWeight=
{
600
}
>
{
proposalData
?.
forCount
?.
toLocaleString
(
undefined
,
{
maximumFractionDigits
:
0
})
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
WrapSmall
>
</
AutoColumn
>
<
ProgressWrapper
>
...
...
@@ -334,12 +334,12 @@ export default function VotePage({
<
CardSection
>
<
AutoColumn
gap=
"md"
>
<
WrapSmall
>
<
T
YPE
.
b
lack
fontWeight=
{
600
}
>
<
T
hemedText
.
B
lack
fontWeight=
{
600
}
>
<
Trans
>
Against
</
Trans
>
</
T
YPE
.
b
lack
>
<
T
YPE
.
b
lack
fontWeight=
{
600
}
>
</
T
hemedText
.
B
lack
>
<
T
hemedText
.
B
lack
fontWeight=
{
600
}
>
{
proposalData
?.
againstCount
?.
toLocaleString
(
undefined
,
{
maximumFractionDigits
:
0
})
}
</
T
YPE
.
b
lack
>
</
T
hemedText
.
B
lack
>
</
WrapSmall
>
</
AutoColumn
>
<
ProgressWrapper
>
...
...
@@ -349,9 +349,9 @@ export default function VotePage({
</
StyledDataCard
>
</
CardWrapper
>
<
AutoColumn
gap=
"md"
>
<
T
YPE
.
m
ediumHeader
fontWeight=
{
600
}
>
<
T
hemedText
.
M
ediumHeader
fontWeight=
{
600
}
>
<
Trans
>
Details
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
{
proposalData
?.
details
?.
map
((
d
,
i
)
=>
{
return
(
<
DetailText
key=
{
i
}
>
...
...
@@ -370,17 +370,17 @@ export default function VotePage({
})
}
</
AutoColumn
>
<
AutoColumn
gap=
"md"
>
<
T
YPE
.
m
ediumHeader
fontWeight=
{
600
}
>
<
T
hemedText
.
M
ediumHeader
fontWeight=
{
600
}
>
<
Trans
>
Description
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
MarkDownWrapper
>
<
ReactMarkdown
source=
{
proposalData
?.
description
}
/>
</
MarkDownWrapper
>
</
AutoColumn
>
<
AutoColumn
gap=
"md"
>
<
T
YPE
.
m
ediumHeader
fontWeight=
{
600
}
>
<
T
hemedText
.
M
ediumHeader
fontWeight=
{
600
}
>
<
Trans
>
Proposer
</
Trans
>
</
T
YPE
.
m
ediumHeader
>
</
T
hemedText
.
M
ediumHeader
>
<
ProposerAddressLink
href=
{
proposalData
?.
proposer
&&
chainId
...
...
src/pages/Vote/styled.tsx
View file @
bf7a40be
...
...
@@ -54,6 +54,8 @@ const StyledProposalContainer = styled.span<{ status: ProposalState }>`
width: fit-content;
justify-self: flex-end;
text-transform: uppercase;
flex: 0 0 100px;
text-align: center;
`
export
function
ProposalStatus
({
status
}:
{
status
:
ProposalState
})
{
...
...
src/state/application/reducer.test.ts
View file @
bf7a40be
...
...
@@ -16,7 +16,7 @@ describe('application reducer', () => {
beforeEach
(()
=>
{
store
=
createStore
(
reducer
,
{
blockNumber
:
{
[
1
]
:
3
,
1
:
3
,
},
chainId
:
null
,
implements3085
:
false
,
...
...
@@ -83,8 +83,8 @@ describe('application reducer', () => {
it
(
'
works with non-set chains
'
,
()
=>
{
store
.
dispatch
(
updateBlockNumber
({
chainId
:
3
,
blockNumber
:
2
}))
expect
(
store
.
getState
().
blockNumber
).
toEqual
({
[
1
]
:
3
,
[
3
]
:
2
,
1
:
3
,
3
:
2
,
})
})
})
...
...
src/state/application/updater.ts
View file @
bf7a40be
...
...
@@ -23,7 +23,7 @@ function useQueryCacheInvalidator() {
}
export
default
function
Updater
():
null
{
const
{
account
,
chainId
,
library
,
connector
}
=
useActiveWeb3React
()
const
{
account
,
chainId
,
library
}
=
useActiveWeb3React
()
const
dispatch
=
useAppDispatch
()
const
windowVisible
=
useIsWindowVisible
()
...
...
src/state/governance/hooks.ts
View file @
bf7a40be
...
...
@@ -136,7 +136,7 @@ function useFormattedProposalCreatedLogs(
// Bravo and one bip proposals omit newlines
if
(
startBlock
===
BRAVO_START_BLOCK
||
startBlock
===
ONE_BIP_START_BLOCK
)
{
description
=
description
.
replace
(
/
/g
,
'
\n
'
).
replace
(
/
\d\.
/g
,
'
\n
$&
'
)
description
=
description
.
replace
(
/
{2}
/g
,
'
\n
'
).
replace
(
/
\d\.
/g
,
'
\n
$&
'
)
}
return
{
...
...
src/state/lists/reducer.test.ts
View file @
bf7a40be
import
{
createStore
,
Store
}
from
'
redux
'
import
{
DEFAULT_LIST_OF_LISTS
}
from
'
../../constants/lists
'
import
{
DEFAULT_ACTIVE_LIST_URLS
}
from
'
../../constants/lists
'
import
{
updateVersion
}
from
'
../global/actions
'
import
{
DEFAULT_ACTIVE_LIST_URLS
}
from
'
./../../constants/lists
'
import
{
acceptListUpdate
,
addList
,
enableList
,
fetchTokenList
,
removeList
}
from
'
./actions
'
import
reducer
,
{
ListsState
}
from
'
./reducer
'
...
...
src/state/mint/v3/utils.test.ts
View file @
bf7a40be
...
...
@@ -16,7 +16,7 @@ describe('hooks', () => {
expect
(
tryParsePrice
(
baseToken
,
quoteToken
,
'
20.
'
)).
toEqual
(
undefined
)
})
it
(
'
should return a price
'
,
()
=>
{
it
(
'
should return a price
when decimals are the same
'
,
()
=>
{
const
baseToken
=
new
Token
(
1
,
'
0x6b175474e89094c44da98b954eedeac495271d0f
'
,
6
)
const
quoteToken
=
new
Token
(
1
,
'
0x1b175474e89094c44da98b954eedeac495271d0f
'
,
6
)
...
...
@@ -36,5 +36,26 @@ describe('hooks', () => {
tryParsePrice
(
baseToken
,
quoteToken
,
/* ~2^-128 */
'
0.000000000000000000000000000587747
'
)?.
toSignificant
(
6
)
).
toEqual
(
'
0.000000000000000000000000000587747
'
)
})
it
(
'
should return a price when decimals are different
'
,
()
=>
{
const
baseToken
=
new
Token
(
1
,
'
0x6b175474e89094c44da98b954eedeac495271d0f
'
,
2
)
const
quoteToken
=
new
Token
(
1
,
'
0x1b175474e89094c44da98b954eedeac495271d0f
'
,
4
)
expect
(
tryParsePrice
(
baseToken
,
quoteToken
,
'
20
'
)?.
toSignificant
(
6
)).
toEqual
(
'
20
'
)
expect
(
tryParsePrice
(
baseToken
,
quoteToken
,
'
20.05
'
)?.
toSignificant
(
6
)).
toEqual
(
'
20.05
'
)
expect
(
tryParsePrice
(
baseToken
,
quoteToken
,
'
20.123456789
'
)?.
toSignificant
(
6
)).
toEqual
(
'
20.1235
'
)
expect
(
tryParsePrice
(
baseToken
,
quoteToken
,
'
0.123456789
'
)?.
toSignificant
(
6
)).
toEqual
(
'
0.123457
'
)
expect
(
tryParsePrice
(
baseToken
,
quoteToken
,
'
.123456789
'
)?.
toSignificant
(
6
)).
toEqual
(
'
0.123457
'
)
expect
(
tryParsePrice
(
baseToken
,
quoteToken
,
(
2
**
128
).
toLocaleString
(
'
fullwide
'
,
{
useGrouping
:
false
})
)?.
toSignificant
(
6
)
).
toEqual
(
'
340282000000000000000000000000000000000
'
)
expect
(
tryParsePrice
(
baseToken
,
quoteToken
,
/* ~2^-128 */
'
0.000000000000000000000000000587747
'
)?.
toSignificant
(
6
)
).
toEqual
(
'
0.000000000000000000000000000587747
'
)
})
})
})
src/state/multicall/reducer.test.ts
View file @
bf7a40be
...
...
@@ -38,9 +38,9 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callListeners
:
{
[
1
]
:
{
1
:
{
[
`
${
DAI_ADDRESS
}
-0x`
]:
{
[
1
]
:
1
,
1
:
1
,
},
},
},
...
...
@@ -92,7 +92,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{},
callListeners
:
{
[
1
]
:
{
[
`
${
DAI_ADDRESS
}
-0x`
]:
{}
}
},
callListeners
:
{
1
:
{
[
`
${
DAI_ADDRESS
}
-0x`
]:
{}
}
},
})
})
})
...
...
@@ -110,7 +110,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{
[
1
]
:
{
1
:
{
abc
:
{
blockNumber
:
1
,
data
:
'
0x
'
,
...
...
@@ -140,7 +140,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{
[
1
]
:
{
1
:
{
abc
:
{
blockNumber
:
2
,
data
:
'
0x2
'
,
...
...
@@ -170,7 +170,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{
[
1
]
:
{
1
:
{
abc
:
{
blockNumber
:
2
,
data
:
'
0x2
'
,
...
...
@@ -191,7 +191,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{
[
1
]
:
{
1
:
{
[
`
${
DAI_ADDRESS
}
-0x0`
]:
{
fetchingBlockNumber
:
2
},
},
},
...
...
@@ -215,7 +215,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{
[
1
]
:
{
1
:
{
[
`
${
DAI_ADDRESS
}
-0x0`
]:
{
fetchingBlockNumber
:
3
},
},
},
...
...
@@ -239,7 +239,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{
[
1
]
:
{
1
:
{
[
`
${
DAI_ADDRESS
}
-0x0`
]:
{
fetchingBlockNumber
:
2
},
},
},
...
...
@@ -258,7 +258,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{
[
1
]
:
{},
1
:
{},
},
})
})
...
...
@@ -279,7 +279,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{
[
1
]
:
{
1
:
{
[
`
${
DAI_ADDRESS
}
-0x0`
]:
{
blockNumber
:
2
,
// null data indicates error
...
...
@@ -306,7 +306,7 @@ describe('multicall reducer', () => {
)
expect
(
store
.
getState
()).
toEqual
({
callResults
:
{
[
1
]
:
{
1
:
{
[
`
${
DAI_ADDRESS
}
-0x0`
]:
{
fetchingBlockNumber
:
3
},
},
},
...
...
src/state/multicall/updater.test.ts
View file @
bf7a40be
...
...
@@ -6,8 +6,8 @@ describe('multicall updater', () => {
expect
(
activeListeningKeys
(
{
[
1
]
:
{
[
'
abc
'
]
:
{
1
:
{
abc
:
{
4
:
2
,
// 2 listeners care about 4 block old data
1
:
0
,
// 0 listeners care about 1 block old data
},
...
...
@@ -23,8 +23,8 @@ describe('multicall updater', () => {
expect
(
activeListeningKeys
(
{
[
1
]
:
{
[
'
abc
'
]
:
{
1
:
{
abc
:
{
4
:
2
,
// 2 listeners care about 4 block old data
3
:
1
,
// 1 listener cares about 3 block old data
1
:
0
,
// 0 listeners care about 1 block old data
...
...
@@ -41,12 +41,12 @@ describe('multicall updater', () => {
expect
(
activeListeningKeys
(
{
[
1
]
:
{
[
'
abc
'
]
:
{
1
:
{
abc
:
{
4
:
2
,
// 2 listeners care about 4 block old data
1
:
0
,
// 0 listeners care about 1 block old data
},
[
'
def
'
]
:
{
def
:
{
Infinity
:
2
,
},
},
...
...
@@ -62,12 +62,12 @@ describe('multicall updater', () => {
expect
(
activeListeningKeys
(
{
[
1
]
:
{
[
'
abc
'
]
:
{
1
:
{
abc
:
{
4
:
2
,
// 2 listeners care about 4 block old data
1
:
0
,
// 0 listeners care about 1 block old data
},
[
'
def
'
]
:
{
def
:
{
2
:
1
,
5
:
2
,
},
...
...
@@ -84,8 +84,8 @@ describe('multicall updater', () => {
expect
(
activeListeningKeys
(
{
[
1
]
:
{
[
'
abc
'
]
:
{
1
:
{
abc
:
{
4
:
2
,
1
:
-
1
,
[
-
3
]:
4
,
...
...
@@ -102,8 +102,8 @@ describe('multicall updater', () => {
expect
(
activeListeningKeys
(
{
[
1
]
:
{
[
'
abc
'
]
:
{
1
:
{
abc
:
{
Infinity
:
2
,
// 2 listeners care about any data
4
:
2
,
// 2 listeners care about 4 block old data
1
:
0
,
// 0 listeners care about 1 block old data
...
...
@@ -128,15 +128,15 @@ describe('multicall updater', () => {
expect
(
outdatedListeningKeys
({},
{
abc
:
2
,
def
:
3
},
1
,
1
)).
toEqual
([
'
abc
'
,
'
def
'
])
})
it
(
'
returns only outdated keys
'
,
()
=>
{
expect
(
outdatedListeningKeys
({
[
1
]:
{
abc
:
{
data
:
'
0x
'
,
blockNumber
:
2
}
}
},
{
abc
:
1
,
def
:
1
},
1
,
2
)).
toEqual
(
[
'
def
'
]
)
expect
(
outdatedListeningKeys
({
1
:
{
abc
:
{
data
:
'
0x
'
,
blockNumber
:
2
}
}
},
{
abc
:
1
,
def
:
1
},
1
,
2
)).
toEqual
([
'
def
'
,
]
)
})
it
(
'
returns only keys not being fetched
'
,
()
=>
{
expect
(
outdatedListeningKeys
(
{
[
1
]
:
{
abc
:
{
data
:
'
0x
'
,
blockNumber
:
2
},
def
:
{
fetchingBlockNumber
:
2
}
},
1
:
{
abc
:
{
data
:
'
0x
'
,
blockNumber
:
2
},
def
:
{
fetchingBlockNumber
:
2
}
},
},
{
abc
:
1
,
def
:
1
},
1
,
...
...
@@ -147,7 +147,7 @@ describe('multicall updater', () => {
it
(
'
returns keys being fetched for old blocks
'
,
()
=>
{
expect
(
outdatedListeningKeys
(
{
[
1
]
:
{
abc
:
{
data
:
'
0x
'
,
blockNumber
:
2
},
def
:
{
fetchingBlockNumber
:
1
}
}
},
{
1
:
{
abc
:
{
data
:
'
0x
'
,
blockNumber
:
2
},
def
:
{
fetchingBlockNumber
:
1
}
}
},
{
abc
:
1
,
def
:
1
},
1
,
2
...
...
@@ -157,7 +157,7 @@ describe('multicall updater', () => {
it
(
'
respects blocks per fetch
'
,
()
=>
{
expect
(
outdatedListeningKeys
(
{
[
1
]
:
{
abc
:
{
data
:
'
0x
'
,
blockNumber
:
2
},
def
:
{
data
:
'
0x
'
,
fetchingBlockNumber
:
1
}
}
},
{
1
:
{
abc
:
{
data
:
'
0x
'
,
blockNumber
:
2
},
def
:
{
data
:
'
0x
'
,
fetchingBlockNumber
:
1
}
}
},
{
abc
:
2
,
def
:
2
},
1
,
3
...
...
src/state/stake/hooks.tsx
View file @
bf7a40be
...
...
@@ -24,7 +24,7 @@ export const STAKING_REWARDS_INFO: {
stakingRewardAddress
:
string
}[]
}
=
{
[
1
]
:
[
1
:
[
{
tokens
:
[
WETH9_EXTENDED
[
1
],
DAI
],
stakingRewardAddress
:
'
0xa1484C3aa22a66C62b77E0AE78E15258bd0cB711
'
,
...
...
src/state/swap/hooks.tsx
View file @
bf7a40be
...
...
@@ -183,7 +183,7 @@ export function useDerivedSwapInfo(toggledVersion: Version | undefined): {
}
},
[
toggledVersion
,
v2Trade
,
v3Trade
.
state
,
v3Trade
.
trade
])
const
bestTrade
=
isV2TradeBetter
==
undefined
?
undefined
:
isV2TradeBetter
?
v2Trade
:
v3Trade
.
trade
const
bestTrade
=
isV2TradeBetter
==
=
undefined
?
undefined
:
isV2TradeBetter
?
v2Trade
:
v3Trade
.
trade
const
currencyBalances
=
{
[
Field
.
INPUT
]:
relevantTokenBalances
[
0
],
...
...
src/state/transactions/reducer.test.ts
View file @
bf7a40be
...
...
@@ -20,7 +20,7 @@ describe('transaction reducer', () => {
describe
(
'
updateVersion
'
,
()
=>
{
it
(
'
clears old format transactions that do not have info
'
,
()
=>
{
store
=
createStore
(
reducer
,
{
[
1
]
:
{
1
:
{
abc
:
{
hash
:
'
abc
'
,
}
as
any
,
...
...
@@ -31,7 +31,7 @@ describe('transaction reducer', () => {
})
it
(
'
keeps old format transactions that do have info
'
,
()
=>
{
store
=
createStore
(
reducer
,
{
[
1
]
:
{
1
:
{
abc
:
{
hash
:
'
abc
'
,
info
:
{},
...
...
src/theme/index.tsx
View file @
bf7a40be
...
...
@@ -153,53 +153,56 @@ const TextWrapper = styled(Text)<{ color: keyof Colors }>`
color:
${({
color
,
theme
})
=>
(
theme
as
any
)[
color
]}
;
`
export
const
TYPE
=
{
main
(
props
:
TextProps
)
{
/**
* Preset styles of the Rebass Text component
*/
export
const
ThemedText
=
{
Main
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
color=
{
'
text2
'
}
{
...
props
}
/>
},
l
ink
(
props
:
TextProps
)
{
L
ink
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
color=
{
'
primary1
'
}
{
...
props
}
/>
},
l
abel
(
props
:
TextProps
)
{
L
abel
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
600
}
color=
{
'
text1
'
}
{
...
props
}
/>
},
b
lack
(
props
:
TextProps
)
{
B
lack
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
color=
{
'
text1
'
}
{
...
props
}
/>
},
w
hite
(
props
:
TextProps
)
{
W
hite
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
color=
{
'
white
'
}
{
...
props
}
/>
},
b
ody
(
props
:
TextProps
)
{
B
ody
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
400
}
fontSize=
{
16
}
color=
{
'
text1
'
}
{
...
props
}
/>
},
l
argeHeader
(
props
:
TextProps
)
{
L
argeHeader
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
600
}
fontSize=
{
24
}
{
...
props
}
/>
},
m
ediumHeader
(
props
:
TextProps
)
{
M
ediumHeader
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
fontSize=
{
20
}
{
...
props
}
/>
},
s
ubHeader
(
props
:
TextProps
)
{
S
ubHeader
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
400
}
fontSize=
{
14
}
{
...
props
}
/>
},
s
mall
(
props
:
TextProps
)
{
S
mall
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
fontSize=
{
11
}
{
...
props
}
/>
},
b
lue
(
props
:
TextProps
)
{
B
lue
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
color=
{
'
blue1
'
}
{
...
props
}
/>
},
y
ellow
(
props
:
TextProps
)
{
Y
ellow
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
color=
{
'
yellow3
'
}
{
...
props
}
/>
},
d
arkGray
(
props
:
TextProps
)
{
D
arkGray
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
color=
{
'
text3
'
}
{
...
props
}
/>
},
g
ray
(
props
:
TextProps
)
{
G
ray
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
color=
{
'
bg3
'
}
{
...
props
}
/>
},
i
talic
(
props
:
TextProps
)
{
I
talic
(
props
:
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
fontSize=
{
12
}
fontStyle=
{
'
italic
'
}
color=
{
'
text2
'
}
{
...
props
}
/>
},
e
rror
({
error
,
...
props
}:
{
error
:
boolean
}
&
TextProps
)
{
E
rror
({
error
,
...
props
}:
{
error
:
boolean
}
&
TextProps
)
{
return
<
TextWrapper
fontWeight=
{
500
}
color=
{
error
?
'
red1
'
:
'
text2
'
}
{
...
props
}
/>
},
}
...
...
src/utils/uriToHttp.ts
View file @
bf7a40be
...
...
@@ -18,7 +18,7 @@ export default function uriToHttp(uri: string): string[] {
const
name
=
uri
.
match
(
/^ipns:
(\/\/)?(
.*
)
$/i
)?.[
2
]
return
[
`https://cloudflare-ipfs.com/ipns/
${
name
}
/`
,
`https://ipfs.io/ipns/
${
name
}
/`
]
case
'
ar
'
:
const
tx
=
uri
.
match
(
/^
ipns
:
(\/\/)?(
.*
)
$/i
)?.[
2
]
const
tx
=
uri
.
match
(
/^
ar
:
(\/\/)?(
.*
)
$/i
)?.[
2
]
return
[
`https://arweave.net/
${
tx
}
`
]
default
:
return
[]
...
...
yarn.lock
View file @
bf7a40be
...
...
@@ -20372,9 +20372,9 @@ url-parse-lax@^3.0.0:
prepend-http "^2.0.0"
url-parse@^1.4.3, url-parse@^1.5.1:
version "1.5.
1
"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.
1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b
"
integrity sha512-
HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85
Q==
version "1.5.
3
"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.
3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862
"
integrity sha512-
IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjv
Q==
dependencies:
querystringify "^2.1.1"
requires-port "^1.0.0"
...
...
@@ -21201,9 +21201,9 @@ ws@>=7.4.6:
integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==
ws@^5.1.1:
version "5.2.
2
"
resolved "https://registry.
npmjs.org/ws/-/ws-5.2.2.tgz
"
integrity sha512-j
aHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlH
A==
version "5.2.
3
"
resolved "https://registry.
yarnpkg.com/ws/-/ws-5.2.3.tgz#05541053414921bc29c63bee14b8b0dd50b07b3d
"
integrity sha512-j
ZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AO
A==
dependencies:
async-limiter "~1.0.0"
...
...
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