fix(ui): display wrapped currency symbol with current chain (#3441)
This commit is contained in:
parent
ab3f024031
commit
020c8d181a
@ -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({
|
|||||||
|
|
||||||
// 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({
|
|||||||
<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"
|
||||||
|
@ -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 }) {
|
|||||||
|
|
||||||
// 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 }) {
|
|||||||
{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"
|
||||||
|
Loading…
Reference in New Issue
Block a user