aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js')
-rw-r--r--ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js b/ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js
index dd16559d..39266e59 100644
--- a/ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js
+++ b/ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js
@@ -13,6 +13,9 @@ import {
import {
showGasButtonGroup,
} from '../../../../ducks/send.duck'
+import {
+ resetCustomData,
+} from '../../../../ducks/gas.duck'
import { getGasLoadingError, gasFeeIsInError, getGasButtonGroupShown } from './send-gas-row.selectors.js'
import { showModal, setGasPrice } from '../../../../actions'
import SendGasRow from './send-gas-row.component'
@@ -44,13 +47,17 @@ function mapDispatchToProps (dispatch) {
showCustomizeGasModal: () => dispatch(showModal({ name: 'CUSTOMIZE_GAS', hideBasic: true })),
setGasPrice: newPrice => dispatch(setGasPrice(newPrice)),
showGasButtonGroup: () => dispatch(showGasButtonGroup()),
+ resetCustomData: () => dispatch(resetCustomData()),
}
}
function mergeProps (stateProps, dispatchProps, ownProps) {
const { gasPriceButtonGroupProps } = stateProps
+ const { gasButtonInfo } = gasPriceButtonGroupProps
const {
setGasPrice: dispatchSetGasPrice,
+ showGasButtonGroup: dispatchShowGasButtonGroup,
+ resetCustomData: dispatchResetCustomData,
...otherDispatchProps
} = dispatchProps
@@ -62,5 +69,10 @@ function mergeProps (stateProps, dispatchProps, ownProps) {
...gasPriceButtonGroupProps,
handleGasPriceSelection: dispatchSetGasPrice,
},
+ resetGasButtons: () => {
+ dispatchResetCustomData()
+ dispatchSetGasPrice(gasButtonInfo[1].priceInHexWei)
+ dispatchShowGasButtonGroup()
+ },
}
}