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
47386298
Commit
47386298
authored
Oct 22, 2018
by
Kenny Tran
Committed by
Chi Kei Chan
Oct 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset after confirmed swap (#70)
parent
6ea7b6ac
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
57 deletions
+70
-57
index.js
src/components/CurrencyInputPanel/index.js
+3
-4
index.js
src/components/Web3Status/index.js
+0
-1
swap.js
src/ducks/swap.js
+18
-9
approval-utils.js
src/helpers/approval-utils.js
+0
-11
contract-utils.js
src/helpers/contract-utils.js
+11
-0
exchange-utils.js
src/helpers/exchange-utils.js
+6
-6
index.js
src/pages/Swap/index.js
+32
-26
No files found.
src/components/CurrencyInputPanel/index.js
View file @
47386298
...
@@ -44,12 +44,14 @@ class CurrencyInputPanel extends Component {
...
@@ -44,12 +44,14 @@ class CurrencyInputPanel extends Component {
}).
isRequired
,
}).
isRequired
,
selectedTokens
:
PropTypes
.
array
.
isRequired
,
selectedTokens
:
PropTypes
.
array
.
isRequired
,
errorMessage
:
PropTypes
.
string
,
errorMessage
:
PropTypes
.
string
,
selectedTokenAddress
:
PropTypes
.
string
,
};
};
static
defaultProps
=
{
static
defaultProps
=
{
selectedTokens
:
[],
selectedTokens
:
[],
onCurrencySelected
()
{},
onCurrencySelected
()
{},
onValueChange
()
{},
onValueChange
()
{},
selectedTokenAddress
:
''
,
};
};
static
contextTypes
=
{
static
contextTypes
=
{
...
@@ -59,7 +61,6 @@ class CurrencyInputPanel extends Component {
...
@@ -59,7 +61,6 @@ class CurrencyInputPanel extends Component {
state
=
{
state
=
{
isShowingModal
:
false
,
isShowingModal
:
false
,
searchQuery
:
''
,
searchQuery
:
''
,
selectedTokenAddress
:
''
,
};
};
createTokenList
=
()
=>
{
createTokenList
=
()
=>
{
...
@@ -80,7 +81,6 @@ class CurrencyInputPanel extends Component {
...
@@ -80,7 +81,6 @@ class CurrencyInputPanel extends Component {
onTokenSelect
=
(
address
)
=>
{
onTokenSelect
=
(
address
)
=>
{
this
.
setState
({
this
.
setState
({
selectedTokenAddress
:
address
||
'
ETH
'
,
searchQuery
:
''
,
searchQuery
:
''
,
isShowingModal
:
false
,
isShowingModal
:
false
,
});
});
...
@@ -195,10 +195,9 @@ class CurrencyInputPanel extends Component {
...
@@ -195,10 +195,9 @@ class CurrencyInputPanel extends Component {
errorMessage
,
errorMessage
,
value
,
value
,
onValueChange
,
onValueChange
,
selectedTokenAddress
,
}
=
this
.
props
;
}
=
this
.
props
;
const
{
selectedTokenAddress
}
=
this
.
state
;
return
(
return
(
<
div
className
=
"
currency-input-panel
"
>
<
div
className
=
"
currency-input-panel
"
>
<
div
className
=
{
classnames
(
'
currency-input-panel__container
'
,
{
<
div
className
=
{
classnames
(
'
currency-input-panel__container
'
,
{
...
...
src/components/Web3Status/index.js
View file @
47386298
...
@@ -72,7 +72,6 @@ class Web3Status extends Component {
...
@@ -72,7 +72,6 @@ class Web3Status extends Component {
render
()
{
render
()
{
const
{
address
,
transactions
,
pendingTransactions
,
hasPendingTransactions
}
=
this
.
props
;
const
{
address
,
transactions
,
pendingTransactions
,
hasPendingTransactions
}
=
this
.
props
;
console
.
count
(
'
hi
'
);
let
text
=
getText
(
address
);
let
text
=
getText
(
address
);
if
(
hasPendingTransactions
)
{
if
(
hasPendingTransactions
)
{
text
=
getPendingText
(
pendingTransactions
);
text
=
getPendingText
(
pendingTransactions
);
...
...
src/ducks/swap.js
View file @
47386298
const
UPDATE_FIELD
=
'
app/swap/updateField
'
;
const
UPDATE_FIELD
=
'
app/swap/updateField
'
;
const
ADD_ERROR
=
'
app/swap/addError
'
;
const
ADD_ERROR
=
'
app/swap/addError
'
;
const
REMOVE_ERROR
=
'
app/swap/removeError
'
;
const
REMOVE_ERROR
=
'
app/swap/removeError
'
;
const
RESET_SWAP
=
'
app/swap/resetSwap
'
;
const
initialState
=
{
const
getInitialState
=
()
=>
{
input
:
''
,
return
{
output
:
''
,
input
:
''
,
inputCurrency
:
''
,
output
:
''
,
outputCurrency
:
''
,
inputCurrency
:
''
,
lastEditedField
:
''
,
outputCurrency
:
''
,
inputErrors
:
[],
lastEditedField
:
''
,
outputErrors
:
[],
inputErrors
:
[],
outputErrors
:
[],
};
};
};
export
const
isValidSwap
=
(
state
)
=>
{
export
const
isValidSwap
=
(
state
)
=>
{
...
@@ -38,6 +41,10 @@ export const removeError = ({ name, value }) => ({
...
@@ -38,6 +41,10 @@ export const removeError = ({ name, value }) => ({
payload
:
{
name
,
value
},
payload
:
{
name
,
value
},
});
});
export
const
resetSwap
=
()
=>
({
type
:
RESET_SWAP
,
});
function
reduceAddError
(
state
,
payload
)
{
function
reduceAddError
(
state
,
payload
)
{
const
{
name
,
value
}
=
payload
;
const
{
name
,
value
}
=
payload
;
let
nextErrors
=
state
[
name
];
let
nextErrors
=
state
[
name
];
...
@@ -60,7 +67,7 @@ function reduceRemoveError(state, payload) {
...
@@ -60,7 +67,7 @@ function reduceRemoveError(state, payload) {
};
};
}
}
export
default
function
swapReducer
(
state
=
initialState
,
{
type
,
payload
})
{
export
default
function
swapReducer
(
state
=
getInitialState
()
,
{
type
,
payload
})
{
switch
(
type
)
{
switch
(
type
)
{
case
UPDATE_FIELD
:
case
UPDATE_FIELD
:
return
{
return
{
...
@@ -71,6 +78,8 @@ export default function swapReducer(state = initialState, { type, payload }) {
...
@@ -71,6 +78,8 @@ export default function swapReducer(state = initialState, { type, payload }) {
return
reduceAddError
(
state
,
payload
);
return
reduceAddError
(
state
,
payload
);
case
REMOVE_ERROR
:
case
REMOVE_ERROR
:
return
reduceRemoveError
(
state
,
payload
);
return
reduceRemoveError
(
state
,
payload
);
case
RESET_SWAP
:
return
getInitialState
();
default
:
default
:
return
state
;
return
state
;
}
}
...
...
src/helpers/approval-utils.js
View file @
47386298
...
@@ -54,14 +54,3 @@ export const approveExchange = async opts => {
...
@@ -54,14 +54,3 @@ export const approveExchange = async opts => {
.
send
({
from
:
account
})
.
send
({
from
:
account
})
// .then((e, d) => console.log(e, d));
// .then((e, d) => console.log(e, d));
};
};
export
const
getApprovalTxStatus
=
opts
=>
{
const
{
drizzleCtx
,
txId
}
=
opts
;
const
st
=
drizzleCtx
.
store
.
getState
();
const
tx
=
st
.
transactionStack
[
txId
];
const
status
=
st
.
transactions
[
tx
]
&&
st
.
transactions
[
tx
].
status
;
return
status
;
};
src/helpers/contract-utils.js
View file @
47386298
...
@@ -48,3 +48,14 @@ export function getBalance({ currency, address, drizzleCtx, contractStore }) {
...
@@ -48,3 +48,14 @@ export function getBalance({ currency, address, drizzleCtx, contractStore }) {
}
}
});
});
}
}
export
const
getTxStatus
=
opts
=>
{
const
{
drizzleCtx
,
txId
}
=
opts
;
const
st
=
drizzleCtx
.
store
.
getState
();
const
tx
=
st
.
transactionStack
[
txId
];
const
status
=
st
.
transactions
[
tx
]
&&
st
.
transactions
[
tx
].
status
;
return
status
;
};
src/helpers/exchange-utils.js
View file @
47386298
...
@@ -214,7 +214,7 @@ const ETH_TO_ERC20 = {
...
@@ -214,7 +214,7 @@ const ETH_TO_ERC20 = {
const
ALLOWED_SLIPPAGE
=
BN
(
0.025
);
const
ALLOWED_SLIPPAGE
=
BN
(
0.025
);
const
outputDecimals
=
await
getDecimals
({
address
:
outputCurrency
,
contractStore
,
drizzleCtx
});
const
outputDecimals
=
await
getDecimals
({
address
:
outputCurrency
,
contractStore
,
drizzleCtx
});
const
minOutput
=
BN
(
output
).
multipliedBy
(
10
**
outputDecimals
).
multipliedBy
(
BN
(
1
).
minus
(
ALLOWED_SLIPPAGE
));
const
minOutput
=
BN
(
output
).
multipliedBy
(
10
**
outputDecimals
).
multipliedBy
(
BN
(
1
).
minus
(
ALLOWED_SLIPPAGE
));
exchange
.
methods
.
ethToTokenSwapInput
.
cacheSend
(
minOutput
.
toFixed
(
0
),
deadline
,
{
return
exchange
.
methods
.
ethToTokenSwapInput
.
cacheSend
(
minOutput
.
toFixed
(
0
),
deadline
,
{
from
:
account
,
from
:
account
,
value
:
BN
(
input
).
multipliedBy
(
10
**
18
).
toFixed
(
0
),
value
:
BN
(
input
).
multipliedBy
(
10
**
18
).
toFixed
(
0
),
});
});
...
@@ -248,7 +248,7 @@ const ETH_TO_ERC20 = {
...
@@ -248,7 +248,7 @@ const ETH_TO_ERC20 = {
const
outputDecimals
=
await
getDecimals
({
address
:
outputCurrency
,
contractStore
,
drizzleCtx
});
const
outputDecimals
=
await
getDecimals
({
address
:
outputCurrency
,
contractStore
,
drizzleCtx
});
const
outputAmount
=
BN
(
output
).
multipliedBy
(
BN
(
10
**
outputDecimals
));
const
outputAmount
=
BN
(
output
).
multipliedBy
(
BN
(
10
**
outputDecimals
));
const
maxInput
=
BN
(
input
).
multipliedBy
(
10
**
18
).
multipliedBy
(
BN
(
1
).
plus
(
ALLOWED_SLIPPAGE
));
const
maxInput
=
BN
(
input
).
multipliedBy
(
10
**
18
).
multipliedBy
(
BN
(
1
).
plus
(
ALLOWED_SLIPPAGE
));
exchange
.
methods
.
ethToTokenSwapOutput
.
cacheSend
(
outputAmount
.
toFixed
(
0
),
deadline
,
{
return
exchange
.
methods
.
ethToTokenSwapOutput
.
cacheSend
(
outputAmount
.
toFixed
(
0
),
deadline
,
{
from
:
account
,
from
:
account
,
value
:
maxInput
.
toFixed
(
0
),
value
:
maxInput
.
toFixed
(
0
),
});
});
...
@@ -374,7 +374,7 @@ const ERC20_TO_ETH = {
...
@@ -374,7 +374,7 @@ const ERC20_TO_ETH = {
const
minOutput
=
BN
(
output
).
multipliedBy
(
10
**
18
).
multipliedBy
(
BN
(
1
).
minus
(
ALLOWED_SLIPPAGE
));
const
minOutput
=
BN
(
output
).
multipliedBy
(
10
**
18
).
multipliedBy
(
BN
(
1
).
minus
(
ALLOWED_SLIPPAGE
));
const
inputAmount
=
BN
(
input
).
multipliedBy
(
10
**
inputDecimals
);
const
inputAmount
=
BN
(
input
).
multipliedBy
(
10
**
inputDecimals
);
exchange
.
methods
.
tokenToEthSwapInput
.
cacheSend
(
return
exchange
.
methods
.
tokenToEthSwapInput
.
cacheSend
(
inputAmount
.
toFixed
(
0
),
inputAmount
.
toFixed
(
0
),
minOutput
.
toFixed
(
0
),
minOutput
.
toFixed
(
0
),
deadline
,
deadline
,
...
@@ -410,7 +410,7 @@ const ERC20_TO_ETH = {
...
@@ -410,7 +410,7 @@ const ERC20_TO_ETH = {
const
maxInput
=
BN
(
input
).
multipliedBy
(
10
**
inputDecimals
).
multipliedBy
(
BN
(
1
).
plus
(
ALLOWED_SLIPPAGE
));
const
maxInput
=
BN
(
input
).
multipliedBy
(
10
**
inputDecimals
).
multipliedBy
(
BN
(
1
).
plus
(
ALLOWED_SLIPPAGE
));
const
outputAmount
=
BN
(
output
).
multipliedBy
(
10
**
18
);
const
outputAmount
=
BN
(
output
).
multipliedBy
(
10
**
18
);
exchange
.
methods
.
tokenToEthSwapOutput
.
cacheSend
(
return
exchange
.
methods
.
tokenToEthSwapOutput
.
cacheSend
(
outputAmount
.
toFixed
(
0
),
outputAmount
.
toFixed
(
0
),
maxInput
.
toFixed
(
0
),
maxInput
.
toFixed
(
0
),
deadline
,
deadline
,
...
@@ -501,7 +501,7 @@ const ERC20_TO_ERC20 = {
...
@@ -501,7 +501,7 @@ const ERC20_TO_ERC20 = {
const
minTokensBought
=
outputAmount
.
multipliedBy
(
BN
(
1
).
plus
(
ALLOWED_SLIPPAGE
)).
toFixed
(
0
);
const
minTokensBought
=
outputAmount
.
multipliedBy
(
BN
(
1
).
plus
(
ALLOWED_SLIPPAGE
)).
toFixed
(
0
);
const
minEthBought
=
1
;
const
minEthBought
=
1
;
exchange
.
methods
.
tokenToTokenSwapInput
.
cacheSend
(
return
exchange
.
methods
.
tokenToTokenSwapInput
.
cacheSend
(
tokensSold
,
tokensSold
,
minTokensBought
,
minTokensBought
,
minEthBought
,
minEthBought
,
...
@@ -561,7 +561,7 @@ const ERC20_TO_ERC20 = {
...
@@ -561,7 +561,7 @@ const ERC20_TO_ERC20 = {
const
maxTokensSold
=
inputAmount
.
multipliedBy
(
BN
(
1
).
plus
(
ALLOWED_SLIPPAGE
)).
toFixed
(
0
);
const
maxTokensSold
=
inputAmount
.
multipliedBy
(
BN
(
1
).
plus
(
ALLOWED_SLIPPAGE
)).
toFixed
(
0
);
const
maxEthSold
=
inputAmountB
.
multipliedBy
(
1.2
).
toFixed
(
0
);
const
maxEthSold
=
inputAmountB
.
multipliedBy
(
1.2
).
toFixed
(
0
);
exchange
.
methods
.
tokenToTokenSwapOutput
.
cacheSend
(
return
exchange
.
methods
.
tokenToTokenSwapOutput
.
cacheSend
(
tokensBought
,
tokensBought
,
maxTokensSold
,
maxTokensSold
,
maxEthSold
,
maxEthSold
,
...
...
src/pages/Swap/index.js
View file @
47386298
...
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
...
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
import
classnames
from
'
classnames
'
;
import
classnames
from
'
classnames
'
;
import
{
BigNumber
as
BN
}
from
"
bignumber.js
"
;
import
{
BigNumber
as
BN
}
from
"
bignumber.js
"
;
import
deepEqual
from
'
deep-equal
'
;
import
deepEqual
from
'
deep-equal
'
;
import
{
isValidSwap
,
updateField
,
addError
,
removeError
}
from
'
../../ducks/swap
'
;
import
{
isValidSwap
,
updateField
,
addError
,
removeError
,
resetSwap
}
from
'
../../ducks/swap
'
;
import
{
selectors
,
sync
}
from
'
../../ducks/web3connect
'
;
import
{
selectors
,
sync
}
from
'
../../ducks/web3connect
'
;
import
Header
from
'
../../components/Header
'
;
import
Header
from
'
../../components/Header
'
;
import
CurrencyInputPanel
from
'
../../components/CurrencyInputPanel
'
;
import
CurrencyInputPanel
from
'
../../components/CurrencyInputPanel
'
;
...
@@ -20,9 +20,12 @@ import {
...
@@ -20,9 +20,12 @@ import {
}
from
'
../../helpers/exchange-utils
'
;
}
from
'
../../helpers/exchange-utils
'
;
import
{
import
{
isExchangeUnapproved
,
isExchangeUnapproved
,
getApprovalTxStatus
,
approveExchange
,
approveExchange
,
}
from
'
../../helpers/approval-utils
'
;
}
from
'
../../helpers/approval-utils
'
;
import
{
getTxStatus
,
}
from
'
../../helpers/contract-utils
'
;
import
promisify
from
'
../../helpers/web3-promisfy
'
;
import
"
./swap.scss
"
;
import
"
./swap.scss
"
;
...
@@ -52,35 +55,21 @@ class Swap extends Component {
...
@@ -52,35 +55,21 @@ class Swap extends Component {
state
=
{
state
=
{
exchangeRate
:
BN
(
0
),
exchangeRate
:
BN
(
0
),
approvalTxId
:
null
,
approvalTxId
:
null
,
swapTxId
:
null
,
};
};
componentWillReceiveProps
(
nextProps
)
{
// this.getExchangeRate(nextProps)
// .then(exchangeRate => {
// this.setState({ exchangeRate });
// if (!exchangeRate) {
// return;
// }
//
// if (nextProps.lastEditedField === 'input') {
// this.props.updateField('output', `${BN(nextProps.input).multipliedBy(exchangeRate).toFixed(7)}`);
// } else if (nextProps.lastEditedField === 'output') {
// this.props.updateField('input', `${BN(nextProps.output).multipliedBy(BN(1).dividedBy(exchangeRate)).toFixed(7)}`);
// }
// });
}
shouldComponentUpdate
(
nextProps
,
nextState
)
{
shouldComponentUpdate
(
nextProps
,
nextState
)
{
return
!
deepEqual
(
nextProps
,
this
.
props
)
||
return
!
deepEqual
(
nextProps
,
this
.
props
)
||
!
deepEqual
(
nextState
,
this
.
state
);
!
deepEqual
(
nextState
,
this
.
state
);
}
}
componentWillUnmount
()
{
componentWillUnmount
()
{
this
.
props
.
updateField
(
'
output
'
,
''
);
this
.
resetSwap
();
this
.
props
.
updateField
(
'
input
'
,
''
);
}
this
.
props
.
updateField
(
'
outputCurrency
'
,
''
);
this
.
props
.
updateField
(
'
inputCurrency
'
,
''
);
resetSwap
()
{
this
.
props
.
updateField
(
'
lastEditedField
'
,
''
);
this
.
props
.
resetSwap
();
this
.
setState
({
approvalTxId
:
null
,
swapTxId
:
null
});
}
}
getTokenLabel
(
address
)
{
getTokenLabel
(
address
)
{
...
@@ -208,12 +197,21 @@ class Swap extends Component {
...
@@ -208,12 +197,21 @@ class Swap extends Component {
getApprovalStatus
()
{
getApprovalStatus
()
{
const
{
drizzle
}
=
this
.
context
;
const
{
drizzle
}
=
this
.
context
;
return
get
Approval
TxStatus
({
return
getTxStatus
({
drizzleCtx
:
drizzle
,
drizzleCtx
:
drizzle
,
txId
:
this
.
state
.
approvalTxId
,
txId
:
this
.
state
.
approvalTxId
,
});
});
}
}
getSwapStatus
()
{
const
{
drizzle
}
=
this
.
context
;
return
getTxStatus
({
drizzleCtx
:
drizzle
,
txId
:
this
.
state
.
swapTxId
,
});
}
onSwap
=
async
()
=>
{
onSwap
=
async
()
=>
{
const
{
const
{
input
,
input
,
...
@@ -227,9 +225,10 @@ class Swap extends Component {
...
@@ -227,9 +225,10 @@ class Swap extends Component {
}
=
this
.
props
;
}
=
this
.
props
;
const
{
drizzle
}
=
this
.
context
;
const
{
drizzle
}
=
this
.
context
;
let
swapTxId
;
if
(
lastEditedField
===
'
input
'
)
{
if
(
lastEditedField
===
'
input
'
)
{
swapInput
({
swap
TxId
=
await
swap
Input
({
drizzleCtx
:
drizzle
,
drizzleCtx
:
drizzle
,
contractStore
:
contracts
,
contractStore
:
contracts
,
input
,
input
,
...
@@ -242,7 +241,7 @@ class Swap extends Component {
...
@@ -242,7 +241,7 @@ class Swap extends Component {
}
}
if
(
lastEditedField
===
'
output
'
)
{
if
(
lastEditedField
===
'
output
'
)
{
swapOutput
({
swap
TxId
=
await
swap
Output
({
drizzleCtx
:
drizzle
,
drizzleCtx
:
drizzle
,
contractStore
:
contracts
,
contractStore
:
contracts
,
input
,
input
,
...
@@ -253,6 +252,10 @@ class Swap extends Component {
...
@@ -253,6 +252,10 @@ class Swap extends Component {
account
,
account
,
});
});
}
}
this
.
resetSwap
();
this
.
setState
({
swapTxId
});
// this.context.drizzle.web3.eth.getBlockNumber((_, d) => this.context.drizzle.web3.eth.getBlock(d, (_,d) => {
// this.context.drizzle.web3.eth.getBlockNumber((_, d) => this.context.drizzle.web3.eth.getBlock(d, (_,d) => {
// const deadline = d.timestamp + 300;
// const deadline = d.timestamp + 300;
// const id = exchange.methods.ethToTokenSwapInput.cacheSend(`${output * 10 ** 18}`, deadline, {
// const id = exchange.methods.ethToTokenSwapInput.cacheSend(`${output * 10 ** 18}`, deadline, {
...
@@ -356,6 +359,7 @@ class Swap extends Component {
...
@@ -356,6 +359,7 @@ class Swap extends Component {
removeError
=
{
error
=>
this
.
props
.
removeError
(
'
inputErrors
'
,
error
)}
removeError
=
{
error
=>
this
.
props
.
removeError
(
'
inputErrors
'
,
error
)}
errors
=
{
inputErrors
}
errors
=
{
inputErrors
}
value
=
{
input
}
value
=
{
input
}
selectedTokenAddress
=
{
inputCurrency
}
shouldValidateBalance
shouldValidateBalance
showSubButton
=
{
this
.
getIsUnapproved
()}
showSubButton
=
{
this
.
getIsUnapproved
()}
subButtonContent
=
{
this
.
renderSubButtonText
()}
subButtonContent
=
{
this
.
renderSubButtonText
()}
...
@@ -376,6 +380,7 @@ class Swap extends Component {
...
@@ -376,6 +380,7 @@ class Swap extends Component {
removeError
=
{
error
=>
this
.
props
.
removeError
(
'
outputErrors
'
,
error
)}
removeError
=
{
error
=>
this
.
props
.
removeError
(
'
outputErrors
'
,
error
)}
errors
=
{
outputErrors
}
errors
=
{
outputErrors
}
value
=
{
output
}
value
=
{
output
}
selectedTokenAddress
=
{
outputCurrency
}
/
>
/
>
{
this
.
renderExchangeRate
()
}
{
this
.
renderExchangeRate
()
}
{
{
...
@@ -437,6 +442,7 @@ export default withRouter(
...
@@ -437,6 +442,7 @@ export default withRouter(
updateField
:
(
name
,
value
)
=>
dispatch
(
updateField
({
name
,
value
})),
updateField
:
(
name
,
value
)
=>
dispatch
(
updateField
({
name
,
value
})),
addError
:
(
name
,
value
)
=>
dispatch
(
addError
({
name
,
value
})),
addError
:
(
name
,
value
)
=>
dispatch
(
addError
({
name
,
value
})),
removeError
:
(
name
,
value
)
=>
dispatch
(
removeError
({
name
,
value
})),
removeError
:
(
name
,
value
)
=>
dispatch
(
removeError
({
name
,
value
})),
resetSwap
:
()
=>
dispatch
(
resetSwap
()),
selectors
:
()
=>
dispatch
(
selectors
()),
selectors
:
()
=>
dispatch
(
selectors
()),
})
})
),
),
...
...
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