1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 19:10:22 +01:00
metamask-extension/ui/app/components/send/send-content/send-to-row/send-to-row.container.js
Dan b3d78ed8a1 Remove send_ directory, revert to just having send
Revert accidentally changed constants.

Require defaults in ens-input, gas-fee-display and confirm screens.
2018-07-16 12:58:32 -02:30

43 lines
1.1 KiB
JavaScript

import { connect } from 'react-redux'
import {
getCurrentNetwork,
getSendTo,
getSendToAccounts,
} from '../../send.selectors.js'
import {
getToDropdownOpen,
sendToIsInError,
} from './send-to-row.selectors.js'
import {
updateSendTo,
} from '../../../../actions'
import {
updateSendErrors,
openToDropdown,
closeToDropdown,
} from '../../../../ducks/send.duck'
import SendToRow from './send-to-row.component'
export default connect(mapStateToProps, mapDispatchToProps)(SendToRow)
function mapStateToProps (state) {
return {
inError: sendToIsInError(state),
network: getCurrentNetwork(state),
to: getSendTo(state),
toAccounts: getSendToAccounts(state),
toDropdownOpen: getToDropdownOpen(state),
}
}
function mapDispatchToProps (dispatch) {
return {
closeToDropdown: () => dispatch(closeToDropdown()),
openToDropdown: () => dispatch(openToDropdown()),
updateSendTo: (to, nickname) => dispatch(updateSendTo(to, nickname)),
updateSendToError: (toErrorObject) => {
dispatch(updateSendErrors(toErrorObject))
},
}
}