@ -29,12 +29,14 @@ import {
getCurrentCurrency ,
getCurrentCurrency ,
getCurrentEthBalance ,
getCurrentEthBalance ,
getIsMainnet ,
getIsMainnet ,
getIsTestnet ,
getBasicGasEstimateLoadingStatus ,
getBasicGasEstimateLoadingStatus ,
getCustomGasLimit ,
getCustomGasLimit ,
getCustomGasPrice ,
getCustomGasPrice ,
getDefaultActiveButtonIndex ,
getDefaultActiveButtonIndex ,
getRenderableBasicEstimateData ,
getRenderableBasicEstimateData ,
isCustomPriceSafe ,
isCustomPriceSafe ,
isCustomPriceSafeForCustomNetwork ,
getAveragePriceEstimateInHexWEI ,
getAveragePriceEstimateInHexWEI ,
isCustomPriceExcessive ,
isCustomPriceExcessive ,
getIsGasEstimatesFetched ,
getIsGasEstimatesFetched ,
@ -113,6 +115,7 @@ const mapStateToProps = (state, ownProps) => {
const balance = getCurrentEthBalance ( state ) ;
const balance = getCurrentEthBalance ( state ) ;
const isMainnet = getIsMainnet ( state ) ;
const isMainnet = getIsMainnet ( state ) ;
const isTestnet = getIsTestnet ( state ) ;
const showFiat = getShouldShowFiat ( state ) ;
const showFiat = getShouldShowFiat ( state ) ;
const newTotalEth =
const newTotalEth =
@ -134,6 +137,16 @@ const mapStateToProps = (state, ownProps) => {
conversionRate ,
conversionRate ,
} ) ;
} ) ;
const isGasEstimate = getIsGasEstimatesFetched ( state ) ;
const isGasEstimate = getIsGasEstimatesFetched ( state ) ;
let customPriceIsSafe ;
if ( ( isMainnet || process . env . IN _TEST ) && isGasEstimate ) {
customPriceIsSafe = isCustomPriceSafe ( state ) ;
} else if ( isTestnet ) {
customPriceIsSafe = true ;
} else {
customPriceIsSafe = isCustomPriceSafeForCustomNetwork ( state ) ;
}
return {
return {
hideBasic ,
hideBasic ,
isConfirm : isConfirm ( state ) ,
isConfirm : isConfirm ( state ) ,
@ -143,10 +156,7 @@ const mapStateToProps = (state, ownProps) => {
customGasLimit : calcCustomGasLimit ( customModalGasLimitInHex ) ,
customGasLimit : calcCustomGasLimit ( customModalGasLimitInHex ) ,
customGasTotal ,
customGasTotal ,
newTotalFiat ,
newTotalFiat ,
customPriceIsSafe :
customPriceIsSafe ,
( isMainnet || process . env . IN _TEST ) && isGasEstimate
? isCustomPriceSafe ( state )
: true ,
customPriceIsExcessive : isCustomPriceExcessive ( state ) ,
customPriceIsExcessive : isCustomPriceExcessive ( state ) ,
maxModeOn ,
maxModeOn ,
gasPriceButtonGroupProps : {
gasPriceButtonGroupProps : {