Fix display of gas chart on Ethereum networks (#6389)

feature/default_network_editable
Dan J Miller 6 years ago committed by Whymarrh Whitby
parent a46ec83c9b
commit 95a2480074
  1. 3
      ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
  2. 2
      ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js
  3. 2
      ui/app/ducks/gas/gas.duck.js
  4. 3
      ui/app/selectors/selectors.js

@ -38,6 +38,7 @@ export default class GasModalPageContainer extends Component {
customPriceIsSafe: PropTypes.bool,
isSpeedUp: PropTypes.bool,
disableSave: PropTypes.bool,
isEthereumNetwork: PropTypes.bool,
}
state = {}
@ -75,6 +76,7 @@ export default class GasModalPageContainer extends Component {
customPriceIsSafe,
isSpeedUp,
transactionFee,
isEthereumNetwork,
}) {
return (
<AdvancedTabContent
@ -90,6 +92,7 @@ export default class GasModalPageContainer extends Component {
gasEstimatesLoading={gasEstimatesLoading}
customPriceIsSafe={customPriceIsSafe}
isSpeedUp={isSpeedUp}
isEthereumNetwork={isEthereumNetwork}
/>
)
}

@ -140,7 +140,7 @@ describe('gas-modal-page-container container', () => {
insufficientBalance: true,
isSpeedUp: false,
txId: 34,
isEthereumNetwork: false,
isEthereumNetwork: true,
isMainnet: true,
}
const baseMockOwnProps = { transaction: { id: 34 } }

@ -361,7 +361,7 @@ export function fetchGasEstimates (blockTime) {
return (dispatch, getState) => {
const state = getState()
if (isEthereumNetwork(state)) {
if (!isEthereumNetwork(state)) {
return Promise.resolve(null)
}

@ -301,7 +301,8 @@ function isEthereumNetwork (state) {
RINKEBY,
ROPSTEN,
} = NETWORK_TYPES
return [ KOVAN, MAINNET, RINKEBY, ROPSTEN].includes(type => type === networkType)
return [ KOVAN, MAINNET, RINKEBY, ROPSTEN].includes(networkType)
}
function preferencesSelector ({ metamask }) {

Loading…
Cancel
Save