Merge pull request #19 from poanetwork/etc-fix
change 1' to 61 for ETC fixes
This commit is contained in:
commit
26c1688ead
|
@ -1,5 +1,4 @@
|
|||
const { networkIDs } = require('./enum')
|
||||
const { isClassic } = require('./helper')
|
||||
const {
|
||||
MAINNET_CODE,
|
||||
ROPSTEN_CODE,
|
||||
|
@ -67,7 +66,7 @@ const getExplorerTokenLinkFor = (tokenAddress, account, network) => {
|
|||
}
|
||||
|
||||
function getExplorerPrefix (network) {
|
||||
const net = isClassic ? network : parseInt(network)
|
||||
const net = parseInt(network)
|
||||
let prefix
|
||||
switch (net) {
|
||||
case MAINNET_CODE: // main net
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const { networkIDs } = require('./enum')
|
||||
const { isClassic } = require('./helper')
|
||||
const {
|
||||
MAINNET_CODE,
|
||||
ROPSTEN_CODE,
|
||||
|
@ -15,7 +14,7 @@ const {
|
|||
} = networkIDs
|
||||
|
||||
function getNetworkDisplayName(network) {
|
||||
const netID = isClassic(network) ? network : parseInt(network)
|
||||
const netID = parseInt(network)
|
||||
switch (netID) {
|
||||
case MAINNET_CODE:
|
||||
return 'Main Ethereum Network'
|
||||
|
@ -45,7 +44,7 @@ function getNetworkDisplayName(network) {
|
|||
}
|
||||
|
||||
function getNetworkCoinName(network) {
|
||||
const netID = isClassic ? network : parseInt(network)
|
||||
const netID = parseInt(network)
|
||||
switch (netID) {
|
||||
case SOKOL_CODE:
|
||||
case POA_CORE_CODE:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const { networkIDs } = require('./enum')
|
||||
const { isClassic } = require('./helper')
|
||||
const {
|
||||
MAINNET_CODE,
|
||||
ROPSTEN_CODE,
|
||||
|
@ -15,7 +14,7 @@ const {
|
|||
} = networkIDs
|
||||
|
||||
function getRPCEndpoints(network) {
|
||||
const netID = isClassic ? network : parseInt(network)
|
||||
const netID = parseInt(network)
|
||||
switch (netID) {
|
||||
case MAINNET_CODE:
|
||||
return ['https://mainnet.infura.io/']
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
const isClassic = (networkID) => {
|
||||
return networkID === '1\'' ? true : false
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isClassic
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "eth-net-props",
|
||||
"version": "1.0.17",
|
||||
"version": "1.0.19",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "eth-net-props",
|
||||
"version": "1.0.18",
|
||||
"version": "1.0.19",
|
||||
"description": "Get properties of EMV-based network",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
|
|
Loading…
Reference in New Issue