aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2018-12-11 07:40:14 +0800
committerDan Finlay <dan@danfinlay.com>2018-12-11 07:40:14 +0800
commit3bfd4d1524dd8f7f6ede5c62085af52105336ec1 (patch)
treef520b02380d3a258a8cc5a7595003518ed0d5c0d /ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
parent14bd5997902fd3129ae00a8da7d43dd3b075e9ff (diff)
parent1fbdce8916151df2b31eebc5de29a1365e5dadff (diff)
downloadtangerine-wallet-browser-3bfd4d1524dd8f7f6ede5c62085af52105336ec1.tar.gz
tangerine-wallet-browser-3bfd4d1524dd8f7f6ede5c62085af52105336ec1.tar.zst
tangerine-wallet-browser-3bfd4d1524dd8f7f6ede5c62085af52105336ec1.zip
Merge branch 'develop' into i5846-ProviderCrashes
Diffstat (limited to 'ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js')
-rw-r--r--ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js b/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
index c619a0988..dde0f2b94 100644
--- a/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
+++ b/ui/app/components/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
@@ -40,6 +40,7 @@ import {
getEstimatedGasTimes,
getRenderableBasicEstimateData,
getBasicGasEstimateBlockTime,
+ isCustomPriceSafe,
} from '../../../selectors/custom-gas'
import {
submittedPendingTransactionsSelector,
@@ -107,6 +108,7 @@ const mapStateToProps = (state, ownProps) => {
newTotalFiat,
currentTimeEstimate: getRenderableTimeEstimate(customGasPrice, gasPrices, estimatedTimes),
blockTime: getBasicGasEstimateBlockTime(state),
+ customPriceIsSafe: isCustomPriceSafe(state),
gasPriceButtonGroupProps: {
buttonDataLoading,
defaultActiveButtonIndex: getDefaultActiveButtonIndex(gasButtonInfo, customModalGasPriceInHex),
@@ -167,7 +169,7 @@ const mapDispatchToProps = dispatch => {
}
const mergeProps = (stateProps, dispatchProps, ownProps) => {
- const { gasPriceButtonGroupProps, isConfirm, isSpeedUp, txId } = stateProps
+ const { gasPriceButtonGroupProps, isConfirm, txId, isSpeedUp, insufficientBalance, customGasPrice } = stateProps
const {
updateCustomGasPrice: dispatchUpdateCustomGasPrice,
hideGasButtonGroup: dispatchHideGasButtonGroup,
@@ -208,6 +210,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
dispatchHideSidebar()
}
},
+ disableSave: insufficientBalance || (isSpeedUp && customGasPrice === 0),
}
}