mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 03:20:23 +01:00
30 lines
604 B
JavaScript
30 lines
604 B
JavaScript
const {
|
|
ROPSTEN,
|
|
RINKEBY,
|
|
KOVAN,
|
|
MAINNET,
|
|
ROPSTEN_CODE,
|
|
RINKEYBY_CODE,
|
|
KOVAN_CODE,
|
|
ROPSTEN_DISPLAY_NAME,
|
|
RINKEBY_DISPLAY_NAME,
|
|
KOVAN_DISPLAY_NAME,
|
|
MAINNET_DISPLAY_NAME,
|
|
} = require('./enums')
|
|
|
|
const networkToNameMap = {
|
|
[ROPSTEN]: ROPSTEN_DISPLAY_NAME,
|
|
[RINKEBY]: RINKEBY_DISPLAY_NAME,
|
|
[KOVAN]: KOVAN_DISPLAY_NAME,
|
|
[MAINNET]: MAINNET_DISPLAY_NAME,
|
|
[ROPSTEN_CODE]: ROPSTEN_DISPLAY_NAME,
|
|
[RINKEYBY_CODE]: RINKEBY_DISPLAY_NAME,
|
|
[KOVAN_CODE]: KOVAN_DISPLAY_NAME,
|
|
}
|
|
|
|
const getNetworkDisplayName = key => networkToNameMap[key]
|
|
|
|
module.exports = {
|
|
getNetworkDisplayName,
|
|
}
|