refactor(modules/whisper): use ProcessManager APIs to launch process

This commit is contained in:
Pascal Precht 2018-10-11 15:35:11 +02:00
parent 3dd28b9459
commit be3c792144
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 11 additions and 5 deletions

View File

@ -22,12 +22,18 @@ class Whisper {
} }
this.connectToProvider(); this.connectToProvider();
this.setServiceCheck();
this.addWhisperToEmbarkJS(); this.events.request('processes:register', 'whisper', (cb) => {
this.addSetProvider(); this.setServiceCheck()
this.waitForWeb3Ready(() => { this.addWhisperToEmbarkJS();
this.registerAPICalls(); this.addSetProvider();
this.waitForWeb3Ready(() => {
this.registerAPICalls();
cb();
});
}); });
this.events.request('processes:launch', 'whisper');
} }
connectToProvider() { connectToProvider() {