Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ export default class SendGasRow extends Component {
</div>
)
// Tests should behave in same way as mainnet, but are using Localhost
if (advancedInlineGasShown || (!isMainnet && !process.env.IN_TEST)) {
// if (advancedInlineGasShown || (!isMainnet && !process.env.IN_TEST)) { // will enable this when gas estimation endpoint is ready
if (advancedInlineGasShown || (!process.env.IN_TEST)) {
return advancedGasInputs
} else if (gasButtonGroupShown) {
return gasPriceButtonGroup
Expand Down
25 changes: 14 additions & 11 deletions ui/app/selectors/custom-gas.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,23 @@ export function getCustomGasTotal (state) {
return state.gas.customData.total
}

export function getBasicGasEstimateLoadingStatus (state) {
return state.gas.basicEstimateIsLoading
export function getBasicGasEstimateLoadingStatus () {
// return state.gas.basicEstimateIsLoading // will enable again when API for gas endpoint is ready
return false
}

export function getGasEstimatesLoadingStatus (state) {
return state.gas.gasEstimatesLoading
// return state.gas.gasEstimatesLoading // will enable again when API for gas endpoint is ready
return false
}

export function getPriceAndTimeEstimates (state) {
return state.gas.priceAndTimeEstimates
}

export function getEstimatedGasPrices (state) {
return getPriceAndTimeEstimates(state).map(({ gasprice }) => gasprice)
// return getPriceAndTimeEstimates(state).map(({ gasprice }) => gasprice) //will enable again when API for gas endpoint is ready
return 15
}

export function getEstimatedGasTimes (state) {
Expand All @@ -67,7 +70,7 @@ export function getAveragePriceEstimateInHexWEI (state) {

export function getFastPriceEstimateInHexWEI (state) {
const fastPriceEstimate = state.gas.basicEstimates.fast
return getGasPriceInHexWei(fastPriceEstimate || '0x0')
return getGasPriceInHexWei(fastPriceEstimate || '0xF')
}

export function getDefaultActiveButtonIndex (gasButtonInfo, customGasPriceInHex, gasPrice) {
Expand Down Expand Up @@ -192,9 +195,9 @@ export function getGasPriceInHexWei (price) {
}

export function getRenderableBasicEstimateData (state, gasLimit) {
if (getBasicGasEstimateLoadingStatus(state)) {
return []
}
// if (getBasicGasEstimateLoadingStatus(state)) {
// return []
// } // will enable again when API for gas endpoint is ready
const { showFiatInTestnets } = getPreferences(state)
const isMainnet = getIsMainnet(state)
const showFiat = (isMainnet || Boolean(showFiatInTestnets))
Expand Down Expand Up @@ -245,9 +248,9 @@ export function getRenderableBasicEstimateData (state, gasLimit) {
}

export function getRenderableEstimateDataForSmallButtonsFromGWEI (state) {
if (getBasicGasEstimateLoadingStatus(state)) {
return []
}
// if (getBasicGasEstimateLoadingStatus(state)) {
// return []
// } // will enable again when API for gas endpoint is ready

const { showFiatInTestnets } = getPreferences(state)
const isMainnet = getIsMainnet(state)
Expand Down