mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 09:23:21 +01:00
parent
1e558af3b6
commit
9b1de22ce9
@ -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,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user