2021-02-04 19:15:23 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-04-07 00:29:51 +02:00
|
|
|
import {
|
2021-06-23 23:35:25 +02:00
|
|
|
updateSendAmount,
|
2018-04-27 02:38:14 +02:00
|
|
|
getSendAmount,
|
|
|
|
sendAmountIsInError,
|
2021-06-23 23:35:25 +02:00
|
|
|
getSendAsset,
|
|
|
|
} from '../../../../ducks/send';
|
2021-02-04 19:15:23 +01:00
|
|
|
import SendAmountRow from './send-amount-row.component';
|
2018-04-07 00:29:51 +02:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SendAmountRow);
|
2018-04-07 00:29:51 +02:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
function mapStateToProps(state) {
|
2018-04-26 18:38:38 +02:00
|
|
|
return {
|
|
|
|
amount: getSendAmount(state),
|
2018-04-27 02:38:14 +02:00
|
|
|
inError: sendAmountIsInError(state),
|
2021-06-23 23:35:25 +02:00
|
|
|
asset: getSendAsset(state),
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2018-04-07 00:29:51 +02:00
|
|
|
}
|
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
function mapDispatchToProps(dispatch) {
|
2018-04-11 16:21:54 +02:00
|
|
|
return {
|
2020-02-15 21:34:12 +01:00
|
|
|
updateSendAmount: (newAmount) => dispatch(updateSendAmount(newAmount)),
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2018-04-27 02:38:14 +02:00
|
|
|
}
|