|
|
@ -53,7 +53,7 @@ module.exports = class NetworkController extends EventEmitter { |
|
|
|
lookupNetwork () { |
|
|
|
lookupNetwork () { |
|
|
|
// Prevent firing when provider is not defined.
|
|
|
|
// Prevent firing when provider is not defined.
|
|
|
|
if (!this.ethQuery || !this.ethQuery.sendAsync) { |
|
|
|
if (!this.ethQuery || !this.ethQuery.sendAsync) { |
|
|
|
return |
|
|
|
return log.warn('NetworkController - lookupNetwork aborted due to missing ethQuery') |
|
|
|
} |
|
|
|
} |
|
|
|
this.ethQuery.sendAsync({ method: 'net_version' }, (err, network) => { |
|
|
|
this.ethQuery.sendAsync({ method: 'net_version' }, (err, network) => { |
|
|
|
if (err) return this.setNetworkState('loading') |
|
|
|
if (err) return this.setNetworkState('loading') |
|
|
|