mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-12 06:54:58 +00:00
re-add events
This commit is contained in:
parent
91cc554978
commit
94422cd893
@ -32,7 +32,6 @@ class Blockchain {
|
|||||||
this.registerRequests();
|
this.registerRequests();
|
||||||
this.registerWeb3Object();
|
this.registerWeb3Object();
|
||||||
this.registerEvents();
|
this.registerEvents();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initWeb3() {
|
initWeb3() {
|
||||||
@ -71,19 +70,19 @@ class Blockchain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
registerEvents() {
|
registerEvents() {
|
||||||
//const self = this;
|
const self = this;
|
||||||
//self.events.on('check:wentOffline:Ethereum', () => {
|
self.events.on('check:wentOffline:Ethereum', () => {
|
||||||
// self.logger.trace('Ethereum went offline: stopping web3 provider...');
|
self.logger.trace('Ethereum went offline: stopping web3 provider...');
|
||||||
// self.provider.stop();
|
self.provider.stop();
|
||||||
|
|
||||||
// // once the node goes back online, we can restart the provider
|
// once the node goes back online, we can restart the provider
|
||||||
// self.events.once('check:backOnline:Ethereum', () => {
|
self.events.once('check:backOnline:Ethereum', () => {
|
||||||
// self.logger.trace('Ethereum back online: starting web3 provider...');
|
self.logger.trace('Ethereum back online: starting web3 provider...');
|
||||||
// self.provider.startWeb3Provider(() => {
|
self.provider.startWeb3Provider(() => {
|
||||||
// self.logger.trace('web3 provider restarted after ethereum node came back online');
|
self.logger.trace('web3 provider restarted after ethereum node came back online');
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
//});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onReady(callback) {
|
onReady(callback) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user