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
92193076
Unverified
Commit
92193076
authored
May 05, 2021
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
https://github.com/Uniswap/v3-interface/issues/161
parent
1aab0866
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
index.tsx
src/components/CurrencyInputPanel/index.tsx
+1
-1
index.tsx
src/pages/AddLiquidity/index.tsx
+8
-0
No files found.
src/components/CurrencyInputPanel/index.tsx
View file @
92193076
...
@@ -159,7 +159,7 @@ interface CurrencyInputPanelProps {
...
@@ -159,7 +159,7 @@ interface CurrencyInputPanelProps {
pair
?:
Pair
|
null
pair
?:
Pair
|
null
hideInput
?:
boolean
hideInput
?:
boolean
otherCurrency
?:
Currency
|
null
otherCurrency
?:
Currency
|
null
fiatValue
?:
CurrencyAmount
fiatValue
?:
CurrencyAmount
|
null
priceImpact
?:
Percent
priceImpact
?:
Percent
id
:
string
id
:
string
showCommonBases
?:
boolean
showCommonBases
?:
boolean
...
...
src/pages/AddLiquidity/index.tsx
View file @
92193076
...
@@ -15,6 +15,7 @@ import TransactionConfirmationModal, { ConfirmationModalContent } from '../../co
...
@@ -15,6 +15,7 @@ import TransactionConfirmationModal, { ConfirmationModalContent } from '../../co
import
CurrencyInputPanel
from
'
../../components/CurrencyInputPanel
'
import
CurrencyInputPanel
from
'
../../components/CurrencyInputPanel
'
import
{
RowBetween
}
from
'
../../components/Row
'
import
{
RowBetween
}
from
'
../../components/Row
'
import
{
useIsSwapUnsupported
}
from
'
../../hooks/useIsSwapUnsupported
'
import
{
useIsSwapUnsupported
}
from
'
../../hooks/useIsSwapUnsupported
'
import
{
useUSDCValue
}
from
'
../../hooks/useUSDCPrice
'
import
Review
from
'
./Review
'
import
Review
from
'
./Review
'
import
{
useActiveWeb3React
}
from
'
../../hooks
'
import
{
useActiveWeb3React
}
from
'
../../hooks
'
import
{
useCurrency
}
from
'
../../hooks/Tokens
'
import
{
useCurrency
}
from
'
../../hooks/Tokens
'
...
@@ -156,6 +157,11 @@ export default function AddLiquidity({
...
@@ -156,6 +157,11 @@ export default function AddLiquidity({
[
dependentField
]:
parsedAmounts
[
dependentField
]?.
toSignificant
(
6
)
??
''
,
[
dependentField
]:
parsedAmounts
[
dependentField
]?.
toSignificant
(
6
)
??
''
,
}
}
const
usdcValues
=
{
[
Field
.
CURRENCY_A
]:
useUSDCValue
(
parsedAmounts
[
Field
.
CURRENCY_A
]),
[
Field
.
CURRENCY_B
]:
useUSDCValue
(
parsedAmounts
[
Field
.
CURRENCY_B
]),
}
// get the max amounts user can add
// get the max amounts user can add
const
maxAmounts
:
{
[
field
in
Field
]?:
TokenAmount
}
=
[
Field
.
CURRENCY_A
,
Field
.
CURRENCY_B
].
reduce
(
const
maxAmounts
:
{
[
field
in
Field
]?:
TokenAmount
}
=
[
Field
.
CURRENCY_A
,
Field
.
CURRENCY_B
].
reduce
(
(
accumulator
,
field
)
=>
{
(
accumulator
,
field
)
=>
{
...
@@ -588,6 +594,7 @@ export default function AddLiquidity({
...
@@ -588,6 +594,7 @@ export default function AddLiquidity({
showMaxButton=
{
!
atMaxAmounts
[
Field
.
CURRENCY_A
]
}
showMaxButton=
{
!
atMaxAmounts
[
Field
.
CURRENCY_A
]
}
currency=
{
currencies
[
Field
.
CURRENCY_A
]
}
currency=
{
currencies
[
Field
.
CURRENCY_A
]
}
id=
"add-liquidity-input-tokena"
id=
"add-liquidity-input-tokena"
fiatValue=
{
usdcValues
[
Field
.
CURRENCY_A
]
}
showCommonBases
showCommonBases
locked=
{
depositADisabled
}
locked=
{
depositADisabled
}
/>
/>
...
@@ -599,6 +606,7 @@ export default function AddLiquidity({
...
@@ -599,6 +606,7 @@ export default function AddLiquidity({
onFieldBInput
(
maxAmounts
[
Field
.
CURRENCY_B
]?.
toExact
()
??
''
)
onFieldBInput
(
maxAmounts
[
Field
.
CURRENCY_B
]?.
toExact
()
??
''
)
}
}
}
}
showMaxButton=
{
!
atMaxAmounts
[
Field
.
CURRENCY_B
]
}
showMaxButton=
{
!
atMaxAmounts
[
Field
.
CURRENCY_B
]
}
fiatValue=
{
usdcValues
[
Field
.
CURRENCY_B
]
}
currency=
{
currencies
[
Field
.
CURRENCY_B
]
}
currency=
{
currencies
[
Field
.
CURRENCY_B
]
}
id=
"add-liquidity-input-tokenb"
id=
"add-liquidity-input-tokenb"
showCommonBases
showCommonBases
...
...
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