mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Add Duero network on getNetworkName.
This commit is contained in:
parent
6a5db2b314
commit
a821e1f7ef
@ -192,42 +192,19 @@ export class Keeper extends Instantiable {
|
|||||||
public getNetworkName(): Promise<string> {
|
public getNetworkName(): Promise<string> {
|
||||||
return this.web3.eth.net.getId()
|
return this.web3.eth.net.getId()
|
||||||
.then((networkId) => {
|
.then((networkId) => {
|
||||||
let network: string = "Unknown"
|
|
||||||
|
|
||||||
switch (networkId) {
|
switch (networkId) {
|
||||||
case 1:
|
case 1: return "Main"
|
||||||
network = "Main"
|
case 2: return "Morden"
|
||||||
break
|
case 3: return "Ropsten"
|
||||||
case 2:
|
case 4: return "Rinkeby"
|
||||||
network = "Morden"
|
case 77: return "POA_Sokol"
|
||||||
break
|
case 99: return "POA_Core"
|
||||||
case 3:
|
case 42: return "Kovan"
|
||||||
network = "Ropsten"
|
case 2199: return "Duero"
|
||||||
break
|
case 8996: return "Spree"
|
||||||
case 4:
|
case 8995: return "Nile"
|
||||||
network = "Rinkeby"
|
default: return "Development"
|
||||||
break
|
|
||||||
case 77:
|
|
||||||
network = "POA_Sokol"
|
|
||||||
break
|
|
||||||
case 99:
|
|
||||||
network = "POA_Core"
|
|
||||||
break
|
|
||||||
case 42:
|
|
||||||
network = "Kovan"
|
|
||||||
break
|
|
||||||
case 8996:
|
|
||||||
network = "Spree"
|
|
||||||
// network = "ocean_poa_net_local"
|
|
||||||
break
|
|
||||||
case 8995:
|
|
||||||
network = "Nile"
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
// Logger.log(`NetworkId ${networkId} not found defaulting`)
|
|
||||||
network = "Development"
|
|
||||||
}
|
}
|
||||||
return network
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user