1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 03:20:23 +01:00
metamask-extension/ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js

28 lines
809 B
JavaScript
Raw Normal View History

2018-04-26 18:38:38 +02:00
import { connect } from 'react-redux'
2018-04-11 16:21:54 +02:00
import {
getConversionRate,
2018-06-23 00:05:50 +02:00
getCurrentCurrency,
2018-04-11 16:21:54 +02:00
getGasTotal,
} from '../../send.selectors.js'
2018-06-29 19:19:40 +02:00
import { getGasLoadingError, gasFeeIsInError } from './send-gas-row.selectors.js'
2018-04-26 18:38:38 +02:00
import { showModal } from '../../../../actions'
import SendGasRow from './send-gas-row.component'
2018-04-11 16:21:54 +02:00
export default connect(mapStateToProps, mapDispatchToProps)(SendGasRow)
function mapStateToProps (state) {
return {
conversionRate: getConversionRate(state),
2018-06-23 00:05:50 +02:00
convertedCurrency: getCurrentCurrency(state),
2018-04-11 16:21:54 +02:00
gasTotal: getGasTotal(state),
2018-06-29 19:19:40 +02:00
gasFeeError: gasFeeIsInError(state),
gasLoadingError: getGasLoadingError(state),
2018-04-11 16:21:54 +02:00
}
}
function mapDispatchToProps (dispatch) {
return {
showCustomizeGasModal: () => dispatch(showModal({ name: 'CUSTOMIZE_GAS' })),
}
}