1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +01:00

Specify that Base is a multilayer network (#20097)

This commit is contained in:
Danyal Prout 2023-08-14 08:22:02 -07:00 committed by GitHub
parent f69180c174
commit d28f699c57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 2 deletions

View File

@ -138,6 +138,8 @@ export const CHAIN_IDS = {
BSC_TESTNET: '0x61',
OPTIMISM: '0xa',
OPTIMISM_TESTNET: '0x1a4',
BASE: '0x2105',
BASE_TESTNET: '0x14a33',
POLYGON: '0x89',
POLYGON_TESTNET: '0x13881',
AVALANCHE: '0xa86a',
@ -553,6 +555,8 @@ export const BUYABLE_CHAINS_MAP: {
ChainId,
| typeof CHAIN_IDS.LOCALHOST
| typeof CHAIN_IDS.OPTIMISM_TESTNET
| typeof CHAIN_IDS.BASE_TESTNET
| typeof CHAIN_IDS.BASE
| typeof CHAIN_IDS.BSC_TESTNET
| typeof CHAIN_IDS.POLYGON_TESTNET
| typeof CHAIN_IDS.AVALANCHE_TESTNET

View File

@ -1307,11 +1307,22 @@ export function getIsOptimism(state) {
);
}
export function getIsBase(state) {
return (
getCurrentChainId(state) === CHAIN_IDS.BASE ||
getCurrentChainId(state) === CHAIN_IDS.BASE_TESTNET
);
}
export function getIsOpStack(state) {
return getIsOptimism(state) || getIsBase(state);
}
export function getIsMultiLayerFeeNetwork(state) {
return getIsOptimism(state);
return getIsOpStack(state);
}
/**
* To retrieve the maxBaseFee and priotitFee teh user has set as default
* To retrieve the maxBaseFee and priorityFee the user has set as default
*
* @param {*} state
* @returns Boolean