A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.co...

37 lines
1.1 KiB

import { connect } from 'react-redux'
import GasModalPageContainer from './gas-modal-page-container.component'
import { hideModal } from '../../../actions'
import {
setCustomGasPrice,
setCustomGasLimit,
} from '../../../ducks/gas.duck'
import {
getCustomGasPrice,
getCustomGasLimit,
getRenderableBasicEstimateData,
getBasicGasEstimateLoadingStatus,
} from '../../../selectors/custom-gas'
const mapStateToProps = state => {
const buttonDataLoading = getBasicGasEstimateLoadingStatus(state)
return {
customGasPrice: getCustomGasPrice(state),
customGasLimit: getCustomGasLimit(state),
gasPriceButtonGroupProps: {
buttonDataLoading,
gasButtonInfo: getRenderableBasicEstimateData(state),
},
}
}
const mapDispatchToProps = dispatch => {
return {
hideModal: () => dispatch(hideModal()),
updateCustomGasPrice: (newPrice) => dispatch(setCustomGasPrice(newPrice)),
updateCustomGasLimit: (newLimit) => dispatch(setCustomGasLimit(newLimit)),
handleGasPriceSelection: newPrice => console.log('NewPrice: ', newPrice),
}
}
export default connect(mapStateToProps, mapDispatchToProps)(GasModalPageContainer)