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:
parent
a46ec83c9b
commit
95a2480074
@ -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…
Reference in New Issue
Block a user