2018-04-12 23:17:36 +02:00
|
|
|
const {
|
|
|
|
ROPSTEN,
|
|
|
|
RINKEBY,
|
|
|
|
KOVAN,
|
|
|
|
MAINNET,
|
2019-04-17 19:34:49 +02:00
|
|
|
GOERLI,
|
2018-04-12 23:17:36 +02:00
|
|
|
ROPSTEN_CODE,
|
|
|
|
RINKEYBY_CODE,
|
|
|
|
KOVAN_CODE,
|
2019-04-17 19:34:49 +02:00
|
|
|
GOERLI_CODE,
|
2018-04-12 23:17:36 +02:00
|
|
|
ROPSTEN_DISPLAY_NAME,
|
|
|
|
RINKEBY_DISPLAY_NAME,
|
|
|
|
KOVAN_DISPLAY_NAME,
|
|
|
|
MAINNET_DISPLAY_NAME,
|
2019-04-17 19:34:49 +02:00
|
|
|
GOERLI_DISPLAY_NAME,
|
2018-04-12 23:17:36 +02:00
|
|
|
} = require('./enums')
|
|
|
|
|
|
|
|
const networkToNameMap = {
|
|
|
|
[ROPSTEN]: ROPSTEN_DISPLAY_NAME,
|
|
|
|
[RINKEBY]: RINKEBY_DISPLAY_NAME,
|
|
|
|
[KOVAN]: KOVAN_DISPLAY_NAME,
|
|
|
|
[MAINNET]: MAINNET_DISPLAY_NAME,
|
2019-04-17 19:34:49 +02:00
|
|
|
[GOERLI]: GOERLI_DISPLAY_NAME,
|
2018-04-12 23:17:36 +02:00
|
|
|
[ROPSTEN_CODE]: ROPSTEN_DISPLAY_NAME,
|
|
|
|
[RINKEYBY_CODE]: RINKEBY_DISPLAY_NAME,
|
|
|
|
[KOVAN_CODE]: KOVAN_DISPLAY_NAME,
|
2019-04-17 19:34:49 +02:00
|
|
|
[GOERLI_CODE]: GOERLI_DISPLAY_NAME,
|
2018-04-12 23:17:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const getNetworkDisplayName = key => networkToNameMap[key]
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
getNetworkDisplayName,
|
|
|
|
}
|