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
1c83a87f
Commit
1c83a87f
authored
Nov 01, 2018
by
Chi Kei Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Pending Tx to Pool functions
parent
75ea2d3d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
AddLiquidity.js
src/pages/Pool/AddLiquidity.js
+3
-1
CreateExchange.js
src/pages/Pool/CreateExchange.js
+3
-1
RemoveLiquidity.js
src/pages/Pool/RemoveLiquidity.js
+4
-1
No files found.
src/pages/Pool/AddLiquidity.js
View file @
1c83a87f
...
...
@@ -7,7 +7,7 @@ import CurrencyInputPanel from '../../components/CurrencyInputPanel';
import
OversizedPanel
from
'
../../components/OversizedPanel
'
;
import
NavigationTabs
from
'
../../components/NavigationTabs
'
;
import
Modal
from
'
../../components/Modal
'
;
import
{
selectors
}
from
'
../../ducks/web3connect
'
;
import
{
selectors
,
addPendingTx
}
from
'
../../ducks/web3connect
'
;
import
ArrowDown
from
'
../../assets/images/plus-blue.svg
'
;
import
DropdownBlue
from
"
../../assets/images/dropdown-blue.svg
"
;
import
DropupBlue
from
"
../../assets/images/dropup-blue.svg
"
;
...
...
@@ -168,6 +168,7 @@ class AddLiquidity extends Component {
value
:
ethAmount
.
toFixed
(
0
)
},
(
err
,
data
)
=>
{
this
.
reset
();
this
.
props
.
addPendingTx
(
data
);
if
(
data
)
{
ReactGA
.
event
({
category
:
'
Pool
'
,
...
...
@@ -617,6 +618,7 @@ export default connect(
}),
dispatch
=>
({
selectors
:
()
=>
dispatch
(
selectors
()),
addPendingTx
:
id
=>
dispatch
(
addPendingTx
(
id
)),
})
)(
AddLiquidity
);
...
...
src/pages/Pool/CreateExchange.js
View file @
1c83a87f
...
...
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import
{
connect
}
from
'
react-redux
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
withRouter
}
from
'
react-router-dom
'
;
import
{
selectors
}
from
"
../../ducks/web3connect
"
;
import
{
selectors
,
addPendingTx
}
from
"
../../ducks/web3connect
"
;
import
classnames
from
"
classnames
"
;
import
NavigationTabs
from
"
../../components/NavigationTabs
"
;
import
ModeSelector
from
"
./ModeSelector
"
;
...
...
@@ -125,6 +125,7 @@ class CreateExchange extends Component {
decimals
:
0
,
tokenAddress
:
''
,
});
this
.
props
.
addPendingTx
(
data
);
ReactGA
.
event
({
category
:
'
Pool
'
,
action
:
'
CreateExchange
'
,
...
...
@@ -229,6 +230,7 @@ export default withRouter(
dispatch
=>
({
selectors
:
()
=>
dispatch
(
selectors
()),
addExchange
:
opts
=>
dispatch
(
addExchange
(
opts
)),
addPendingTx
:
id
=>
dispatch
(
addPendingTx
(
id
)),
})
)(
CreateExchange
)
);
src/pages/Pool/RemoveLiquidity.js
View file @
1c83a87f
...
...
@@ -6,7 +6,7 @@ import { BigNumber as BN } from 'bignumber.js';
import
NavigationTabs
from
"
../../components/NavigationTabs
"
;
import
ModeSelector
from
"
./ModeSelector
"
;
import
CurrencyInputPanel
from
"
../../components/CurrencyInputPanel
"
;
import
{
selectors
}
from
'
../../ducks/web3connect
'
;
import
{
selectors
,
addPendingTx
}
from
'
../../ducks/web3connect
'
;
import
OversizedPanel
from
"
../../components/OversizedPanel
"
;
import
ArrowPlus
from
"
../../assets/images/arrow-down-blue.svg
"
;
import
EXCHANGE_ABI
from
"
../../abi/exchange
"
;
...
...
@@ -115,6 +115,8 @@ class RemoveLiquidity extends Component {
).
send
({
from
:
account
},
(
err
,
data
)
=>
{
if
(
data
)
{
this
.
reset
();
this
.
props
.
addPendingTx
(
data
);
ReactGA
.
event
({
category
:
'
Pool
'
,
action
:
'
RemoveLiquidity
'
,
...
...
@@ -306,5 +308,6 @@ export default connect(
}),
dispatch
=>
({
selectors
:
()
=>
dispatch
(
selectors
()),
addPendingTx
:
id
=>
dispatch
(
addPendingTx
(
id
)),
})
)(
RemoveLiquidity
);
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