1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

chainId string to number

This commit is contained in:
mihaisc 2020-08-11 11:56:18 +03:00
parent 8fa29871b7
commit 0dd64a647d

View File

@ -1,7 +1,7 @@
import { config } from 'process' import { config } from 'process'
export interface ConfigHelper { export interface ConfigHelper {
chainId: string chainId?: number
network: string network: string
url: string url: string
factoryAddress: string factoryAddress: string
@ -13,7 +13,7 @@ export interface ConfigHelper {
const configs = [ const configs = [
{ {
chaindId: '', chaindId: null,
network: 'development', network: 'development',
url: 'http://localhost:8545', url: 'http://localhost:8545',
factoryAddress: null, factoryAddress: null,
@ -22,7 +22,7 @@ const configs = [
poolFactoryAddress: null poolFactoryAddress: null
}, },
{ {
chainId: '4', chainId: 4,
network: 'rinkeby', network: 'rinkeby',
url: 'https://rinkeby.infura.io/v3', url: 'https://rinkeby.infura.io/v3',
factoryAddress: '0xcDfEe5D80041224cDCe9AE2334E85B3236385EA3', factoryAddress: '0xcDfEe5D80041224cDCe9AE2334E85B3236385EA3',
@ -32,7 +32,7 @@ const configs = [
poolFactoryAddress: '0xA4531C624A3D88323a1e178DABe1233AF178701B' poolFactoryAddress: '0xA4531C624A3D88323a1e178DABe1233AF178701B'
}, },
{ {
chainId: '1', chainId: 1,
network: 'mainnet', network: 'mainnet',
url: 'https://mainnet.infura.io/v3', url: 'https://mainnet.infura.io/v3',
factoryAddress: '0x1234', factoryAddress: '0x1234',
@ -72,7 +72,7 @@ export class ConfigHelper {
return confighelp return confighelp
} }
public getConfigById(chainId: string, infuraProjectId?: string): ConfigHelper { public getConfigById(chainId: number, infuraProjectId?: string): ConfigHelper {
const confighelp = new ConfigHelper() const confighelp = new ConfigHelper()
// fill unknown values // fill unknown values
confighelp.chainId = chainId confighelp.chainId = chainId