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
6c57d782
Commit
6c57d782
authored
Dec 11, 2018
by
Kenny Tran
Committed by
Chi Kei Chan
Dec 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add different transaction details for 1st liquidity (#133)
parent
966a2800
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
AddLiquidity.js
src/pages/Pool/AddLiquidity.js
+12
-1
No files found.
src/pages/Pool/AddLiquidity.js
View file @
6c57d782
...
...
@@ -444,6 +444,17 @@ class AddLiquidity extends Component {
const
{
value
:
ethReserve
}
=
selectors
().
getBalance
(
fromToken
[
outputCurrency
]);
const
{
decimals
:
poolTokenDecimals
}
=
selectors
().
getBalance
(
account
,
fromToken
[
outputCurrency
]);
if
(
this
.
isNewExchange
())
{
return
(
<
div
>
<
div
className
=
"
pool__summary-modal__item
"
>
You
are
adding
{
b
(
`
${
inputValue
}
ETH`
)}
and
{
b
(
`
${
outputValue
}
${
label
}
`
)}
to
the
liquidity
pool
.
<
/div
>
<
div
className
=
"
pool__summary-modal__item
"
>
You
are
setting
the
initial
exchange
rate
to
{
b
(
`1 ETH =
${
BN
(
outputValue
).
dividedBy
(
inputValue
).
toFixed
(
4
)}
${
label
}
`
)}.
<
/div
>
<
div
className
=
"
pool__summary-modal__item
"
>
You
will
mint
{
b
(
`
${
inputValue
}
liquidity tokens`
)}.
<
/div
>
<
div
className
=
"
pool__summary-modal__item
"
>
Current
total
supply
of
liquidity
tokens
is
0
.
<
/div
>
<
/div
>
);
}
const
SLIPPAGE
=
0.025
;
const
minOutput
=
BN
(
outputValue
).
multipliedBy
(
1
-
SLIPPAGE
);
const
maxOutput
=
BN
(
outputValue
).
multipliedBy
(
1
+
SLIPPAGE
);
...
...
@@ -522,7 +533,7 @@ class AddLiquidity extends Component {
<
/OversizedPanel
>
<
CurrencyInputPanel
title
=
"
Deposit
"
description
=
"
(estimated)
"
description
=
{
this
.
isNewExchange
()
?
'
(estimated)
'
:
''
}
extraText
=
{
this
.
getBalance
(
outputCurrency
)}
selectedTokenAddress
=
{
outputCurrency
}
onCurrencySelected
=
{
currency
=>
{
...
...
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