From 0972e23dcd9c15abe9a3229f9514b3b2f1ccd673 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Fri, 8 Feb 2019 10:52:19 -0330 Subject: Add e2e tests adjusting gas before sending --- .../send/send-content/send-gas-row/send-gas-row.container.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ui/app/components/send/send-content') 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 a3bc73256..50cb47178 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 @@ -74,12 +74,16 @@ function mapDispatchToProps (dispatch) { setGasPrice: (newPrice, gasLimit) => { dispatch(setGasPrice(newPrice)) dispatch(setCustomGasPrice(newPrice)) - dispatch(setGasTotal(calcGasTotal(gasLimit, newPrice))) + if (gasLimit) { + dispatch(setGasTotal(calcGasTotal(gasLimit, newPrice))) + } }, setGasLimit: (newLimit, gasPrice) => { dispatch(setGasLimit(newLimit)) dispatch(setCustomGasLimit(newLimit)) - dispatch(setGasTotal(calcGasTotal(newLimit, gasPrice))) + if (gasPrice) { + dispatch(setGasTotal(calcGasTotal(newLimit, gasPrice))) + } }, showGasButtonGroup: () => dispatch(showGasButtonGroup()), resetCustomData: () => dispatch(resetCustomData()), -- cgit v1.2.3