From 9b1de22ce9047552d5923efbb953deeaf2b0fbc2 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Thu, 31 Aug 2023 09:31:07 -0500 Subject: [PATCH] Fix #20648 - Show Linea ETH fiat value by default (#20672) --- ui/selectors/selectors.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index f4bac768d..2cb076670 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -617,6 +617,11 @@ export function getIsMainnet(state) { return chainId === CHAIN_IDS.MAINNET; } +export function getIsLineaMainnet(state) { + const chainId = getCurrentChainId(state); + return chainId === CHAIN_IDS.LINEA_MAINNET; +} + export function getIsTestnet(state) { const chainId = getCurrentChainId(state); return TEST_CHAINS.includes(chainId); @@ -653,12 +658,13 @@ export function getDisabledRpcMethodPreferences(state) { export function getShouldShowFiat(state) { const isMainNet = getIsMainnet(state); + const isLineaMainNet = getIsLineaMainnet(state); const isCustomNetwork = getIsCustomNetwork(state); const conversionRate = getConversionRate(state); const useCurrencyRateCheck = getUseCurrencyRateCheck(state); const { showFiatInTestnets } = getPreferences(state); return Boolean( - (isMainNet || isCustomNetwork || showFiatInTestnets) && + (isMainNet || isLineaMainNet || isCustomNetwork || showFiatInTestnets) && useCurrencyRateCheck && conversionRate, );