Merge pull request #19 from poanetwork/etc-fix

change 1' to 61 for ETC fixes
This commit is contained in:
Victor Baranov 2019-03-27 21:20:24 +03:00 committed by GitHub
commit 26c1688ead
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 16 deletions

View File

@ -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

View File

@ -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:

View File

@ -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/']

View File

@ -1,7 +0,0 @@
const isClassic = (networkID) => {
return networkID === '1\'' ? true : false
}
module.exports = {
isClassic
}

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "eth-net-props",
"version": "1.0.17",
"version": "1.0.19",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -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": {