aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2018-11-06 01:01:46 +0800
committerDan Miller <danjm.com@gmail.com>2018-12-04 11:36:22 +0800
commitb70886a99b466366e84d24271adbb890aebf6460 (patch)
treeb4ce415c80ec78120306d358c20d4c51744c8db3 /ui/app/components/send/send-content/send-gas-row/send-gas-row.container.js
parenta8259f7f6a26fe5ae21b26b2a5c05dfdb09e32bd (diff)
downloaddexon-wallet-b70886a99b466366e84d24271adbb890aebf6460.tar.gz
dexon-wallet-b70886a99b466366e84d24271adbb890aebf6460.tar.zst
dexon-wallet-b70886a99b466366e84d24271adbb890aebf6460.zip
Fixes for components that break e2e gas customization tests, plus unit test updates.
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()
+ },
}
}