1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Fix #20648 - Show Linea ETH fiat value by default (#20672)

This commit is contained in:
David Walsh 2023-08-31 09:31:07 -05:00 committed by GitHub
parent 1e558af3b6
commit 9b1de22ce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -617,6 +617,11 @@ export function getIsMainnet(state) {
return chainId === CHAIN_IDS.MAINNET; return chainId === CHAIN_IDS.MAINNET;
} }
export function getIsLineaMainnet(state) {
const chainId = getCurrentChainId(state);
return chainId === CHAIN_IDS.LINEA_MAINNET;
}
export function getIsTestnet(state) { export function getIsTestnet(state) {
const chainId = getCurrentChainId(state); const chainId = getCurrentChainId(state);
return TEST_CHAINS.includes(chainId); return TEST_CHAINS.includes(chainId);
@ -653,12 +658,13 @@ export function getDisabledRpcMethodPreferences(state) {
export function getShouldShowFiat(state) { export function getShouldShowFiat(state) {
const isMainNet = getIsMainnet(state); const isMainNet = getIsMainnet(state);
const isLineaMainNet = getIsLineaMainnet(state);
const isCustomNetwork = getIsCustomNetwork(state); const isCustomNetwork = getIsCustomNetwork(state);
const conversionRate = getConversionRate(state); const conversionRate = getConversionRate(state);
const useCurrencyRateCheck = getUseCurrencyRateCheck(state); const useCurrencyRateCheck = getUseCurrencyRateCheck(state);
const { showFiatInTestnets } = getPreferences(state); const { showFiatInTestnets } = getPreferences(state);
return Boolean( return Boolean(
(isMainNet || isCustomNetwork || showFiatInTestnets) && (isMainNet || isLineaMainNet || isCustomNetwork || showFiatInTestnets) &&
useCurrencyRateCheck && useCurrencyRateCheck &&
conversionRate, conversionRate,
); );