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
020c8d18
Unverified
Commit
020c8d18
authored
Mar 08, 2022
by
Curly Brackets
Committed by
GitHub
Mar 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ui): display wrapped currency symbol with current chain (#3441)
parent
ab3f0240
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
PositionPage.tsx
src/pages/Pool/PositionPage.tsx
+4
-1
V3.tsx
src/pages/RemoveLiquidity/V3.tsx
+4
-1
No files found.
src/pages/Pool/PositionPage.tsx
View file @
020c8d18
...
@@ -23,6 +23,7 @@ import useUSDCPrice from 'hooks/useUSDCPrice'
...
@@ -23,6 +23,7 @@ import useUSDCPrice from 'hooks/useUSDCPrice'
import
{
useV3PositionFees
}
from
'
hooks/useV3PositionFees
'
import
{
useV3PositionFees
}
from
'
hooks/useV3PositionFees
'
import
{
useV3PositionFromTokenId
}
from
'
hooks/useV3Positions
'
import
{
useV3PositionFromTokenId
}
from
'
hooks/useV3Positions
'
import
{
useSingleCallResult
}
from
'
lib/hooks/multicall
'
import
{
useSingleCallResult
}
from
'
lib/hooks/multicall
'
import
useNativeCurrency
from
'
lib/hooks/useNativeCurrency
'
import
{
useCallback
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
{
useCallback
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
ReactGA
from
'
react-ga
'
import
ReactGA
from
'
react-ga
'
import
{
Link
,
RouteComponentProps
}
from
'
react-router-dom
'
import
{
Link
,
RouteComponentProps
}
from
'
react-router-dom
'
...
@@ -345,6 +346,8 @@ export function PositionPage({
...
@@ -345,6 +346,8 @@ export function PositionPage({
// flag for receiving WETH
// flag for receiving WETH
const
[
receiveWETH
,
setReceiveWETH
]
=
useState
(
false
)
const
[
receiveWETH
,
setReceiveWETH
]
=
useState
(
false
)
const
nativeCurrency
=
useNativeCurrency
()
const
nativeWrappedSymbol
=
nativeCurrency
.
wrapped
.
symbol
// construct Position from details returned
// construct Position from details returned
const
[
poolState
,
pool
]
=
usePool
(
token0
??
undefined
,
token1
??
undefined
,
feeAmount
)
const
[
poolState
,
pool
]
=
usePool
(
token0
??
undefined
,
token1
??
undefined
,
feeAmount
)
...
@@ -778,7 +781,7 @@ export function PositionPage({
...
@@ -778,7 +781,7 @@ export function PositionPage({
<
AutoColumn
gap=
"md"
>
<
AutoColumn
gap=
"md"
>
<
RowBetween
>
<
RowBetween
>
<
ThemedText
.
Main
>
<
ThemedText
.
Main
>
<
Trans
>
Collect as
WETH
</
Trans
>
<
Trans
>
Collect as
{
nativeWrappedSymbol
}
</
Trans
>
</
ThemedText
.
Main
>
</
ThemedText
.
Main
>
<
Toggle
<
Toggle
id=
"receive-as-weth"
id=
"receive-as-weth"
...
...
src/pages/RemoveLiquidity/V3.tsx
View file @
020c8d18
...
@@ -22,6 +22,7 @@ import useDebouncedChangeHandler from 'hooks/useDebouncedChangeHandler'
...
@@ -22,6 +22,7 @@ import useDebouncedChangeHandler from 'hooks/useDebouncedChangeHandler'
import
useTheme
from
'
hooks/useTheme
'
import
useTheme
from
'
hooks/useTheme
'
import
useTransactionDeadline
from
'
hooks/useTransactionDeadline
'
import
useTransactionDeadline
from
'
hooks/useTransactionDeadline
'
import
{
useV3PositionFromTokenId
}
from
'
hooks/useV3Positions
'
import
{
useV3PositionFromTokenId
}
from
'
hooks/useV3Positions
'
import
useNativeCurrency
from
'
lib/hooks/useNativeCurrency
'
import
{
useCallback
,
useMemo
,
useState
}
from
'
react
'
import
{
useCallback
,
useMemo
,
useState
}
from
'
react
'
import
ReactGA
from
'
react-ga
'
import
ReactGA
from
'
react-ga
'
import
{
Redirect
,
RouteComponentProps
}
from
'
react-router-dom
'
import
{
Redirect
,
RouteComponentProps
}
from
'
react-router-dom
'
...
@@ -69,6 +70,8 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
...
@@ -69,6 +70,8 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
// flag for receiving WETH
// flag for receiving WETH
const
[
receiveWETH
,
setReceiveWETH
]
=
useState
(
false
)
const
[
receiveWETH
,
setReceiveWETH
]
=
useState
(
false
)
const
nativeCurrency
=
useNativeCurrency
()
const
nativeWrappedSymbol
=
nativeCurrency
.
wrapped
.
symbol
// burn state
// burn state
const
{
percent
}
=
useBurnV3State
()
const
{
percent
}
=
useBurnV3State
()
...
@@ -394,7 +397,7 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
...
@@ -394,7 +397,7 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
{
showCollectAsWeth
&&
(
{
showCollectAsWeth
&&
(
<
RowBetween
>
<
RowBetween
>
<
ThemedText
.
Main
>
<
ThemedText
.
Main
>
<
Trans
>
Collect as
WETH
</
Trans
>
<
Trans
>
Collect as
{
nativeWrappedSymbol
}
</
Trans
>
</
ThemedText
.
Main
>
</
ThemedText
.
Main
>
<
Toggle
<
Toggle
id=
"receive-as-weth"
id=
"receive-as-weth"
...
...
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