get blockchain object from event bus

This commit is contained in:
Iuri Matias 2018-07-27 16:03:15 -04:00
parent 6c662c02c6
commit 0ffc767f92
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,10 @@ class BlockchainConnector {
cb(self.isWeb3Ready); cb(self.isWeb3Ready);
}); });
self.events.setCommandHandler("blockchain:object", (cb) => {
cb(self);
});
if (!this.web3) { if (!this.web3) {
this.initWeb3(); this.initWeb3();
} else { } else {

View File

@ -218,7 +218,7 @@ class Engine {
this.registerModule('blockchain_connector', { this.registerModule('blockchain_connector', {
isDev: this.isDev, isDev: this.isDev,
web3: options.web3 web3: options.web3
}); })); /*eslint no-new: "off"*/
this.registerModule('whisper'); this.registerModule('whisper');
} }