1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-02 06:07:06 +01:00
metamask-extension/ui/pages/send/send-content/send-amount-row/send-amount-row.container.js

25 lines
586 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2018-04-07 00:29:51 +02:00
import {
updateSendAmount,
getSendAmount,
sendAmountIsInError,
getSendAsset,
} from '../../../../ducks/send';
import SendAmountRow from './send-amount-row.component';
2018-04-07 00:29:51 +02: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),
inError: sendAmountIsInError(state),
asset: getSendAsset(state),
};
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)),
};
}