@ -1,5 +1,8 @@
import React , { Component } from 'react'
import React , { Component } from 'react'
import PropTypes from 'prop-types'
import PropTypes from 'prop-types'
import {
decGWEIToHexWEI ,
} from '../../../../../helpers/utils/conversions.util'
import Loading from '../../../../ui/loading-screen'
import Loading from '../../../../ui/loading-screen'
import GasPriceChart from '../../gas-price-chart'
import GasPriceChart from '../../gas-price-chart'
import AdvancedGasInputs from '../../advanced-gas-inputs'
import AdvancedGasInputs from '../../advanced-gas-inputs'
@ -42,6 +45,11 @@ export default class AdvancedTabContent extends Component {
)
)
}
}
onGasChartUpdate = ( price ) => {
const { updateCustomGasPrice } = this . props
updateCustomGasPrice ( decGWEIToHexWEI ( price ) )
}
render ( ) {
render ( ) {
const { t } = this . context
const { t } = this . context
const {
const {
@ -78,7 +86,7 @@ export default class AdvancedTabContent extends Component {
? < div >
? < div >
< div className = "advanced-tab__fee-chart__title" > { t ( 'liveGasPricePredictions' ) } < / d i v >
< div className = "advanced-tab__fee-chart__title" > { t ( 'liveGasPricePredictions' ) } < / d i v >
{ ! gasEstimatesLoading
{ ! gasEstimatesLoading
? < GasPriceChart { ... gasChartProps } updateCustomGasPrice = { updateCustomGasPric e} / >
? < GasPriceChart { ... gasChartProps } updateCustomGasPrice = { this . onGasChartUpdat e} / >
: < Loading / >
: < Loading / >
}
}
< div className = "advanced-tab__fee-chart__speed-buttons" >
< div className = "advanced-tab__fee-chart__speed-buttons" >