1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

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

This commit is contained in:
Dan J Miller 2019-04-03 13:31:43 -02:30 committed by Whymarrh Whitby
parent a46ec83c9b
commit 95a2480074
4 changed files with 7 additions and 3 deletions

View File

@ -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}
/>
)
}

View File

@ -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 } }

View File

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

View File

@ -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 }) {