check for network ID for live/test matching

This commit is contained in:
Jaco Greeff 2016-11-24 15:46:25 +01:00
parent 54ad70313c
commit 6b9b31ad37

View File

@ -242,6 +242,7 @@ export default class Status {
Promise Promise
.all([ .all([
this._api.web3.clientVersion(), this._api.web3.clientVersion(),
this._api.net.version(),
this._api.parity.defaultExtraData(), this._api.parity.defaultExtraData(),
this._api.parity.netChain(), this._api.parity.netChain(),
this._api.parity.netPort(), this._api.parity.netPort(),
@ -249,9 +250,11 @@ export default class Status {
newConnection ? Promise.resolve(null) : this._api.parity.enode() newConnection ? Promise.resolve(null) : this._api.parity.enode()
]) ])
.then(([ .then(([
clientVersion, defaultExtraData, netChain, netPort, rpcSettings, enode clientVersion, netVersion, defaultExtraData, netChain, netPort, rpcSettings, enode
]) => { ]) => {
const isTest = netChain === 'morden' || netChain === 'ropsten' || netChain === 'testnet'; const isTest =
netVersion === '2' || // morden
netVersion === '3'; // ropsten
const longStatus = { const longStatus = {
clientVersion, clientVersion,