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
37cf492d
Unverified
Commit
37cf492d
authored
Jun 16, 2021
by
Yuta Sugimura
Committed by
GitHub
Jun 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Add SwitchLocaleLink to a page where it does not exist (#1867)
parent
9e93f809
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
900 additions
and
874 deletions
+900
-874
index.tsx
src/pages/AddLiquidity/index.tsx
+383
-374
index.tsx
src/pages/AddLiquidityV2/index.tsx
+3
-0
index.tsx
src/pages/MigrateV2/index.tsx
+69
-65
PositionPage.tsx
src/pages/Pool/PositionPage.tsx
+322
-318
v2.tsx
src/pages/Pool/v2.tsx
+2
-0
index.tsx
src/pages/PoolFinder/index.tsx
+121
-117
No files found.
src/pages/AddLiquidity/index.tsx
View file @
37cf492d
...
...
@@ -55,6 +55,7 @@ import RateToggle from 'components/RateToggle'
import
{
BigNumber
}
from
'
@ethersproject/bignumber
'
import
{
AddRemoveTabs
}
from
'
components/NavigationTabs
'
import
HoverInlineText
from
'
components/HoverInlineText
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
const
DEFAULT_ADD_IN_RANGE_SLIPPAGE_TOLERANCE
=
new
Percent
(
50
,
10
_000
)
...
...
@@ -385,6 +386,7 @@ export default function AddLiquidity({
!
argentWalletContract
&&
approvalB
!==
ApprovalState
.
APPROVED
&&
!!
parsedAmounts
[
Field
.
CURRENCY_B
]
return
(
<>
<
ScrollablePage
>
<
TransactionConfirmationModal
isOpen=
{
showConfirm
}
...
...
@@ -562,7 +564,10 @@ export default function AddLiquidity({
</
DynamicSection
>
)
}
<
DynamicSection
gap=
"md"
disabled=
{
!
feeAmount
||
invalidPool
||
(
noLiquidity
&&
!
startPriceTypedValue
)
}
>
<
DynamicSection
gap=
"md"
disabled=
{
!
feeAmount
||
invalidPool
||
(
noLiquidity
&&
!
startPriceTypedValue
)
}
>
<
RowBetween
>
<
TYPE
.
label
>
<
Trans
>
Set Price Range
</
Trans
>
...
...
@@ -576,7 +581,9 @@ export default function AddLiquidity({
onLeftRangeInput
(
''
)
onRightRangeInput
(
''
)
history
.
push
(
`/add/${currencyIdB as string}/${currencyIdA as string}${feeAmount ? '/' + feeAmount : ''}`
`/add/${currencyIdB as string}/${currencyIdA as string}${
feeAmount ? '/' + feeAmount : ''
}`
)
}
}
/>
...
...
@@ -635,8 +642,8 @@ export default function AddLiquidity({
<
AlertTriangle
stroke=
{
theme
.
yellow3
}
size=
"16px"
/>
<
TYPE
.
yellow
ml=
"12px"
fontSize=
"12px"
>
<
Trans
>
Your position will not earn fees or be used in trades until the market price moves into your
range.
Your position will not earn fees or be used in trades until the market price moves into
your
range.
</
Trans
>
</
TYPE
.
yellow
>
</
RowBetween
>
...
...
@@ -773,5 +780,7 @@ export default function AddLiquidity({
/>
)
}
</
ScrollablePage
>
<
SwitchLocaleLink
/>
</>
)
}
src/pages/AddLiquidityV2/index.tsx
View file @
37cf492d
...
...
@@ -42,6 +42,7 @@ import { ConfirmAddModalBottom } from './ConfirmAddModalBottom'
import
{
currencyId
}
from
'
../../utils/currencyId
'
import
{
PoolPriceBar
}
from
'
./PoolPriceBar
'
import
UnsupportedCurrencyFooter
from
'
components/swap/UnsupportedCurrencyFooter
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
{
t
,
Trans
}
from
'
@lingui/macro
'
const
DEFAULT_ADD_V2_SLIPPAGE_TOLERANCE
=
new
Percent
(
50
,
10
_000
)
...
...
@@ -485,6 +486,8 @@ export default function AddLiquidity({
</
AutoColumn
>
</
Wrapper
>
</
AppBody
>
<
SwitchLocaleLink
/>
{
!
addIsUnsupported
?
(
pair
&&
!
noLiquidity
&&
pairState
!==
PairState
.
INVALID
?
(
<
AutoColumn
style=
{
{
minWidth
:
'
20rem
'
,
width
:
'
100%
'
,
maxWidth
:
'
400px
'
,
marginTop
:
'
1rem
'
}
}
>
...
...
src/pages/MigrateV2/index.tsx
View file @
37cf492d
...
...
@@ -16,6 +16,7 @@ import { Dots } from '../../components/swap/styleds'
import
{
toV2LiquidityToken
,
useTrackedTokenPairs
}
from
'
../../state/user/hooks
'
import
MigrateV2PositionCard
from
'
components/PositionCard/V2
'
import
MigrateSushiPositionCard
from
'
components/PositionCard/Sushi
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
{
PairState
,
useV2Pairs
}
from
'
hooks/useV2Pairs
'
import
{
getCreate2Address
}
from
'
@ethersproject/address
'
import
{
pack
,
keccak256
}
from
'
@ethersproject/solidity
'
...
...
@@ -110,6 +111,7 @@ export default function MigrateV2() {
const
v2IsLoading
=
fetchingPairBalances
||
v2Pairs
.
some
(([
pairState
])
=>
pairState
===
PairState
.
LOADING
)
return
(
<>
<
BodyWrapper
style=
{
{
padding
:
24
}
}
>
<
AutoColumn
gap=
"16px"
>
<
AutoRow
style=
{
{
alignItems
:
'
center
'
,
justifyContent
:
'
space-between
'
}
}
gap=
"8px"
>
...
...
@@ -178,5 +180,7 @@ export default function MigrateV2() {
</
AutoColumn
>
</
AutoColumn
>
</
BodyWrapper
>
<
SwitchLocaleLink
/>
</>
)
}
src/pages/Pool/PositionPage.tsx
View file @
37cf492d
...
...
@@ -37,6 +37,7 @@ import useTheme from '../../hooks/useTheme'
import
RateToggle
from
'
../../components/RateToggle
'
import
{
useSingleCallResult
}
from
'
state/multicall/hooks
'
import
RangeBadge
from
'
../../components/Badge/RangeBadge
'
import
{
SwitchLocaleLink
}
from
'
../../components/SwitchLocaleLink
'
import
useUSDCPrice
from
'
hooks/useUSDCPrice
'
import
Loader
from
'
components/Loader
'
import
Toggle
from
'
components/Toggle
'
...
...
@@ -495,6 +496,7 @@ export function PositionPage({
<
div
/>
</
LoadingRows
>
)
:
(
<>
<
PageWrapper
>
<
TransactionConfirmationModal
isOpen=
{
showConfirm
}
...
...
@@ -828,5 +830,7 @@ export function PositionPage({
</
DarkCard
>
</
AutoColumn
>
</
PageWrapper
>
<
SwitchLocaleLink
/>
</>
)
}
src/pages/Pool/v2.tsx
View file @
37cf492d
...
...
@@ -19,6 +19,7 @@ import { useV2Pairs } from '../../hooks/useV2Pairs'
import
{
toV2LiquidityToken
,
useTrackedTokenPairs
}
from
'
../../state/user/hooks
'
import
{
Dots
}
from
'
../../components/swap/styleds
'
import
{
CardSection
,
DataCard
,
CardNoise
,
CardBGImage
}
from
'
../../components/earn/styled
'
import
{
SwitchLocaleLink
}
from
'
../../components/SwitchLocaleLink
'
import
{
useStakingInfo
}
from
'
../../state/stake/hooks
'
import
{
BIG_INT_ZERO
}
from
'
../../constants/misc
'
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
...
...
@@ -256,6 +257,7 @@ export default function Pool() {
</
AutoColumn
>
</
AutoColumn
>
</
PageWrapper
>
<
SwitchLocaleLink
/>
</>
)
}
src/pages/PoolFinder/index.tsx
View file @
37cf492d
...
...
@@ -11,6 +11,7 @@ import { FindPoolTabs } from '../../components/NavigationTabs'
import
{
MinimalPositionCard
}
from
'
../../components/PositionCard
'
import
Row
from
'
../../components/Row
'
import
CurrencySearchModal
from
'
../../components/SearchModal/CurrencySearchModal
'
import
{
SwitchLocaleLink
}
from
'
../../components/SwitchLocaleLink
'
import
{
ExtendedEther
}
from
'
../../constants/tokens
'
import
{
PairState
,
useV2Pair
}
from
'
../../hooks/useV2Pairs
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
...
...
@@ -93,6 +94,7 @@ export default function PoolFinder() {
)
return
(
<>
<
AppBody
>
<
FindPoolTabs
origin=
{
query
.
get
(
'
origin
'
)
??
'
/pool/v2
'
}
/>
<
AutoColumn
style=
{
{
padding
:
'
1rem
'
}
}
gap=
"md"
>
...
...
@@ -224,5 +226,7 @@ export default function PoolFinder() {
selectedCurrency=
{
(
activeField
===
Fields
.
TOKEN0
?
currency1
:
currency0
)
??
undefined
}
/>
</
AppBody
>
<
SwitchLocaleLink
/>
</>
)
}
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