aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2019-04-04 00:01:43 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-04-04 00:01:43 +0800
commit95a24800746ed0b7a92a8558cb2e7976d57c0104 (patch)
tree2cc9bb4186a109cecca74c8ce70d7e24403c21df
parenta46ec83c9b258a3aed65e1ef08769300c01ca13b (diff)
downloadtangerine-wallet-browser-95a24800746ed0b7a92a8558cb2e7976d57c0104.tar
tangerine-wallet-browser-95a24800746ed0b7a92a8558cb2e7976d57c0104.tar.gz
tangerine-wallet-browser-95a24800746ed0b7a92a8558cb2e7976d57c0104.tar.bz2
tangerine-wallet-browser-95a24800746ed0b7a92a8558cb2e7976d57c0104.tar.lz
tangerine-wallet-browser-95a24800746ed0b7a92a8558cb2e7976d57c0104.tar.xz
tangerine-wallet-browser-95a24800746ed0b7a92a8558cb2e7976d57c0104.tar.zst
tangerine-wallet-browser-95a24800746ed0b7a92a8558cb2e7976d57c0104.zip
Fix display of gas chart on Ethereum networks (#6389)
-rw-r--r--ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js3
-rw-r--r--ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js2
-rw-r--r--ui/app/ducks/gas/gas.duck.js2
-rw-r--r--ui/app/selectors/selectors.js3
4 files changed, 7 insertions, 3 deletions
diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
index d242f59f5..8aaccafd5 100644
--- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
+++ b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.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}
/>
)
}
diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js
index b9eb67d2b..ab24b9c0e 100644
--- a/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js
+++ b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js
@@ -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 } }
diff --git a/ui/app/ducks/gas/gas.duck.js b/ui/app/ducks/gas/gas.duck.js
index 8eb68f846..5a0a236e6 100644
--- a/ui/app/ducks/gas/gas.duck.js
+++ b/ui/app/ducks/gas/gas.duck.js
@@ -361,7 +361,7 @@ export function fetchGasEstimates (blockTime) {
return (dispatch, getState) => {
const state = getState()
- if (isEthereumNetwork(state)) {
+ if (!isEthereumNetwork(state)) {
return Promise.resolve(null)
}
diff --git a/ui/app/selectors/selectors.js b/ui/app/selectors/selectors.js
index bea2cea33..554232f7b 100644
--- a/ui/app/selectors/selectors.js
+++ b/ui/app/selectors/selectors.js
@@ -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 }) {