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