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
58a1be84
Unverified
Commit
58a1be84
authored
May 29, 2021
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(i18n): add a few more translations
parent
40b939df
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
47 additions
and
39 deletions
+47
-39
index.tsx
src/components/CurrencyInputPanel/index.tsx
+13
-10
InputStepCounter.tsx
src/components/InputStepCounter/InputStepCounter.tsx
+2
-2
index.tsx
src/components/PositionListItem/index.tsx
+1
-1
index.tsx
src/components/RangeSelector/index.tsx
+3
-2
StakingModal.tsx
src/components/earn/StakingModal.tsx
+2
-1
DelegateModal.tsx
src/components/vote/DelegateModal.tsx
+3
-3
VoteModal.tsx
src/components/vote/VoteModal.tsx
+2
-2
index.tsx
src/pages/AddLiquidity/index.tsx
+10
-8
MigrateV2Pair.tsx
src/pages/MigrateV2/MigrateV2Pair.tsx
+5
-4
PositionPage.tsx
src/pages/Pool/PositionPage.tsx
+5
-5
formatCurrencyAmount.ts
src/utils/formatCurrencyAmount.ts
+1
-1
No files found.
src/components/CurrencyInputPanel/index.tsx
View file @
58a1be84
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
{
Pair
}
from
'
@uniswap/v2-sdk
'
import
{
Currency
,
CurrencyAmount
,
Percent
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
Percent
,
Token
}
from
'
@uniswap/sdk-core
'
import
React
,
{
useState
,
useCallback
}
from
'
react
'
import
React
,
{
useState
,
useCallback
,
ReactNode
}
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
darken
}
from
'
polished
'
import
{
darken
}
from
'
polished
'
import
{
useCurrencyBalance
}
from
'
../../state/wallet/hooks
'
import
{
useCurrencyBalance
}
from
'
../../state/wallet/hooks
'
...
@@ -18,7 +18,7 @@ import useTheme from '../../hooks/useTheme'
...
@@ -18,7 +18,7 @@ import useTheme from '../../hooks/useTheme'
import
{
Lock
}
from
'
react-feather
'
import
{
Lock
}
from
'
react-feather
'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
FiatValue
}
from
'
./FiatValue
'
import
{
FiatValue
}
from
'
./FiatValue
'
import
{
format
TokenAmount
}
from
'
utils/formatToken
Amount
'
import
{
format
CurrencyAmount
}
from
'
utils/formatCurrency
Amount
'
const
InputPanel
=
styled
.
div
<
{
hideInput
?:
boolean
}
>
`
const
InputPanel
=
styled
.
div
<
{
hideInput
?:
boolean
}
>
`
${({
theme
})
=>
theme
.
flexColumnNoWrap
}
${({
theme
})
=>
theme
.
flexColumnNoWrap
}
...
@@ -160,7 +160,7 @@ interface CurrencyInputPanelProps {
...
@@ -160,7 +160,7 @@ interface CurrencyInputPanelProps {
priceImpact
?:
Percent
priceImpact
?:
Percent
id
:
string
id
:
string
showCommonBases
?:
boolean
showCommonBases
?:
boolean
customBalanceText
?:
string
renderBalance
?:
(
amount
:
CurrencyAmount
<
Currency
>
)
=>
ReactNode
locked
?:
boolean
locked
?:
boolean
}
}
...
@@ -174,7 +174,7 @@ export default function CurrencyInputPanel({
...
@@ -174,7 +174,7 @@ export default function CurrencyInputPanel({
otherCurrency
,
otherCurrency
,
id
,
id
,
showCommonBases
,
showCommonBases
,
customBalanceText
,
renderBalance
,
fiatValue
,
fiatValue
,
priceImpact
,
priceImpact
,
hideBalance
=
false
,
hideBalance
=
false
,
...
@@ -266,12 +266,15 @@ export default function CurrencyInputPanel({
...
@@ -266,12 +266,15 @@ export default function CurrencyInputPanel({
fontSize=
{
14
}
fontSize=
{
14
}
style=
{
{
display
:
'
inline
'
,
cursor
:
'
pointer
'
}
}
style=
{
{
display
:
'
inline
'
,
cursor
:
'
pointer
'
}
}
>
>
{
!
hideBalance
&&
!!
currency
&&
selectedCurrencyBalance
{
!
hideBalance
&&
currency
&&
selectedCurrencyBalance
?
(
?
(
customBalanceText
??
'
Balance:
'
)
+
renderBalance
?
(
formatTokenAmount
(
selectedCurrencyBalance
,
4
)
+
renderBalance
(
selectedCurrencyBalance
)
'
'
+
)
:
(
currency
.
symbol
<
Trans
>
:
''
}
Balance:
{
formatCurrencyAmount
(
selectedCurrencyBalance
,
4
)
}
{
currency
.
symbol
}
</
Trans
>
)
)
:
null
}
</
TYPE
.
body
>
</
TYPE
.
body
>
{
showMaxButton
&&
selectedCurrencyBalance
?
(
{
showMaxButton
&&
selectedCurrencyBalance
?
(
<
StyledBalanceMax
onClick=
{
onMax
}
>
<
StyledBalanceMax
onClick=
{
onMax
}
>
...
...
src/components/InputStepCounter/InputStepCounter.tsx
View file @
58a1be84
import
React
,
{
useState
,
useCallback
,
useEffect
}
from
'
react
'
import
React
,
{
useState
,
useCallback
,
useEffect
,
ReactNode
}
from
'
react
'
import
{
LightCard
}
from
'
components/Card
'
import
{
LightCard
}
from
'
components/Card
'
import
{
RowBetween
}
from
'
components/Row
'
import
{
RowBetween
}
from
'
components/Row
'
import
{
Input
as
NumericalInput
}
from
'
../NumericalInput
'
import
{
Input
as
NumericalInput
}
from
'
../NumericalInput
'
...
@@ -60,7 +60,7 @@ interface StepCounterProps {
...
@@ -60,7 +60,7 @@ interface StepCounterProps {
label
?:
string
label
?:
string
width
?:
string
width
?:
string
locked
?:
boolean
// disable input
locked
?:
boolean
// disable input
title
:
string
title
:
ReactNode
tokenA
:
string
|
undefined
tokenA
:
string
|
undefined
tokenB
:
string
|
undefined
tokenB
:
string
|
undefined
}
}
...
...
src/components/PositionListItem/index.tsx
View file @
58a1be84
...
@@ -9,7 +9,7 @@ import styled from 'styled-components/macro'
...
@@ -9,7 +9,7 @@ import styled from 'styled-components/macro'
import
{
HideSmall
,
MEDIA_WIDTHS
,
SmallOnly
}
from
'
theme
'
import
{
HideSmall
,
MEDIA_WIDTHS
,
SmallOnly
}
from
'
theme
'
import
{
PositionDetails
}
from
'
types/position
'
import
{
PositionDetails
}
from
'
types/position
'
import
{
WETH9
,
Price
,
Token
,
Percent
}
from
'
@uniswap/sdk-core
'
import
{
WETH9
,
Price
,
Token
,
Percent
}
from
'
@uniswap/sdk-core
'
import
{
formatPrice
}
from
'
utils/format
Token
Amount
'
import
{
formatPrice
}
from
'
utils/format
Currency
Amount
'
import
Loader
from
'
components/Loader
'
import
Loader
from
'
components/Loader
'
import
{
unwrappedToken
}
from
'
utils/unwrappedToken
'
import
{
unwrappedToken
}
from
'
utils/unwrappedToken
'
import
RangeBadge
from
'
components/Badge/RangeBadge
'
import
RangeBadge
from
'
components/Badge/RangeBadge
'
...
...
src/components/RangeSelector/index.tsx
View file @
58a1be84
import
{
Trans
}
from
'
@lingui/macro
'
import
React
from
'
react
'
import
React
from
'
react
'
import
{
Currency
,
Price
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
Price
,
Token
}
from
'
@uniswap/sdk-core
'
import
StepCounter
from
'
components/InputStepCounter/InputStepCounter
'
import
StepCounter
from
'
components/InputStepCounter/InputStepCounter
'
...
@@ -46,7 +47,7 @@ export default function RangeSelector({
...
@@ -46,7 +47,7 @@ export default function RangeSelector({
increment=
{
isSorted
?
getIncrementLower
:
getDecrementUpper
}
increment=
{
isSorted
?
getIncrementLower
:
getDecrementUpper
}
feeAmount=
{
feeAmount
}
feeAmount=
{
feeAmount
}
label=
{
leftPrice
?
`${currencyB?.symbol}`
:
'
-
'
}
label=
{
leftPrice
?
`${currencyB?.symbol}`
:
'
-
'
}
title=
{
'
Min Price
'
}
title=
{
<
Trans
>
Min Price
</
Trans
>
}
tokenA=
{
currencyA
?.
symbol
}
tokenA=
{
currencyA
?.
symbol
}
tokenB=
{
currencyB
?.
symbol
}
tokenB=
{
currencyB
?.
symbol
}
/>
/>
...
@@ -60,7 +61,7 @@ export default function RangeSelector({
...
@@ -60,7 +61,7 @@ export default function RangeSelector({
label=
{
rightPrice
?
`${currencyB?.symbol}`
:
'
-
'
}
label=
{
rightPrice
?
`${currencyB?.symbol}`
:
'
-
'
}
tokenA=
{
currencyA
?.
symbol
}
tokenA=
{
currencyA
?.
symbol
}
tokenB=
{
currencyB
?.
symbol
}
tokenB=
{
currencyB
?.
symbol
}
title=
{
'
Max Price
'
}
title=
{
<
Trans
>
Max Price
</
Trans
>
}
/>
/>
</
RowBetween
>
</
RowBetween
>
)
)
...
...
src/components/earn/StakingModal.tsx
View file @
58a1be84
import
React
,
{
useState
,
useCallback
}
from
'
react
'
import
React
,
{
useState
,
useCallback
}
from
'
react
'
import
{
useV2LiquidityTokenPermit
}
from
'
../../hooks/useERC20Permit
'
import
{
useV2LiquidityTokenPermit
}
from
'
../../hooks/useERC20Permit
'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
useTransactionDeadline
from
'
../../hooks/useTransactionDeadline
'
import
{
formatCurrencyAmount
}
from
'
../../utils/formatCurrencyAmount
'
import
Modal
from
'
../Modal
'
import
Modal
from
'
../Modal
'
import
{
AutoColumn
}
from
'
../Column
'
import
{
AutoColumn
}
from
'
../Column
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
...
@@ -167,7 +168,7 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
...
@@ -167,7 +168,7 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
currency=
{
stakingInfo
.
stakedAmount
.
currency
}
currency=
{
stakingInfo
.
stakedAmount
.
currency
}
pair=
{
dummyPair
}
pair=
{
dummyPair
}
label=
{
''
}
label=
{
''
}
customBalanceText=
{
t
`Available to deposit:`
}
renderBalance=
{
(
amount
)
=>
<
Trans
>
Available to deposit:
{
formatCurrencyAmount
(
amount
,
4
)
}
</
Trans
>
}
id=
"stake-liquidity-token"
id=
"stake-liquidity-token"
/>
/>
...
...
src/components/vote/DelegateModal.tsx
View file @
58a1be84
...
@@ -15,7 +15,7 @@ import useENS from '../../hooks/useENS'
...
@@ -15,7 +15,7 @@ import useENS from '../../hooks/useENS'
import
{
useDelegateCallback
}
from
'
../../state/governance/hooks
'
import
{
useDelegateCallback
}
from
'
../../state/governance/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
useTokenBalance
}
from
'
../../state/wallet/hooks
'
import
{
LoadingView
,
SubmittedView
}
from
'
../ModalViews
'
import
{
LoadingView
,
SubmittedView
}
from
'
../ModalViews
'
import
{
format
TokenAmount
}
from
'
utils/formatToken
Amount
'
import
{
format
CurrencyAmount
}
from
'
utils/formatCurrency
Amount
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
const
ContentWrapper
=
styled
(
AutoColumn
)
`
const
ContentWrapper
=
styled
(
AutoColumn
)
`
...
@@ -122,7 +122,7 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
...
@@ -122,7 +122,7 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
<
TYPE
.
largeHeader
>
<
TYPE
.
largeHeader
>
{
usingDelegate
?
<
Trans
>
Delegating votes
</
Trans
>
:
<
Trans
>
Unlocking Votes
</
Trans
>
}
{
usingDelegate
?
<
Trans
>
Delegating votes
</
Trans
>
:
<
Trans
>
Unlocking Votes
</
Trans
>
}
</
TYPE
.
largeHeader
>
</
TYPE
.
largeHeader
>
<
TYPE
.
main
fontSize=
{
36
}
>
{
format
Token
Amount
(
uniBalance
,
4
)
}
</
TYPE
.
main
>
<
TYPE
.
main
fontSize=
{
36
}
>
{
format
Currency
Amount
(
uniBalance
,
4
)
}
</
TYPE
.
main
>
</
AutoColumn
>
</
AutoColumn
>
</
LoadingView
>
</
LoadingView
>
)
}
)
}
...
@@ -132,7 +132,7 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
...
@@ -132,7 +132,7 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
<
TYPE
.
largeHeader
>
<
TYPE
.
largeHeader
>
<
Trans
>
Transaction Submitted
</
Trans
>
<
Trans
>
Transaction Submitted
</
Trans
>
</
TYPE
.
largeHeader
>
</
TYPE
.
largeHeader
>
<
TYPE
.
main
fontSize=
{
36
}
>
{
format
Token
Amount
(
uniBalance
,
4
)
}
</
TYPE
.
main
>
<
TYPE
.
main
fontSize=
{
36
}
>
{
format
Currency
Amount
(
uniBalance
,
4
)
}
</
TYPE
.
main
>
</
AutoColumn
>
</
AutoColumn
>
</
SubmittedView
>
</
SubmittedView
>
)
}
)
}
...
...
src/components/vote/VoteModal.tsx
View file @
58a1be84
...
@@ -12,7 +12,7 @@ import { ButtonPrimary } from '../Button'
...
@@ -12,7 +12,7 @@ import { ButtonPrimary } from '../Button'
import
Circle
from
'
../../assets/images/blue-loader.svg
'
import
Circle
from
'
../../assets/images/blue-loader.svg
'
import
{
useVoteCallback
,
useUserVotes
}
from
'
../../state/governance/hooks
'
import
{
useVoteCallback
,
useUserVotes
}
from
'
../../state/governance/hooks
'
import
{
ExternalLink
}
from
'
../../theme/components
'
import
{
ExternalLink
}
from
'
../../theme/components
'
import
{
format
TokenAmount
}
from
'
utils/formatToken
Amount
'
import
{
format
CurrencyAmount
}
from
'
utils/formatCurrency
Amount
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
CurrencyAmount
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
...
@@ -99,7 +99,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, support }: Vo
...
@@ -99,7 +99,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, support }: Vo
<
StyledClosed
stroke=
"black"
onClick=
{
wrappedOndismiss
}
/>
<
StyledClosed
stroke=
"black"
onClick=
{
wrappedOndismiss
}
/>
</
RowBetween
>
</
RowBetween
>
<
TYPE
.
largeHeader
>
<
TYPE
.
largeHeader
>
<
Trans
>
{
format
Token
Amount
(
availableVotes
,
4
)
}
Votes
</
Trans
>
<
Trans
>
{
format
Currency
Amount
(
availableVotes
,
4
)
}
Votes
</
Trans
>
</
TYPE
.
largeHeader
>
</
TYPE
.
largeHeader
>
<
ButtonPrimary
onClick=
{
onVote
}
>
<
ButtonPrimary
onClick=
{
onVote
}
>
<
TYPE
.
mediumHeader
color=
"white"
>
<
TYPE
.
mediumHeader
color=
"white"
>
...
...
src/pages/AddLiquidity/index.tsx
View file @
58a1be84
...
@@ -579,13 +579,15 @@ export default function AddLiquidity({
...
@@ -579,13 +579,15 @@ export default function AddLiquidity({
)
:
null
}
)
:
null
}
</
RowBetween
>
</
RowBetween
>
<
TYPE
.
main
fontSize=
{
14
}
fontWeight=
{
400
}
style=
{
{
marginBottom
:
'
.5rem
'
,
lineHeight
:
'
125%
'
}
}
>
<
TYPE
.
main
fontSize=
{
14
}
fontWeight=
{
400
}
style=
{
{
marginBottom
:
'
.5rem
'
,
lineHeight
:
'
125%
'
}
}
>
Your liquidity will only earn fees when the market price of the pair is within your range.
{
'
'
}
<
Trans
>
<
ExternalLink
Your liquidity will only earn fees when the market price of the pair is within your range.
{
'
'
}
href=
{
'
https://docs.uniswap.org/concepts/introduction/liquidity-user-guide#4-set-price-range
'
}
<
ExternalLink
style=
{
{
fontSize
:
'
14px
'
}
}
href=
{
'
https://docs.uniswap.org/concepts/introduction/liquidity-user-guide#4-set-price-range
'
}
>
style=
{
{
fontSize
:
'
14px
'
}
}
Need help picking a range?
>
</
ExternalLink
>
Need help picking a range?
</
ExternalLink
>
</
Trans
>
</
TYPE
.
main
>
</
TYPE
.
main
>
<
RangeSelector
<
RangeSelector
...
@@ -606,7 +608,7 @@ export default function AddLiquidity({
...
@@ -606,7 +608,7 @@ export default function AddLiquidity({
<
LightCard
style=
{
{
padding
:
'
12px
'
}
}
>
<
LightCard
style=
{
{
padding
:
'
12px
'
}
}
>
<
AutoColumn
gap=
"4px"
>
<
AutoColumn
gap=
"4px"
>
<
TYPE
.
main
fontWeight=
{
500
}
textAlign=
"center"
fontSize=
{
12
}
>
<
TYPE
.
main
fontWeight=
{
500
}
textAlign=
"center"
fontSize=
{
12
}
>
Current Price
<
Trans
>
Current Price
</
Trans
>
</
TYPE
.
main
>
</
TYPE
.
main
>
<
TYPE
.
body
fontWeight=
{
500
}
textAlign=
"center"
fontSize=
{
20
}
>
<
TYPE
.
body
fontWeight=
{
500
}
textAlign=
"center"
fontSize=
{
20
}
>
<
HoverInlineText
<
HoverInlineText
...
...
src/pages/MigrateV2/MigrateV2Pair.tsx
View file @
58a1be84
...
@@ -41,7 +41,7 @@ import RangeSelector from 'components/RangeSelector'
...
@@ -41,7 +41,7 @@ import RangeSelector from 'components/RangeSelector'
import
RateToggle
from
'
components/RateToggle
'
import
RateToggle
from
'
components/RateToggle
'
import
{
Contract
}
from
'
@ethersproject/contracts
'
import
{
Contract
}
from
'
@ethersproject/contracts
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
useCurrentBlockTimestamp
from
'
hooks/useCurrentBlockTimestamp
'
import
{
format
TokenAmount
}
from
'
utils/formatToken
Amount
'
import
{
format
CurrencyAmount
}
from
'
utils/formatCurrency
Amount
'
import
useTheme
from
'
hooks/useTheme
'
import
useTheme
from
'
hooks/useTheme
'
import
{
unwrappedToken
}
from
'
utils/unwrappedToken
'
import
{
unwrappedToken
}
from
'
utils/unwrappedToken
'
import
DoubleCurrencyLogo
from
'
components/DoubleLogo
'
import
DoubleCurrencyLogo
from
'
components/DoubleLogo
'
...
@@ -592,9 +592,10 @@ function V2PairMigration({
...
@@ -592,9 +592,10 @@ function V2PairMigration({
{
chainId
&&
refund0
&&
refund1
?
(
{
chainId
&&
refund0
&&
refund1
?
(
<
TYPE
.
black
fontSize=
{
12
}
>
<
TYPE
.
black
fontSize=
{
12
}
>
<
Trans
>
<
Trans
>
At least
{
formatTokenAmount
(
refund0
,
4
)
}
{
token0
.
equals
(
WETH9
[
chainId
])
?
'
ETH
'
:
token0
.
symbol
}{
'
'
}
At least
{
formatCurrencyAmount
(
refund0
,
4
)
}{
'
'
}
and
{
formatTokenAmount
(
refund1
,
4
)
}
{
token1
.
equals
(
WETH9
[
chainId
])
?
'
ETH
'
:
token1
.
symbol
}
will
{
token0
.
equals
(
WETH9
[
chainId
])
?
'
ETH
'
:
token0
.
symbol
}
and
{
formatCurrencyAmount
(
refund1
,
4
)
}{
'
'
}
be refunded to your wallet due to selected price range.
{
token1
.
equals
(
WETH9
[
chainId
])
?
'
ETH
'
:
token1
.
symbol
}
will be refunded to your wallet due to
selected price range.
</
Trans
>
</
Trans
>
</
TYPE
.
black
>
</
TYPE
.
black
>
)
:
null
}
)
:
null
}
...
...
src/pages/Pool/PositionPage.tsx
View file @
58a1be84
...
@@ -21,7 +21,7 @@ import { DarkCard, LightCard } from 'components/Card'
...
@@ -21,7 +21,7 @@ import { DarkCard, LightCard } from 'components/Card'
import
CurrencyLogo
from
'
components/CurrencyLogo
'
import
CurrencyLogo
from
'
components/CurrencyLogo
'
import
{
t
,
Trans
}
from
'
@lingui/macro
'
import
{
t
,
Trans
}
from
'
@lingui/macro
'
import
{
currencyId
}
from
'
utils/currencyId
'
import
{
currencyId
}
from
'
utils/currencyId
'
import
{
format
TokenAmount
}
from
'
utils/formatToken
Amount
'
import
{
format
CurrencyAmount
}
from
'
utils/formatCurrency
Amount
'
import
{
useV3PositionFees
}
from
'
hooks/useV3PositionFees
'
import
{
useV3PositionFees
}
from
'
hooks/useV3PositionFees
'
import
{
BigNumber
}
from
'
@ethersproject/bignumber
'
import
{
BigNumber
}
from
'
@ethersproject/bignumber
'
import
{
Token
,
Currency
,
CurrencyAmount
,
Percent
,
Fraction
,
Price
}
from
'
@uniswap/sdk-core
'
import
{
Token
,
Currency
,
CurrencyAmount
,
Percent
,
Fraction
,
Price
}
from
'
@uniswap/sdk-core
'
...
@@ -456,14 +456,14 @@ export function PositionPage({
...
@@ -456,14 +456,14 @@ export function PositionPage({
<
RowBetween
>
<
RowBetween
>
<
RowFixed
>
<
RowFixed
>
<
CurrencyLogo
currency=
{
feeValueUpper
?.
currency
}
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
CurrencyLogo
currency=
{
feeValueUpper
?.
currency
}
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
TYPE
.
main
>
{
feeValueUpper
?
format
Token
Amount
(
feeValueUpper
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
<
TYPE
.
main
>
{
feeValueUpper
?
format
Currency
Amount
(
feeValueUpper
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
</
RowFixed
>
</
RowFixed
>
<
TYPE
.
main
>
{
feeValueUpper
?.
currency
?.
symbol
}
</
TYPE
.
main
>
<
TYPE
.
main
>
{
feeValueUpper
?.
currency
?.
symbol
}
</
TYPE
.
main
>
</
RowBetween
>
</
RowBetween
>
<
RowBetween
>
<
RowBetween
>
<
RowFixed
>
<
RowFixed
>
<
CurrencyLogo
currency=
{
feeValueLower
?.
currency
}
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
CurrencyLogo
currency=
{
feeValueLower
?.
currency
}
size=
{
'
20px
'
}
style=
{
{
marginRight
:
'
0.5rem
'
}
}
/>
<
TYPE
.
main
>
{
feeValueLower
?
format
Token
Amount
(
feeValueLower
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
<
TYPE
.
main
>
{
feeValueLower
?
format
Currency
Amount
(
feeValueLower
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
</
RowFixed
>
</
RowFixed
>
<
TYPE
.
main
>
{
feeValueLower
?.
currency
?.
symbol
}
</
TYPE
.
main
>
<
TYPE
.
main
>
{
feeValueLower
?.
currency
?.
symbol
}
</
TYPE
.
main
>
</
RowBetween
>
</
RowBetween
>
...
@@ -708,7 +708,7 @@ export function PositionPage({
...
@@ -708,7 +708,7 @@ export function PositionPage({
<
TYPE
.
main
>
{
feeValueUpper
?.
currency
?.
symbol
}
</
TYPE
.
main
>
<
TYPE
.
main
>
{
feeValueUpper
?.
currency
?.
symbol
}
</
TYPE
.
main
>
</
RowFixed
>
</
RowFixed
>
<
RowFixed
>
<
RowFixed
>
<
TYPE
.
main
>
{
feeValueUpper
?
format
Token
Amount
(
feeValueUpper
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
<
TYPE
.
main
>
{
feeValueUpper
?
format
Currency
Amount
(
feeValueUpper
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
</
RowFixed
>
</
RowFixed
>
</
RowBetween
>
</
RowBetween
>
<
RowBetween
>
<
RowBetween
>
...
@@ -721,7 +721,7 @@ export function PositionPage({
...
@@ -721,7 +721,7 @@ export function PositionPage({
<
TYPE
.
main
>
{
feeValueLower
?.
currency
?.
symbol
}
</
TYPE
.
main
>
<
TYPE
.
main
>
{
feeValueLower
?.
currency
?.
symbol
}
</
TYPE
.
main
>
</
RowFixed
>
</
RowFixed
>
<
RowFixed
>
<
RowFixed
>
<
TYPE
.
main
>
{
feeValueLower
?
format
Token
Amount
(
feeValueLower
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
<
TYPE
.
main
>
{
feeValueLower
?
format
Currency
Amount
(
feeValueLower
,
4
)
:
'
-
'
}
</
TYPE
.
main
>
</
RowFixed
>
</
RowFixed
>
</
RowBetween
>
</
RowBetween
>
</
AutoColumn
>
</
AutoColumn
>
...
...
src/utils/format
Token
Amount.ts
→
src/utils/format
Currency
Amount.ts
View file @
58a1be84
import
{
Price
,
CurrencyAmount
,
Currency
,
Fraction
}
from
'
@uniswap/sdk-core
'
import
{
Price
,
CurrencyAmount
,
Currency
,
Fraction
}
from
'
@uniswap/sdk-core
'
import
JSBI
from
'
jsbi
'
import
JSBI
from
'
jsbi
'
export
function
format
Token
Amount
(
amount
:
CurrencyAmount
<
Currency
>
|
undefined
,
sigFigs
:
number
)
{
export
function
format
Currency
Amount
(
amount
:
CurrencyAmount
<
Currency
>
|
undefined
,
sigFigs
:
number
)
{
if
(
!
amount
)
{
if
(
!
amount
)
{
return
'
-
'
return
'
-
'
}
}
...
...
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