1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 03:20:23 +01:00

Added Specification for opBNB as a multilayer network (#20715)

* added configuration for gas calculations for opBNB

* updated configuration for gas calculations of opBNB

* Specify that opBNB is a multilayer network

* fixed prettier issues

* Update

---------

Co-authored-by: RumeelHussainbnb <rumeelhussainbnb@gmail.com>
This commit is contained in:
Jyoti Puri 2023-09-05 05:43:16 +05:30 committed by GitHub
parent 07adba5926
commit 0e9845f5a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -140,6 +140,8 @@ export const CHAIN_IDS = {
OPTIMISM_TESTNET: '0x1a4',
BASE: '0x2105',
BASE_TESTNET: '0x14a33',
OPBNB: '0xcc',
OPBNB_TESTNET: '0x15eb',
POLYGON: '0x89',
POLYGON_TESTNET: '0x13881',
AVALANCHE: '0xa86a',
@ -557,6 +559,8 @@ export const BUYABLE_CHAINS_MAP: {
| typeof CHAIN_IDS.OPTIMISM_TESTNET
| typeof CHAIN_IDS.BASE_TESTNET
| typeof CHAIN_IDS.BASE
| typeof CHAIN_IDS.OPBNB_TESTNET
| typeof CHAIN_IDS.OPBNB
| typeof CHAIN_IDS.BSC_TESTNET
| typeof CHAIN_IDS.POLYGON_TESTNET
| typeof CHAIN_IDS.AVALANCHE_TESTNET

View File

@ -1353,13 +1353,21 @@ export function getIsBase(state) {
);
}
export function getIsOpbnb(state) {
return (
getCurrentChainId(state) === CHAIN_IDS.OPBNB ||
getCurrentChainId(state) === CHAIN_IDS.OPBNB_TESTNET
);
}
export function getIsOpStack(state) {
return getIsOptimism(state) || getIsBase(state);
return getIsOptimism(state) || getIsBase(state) || getIsOpbnb(state);
}
export function getIsMultiLayerFeeNetwork(state) {
return getIsOpStack(state);
}
/**
* To retrieve the maxBaseFee and priorityFee the user has set as default
*