aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js')
-rw-r--r--ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js b/ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js
deleted file mode 100644
index a71d37b43..000000000
--- a/ui/app/components/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import { connect } from 'react-redux'
-import { showModal } from '../../../actions'
-import {
- decGWEIToHexWEI,
- decimalToHex,
- hexWEIToDecGWEI,
-} from '../../../helpers/conversions.util'
-import AdvancedGasInputs from './advanced-gas-inputs.component'
-
-function convertGasPriceForInputs (gasPriceInHexWEI) {
- return Number(hexWEIToDecGWEI(gasPriceInHexWEI))
-}
-
-function convertGasLimitForInputs (gasLimitInHexWEI) {
- return parseInt(gasLimitInHexWEI, 16)
-}
-
-const mapDispatchToProps = dispatch => {
- return {
- showGasPriceInfoModal: modalName => dispatch(showModal({ name: 'GAS_PRICE_INFO_MODAL' })),
- showGasLimitInfoModal: modalName => dispatch(showModal({ name: 'GAS_LIMIT_INFO_MODAL' })),
- }
-}
-
-const mergeProps = (stateProps, dispatchProps, ownProps) => {
- const {customGasPrice, customGasLimit, updateCustomGasPrice, updateCustomGasLimit} = ownProps
- return {
- ...stateProps,
- ...dispatchProps,
- ...ownProps,
- customGasPrice: convertGasPriceForInputs(customGasPrice),
- customGasLimit: convertGasLimitForInputs(customGasLimit),
- updateCustomGasPrice: (price) => updateCustomGasPrice(decGWEIToHexWEI(price)),
- updateCustomGasLimit: (limit) => updateCustomGasLimit(decimalToHex(limit)),
- }
-}
-
-export default connect(null, mapDispatchToProps, mergeProps)(AdvancedGasInputs)