diff --git a/lib/core/engine.js b/lib/core/engine.js index 9b16e829d..782c5a514 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -268,7 +268,9 @@ class Engine { this.registerModule('swarm', { addCheck: this.servicesMonitor.addCheck.bind(this.servicesMonitor), storageConfig: this.config.storageConfig, - bzz: _options.bzz + // TODO: this should not be needed and should be deducted from the config instead + // the eth provider is not necessary the same as the swarm one + bzz: this.blockchain.web3.bzz }); } @@ -286,7 +288,7 @@ class Engine { communicationConfig: this.config.communicationConfig, // TODO: this should not be needed and should be deducted from the config instead // the eth provider is not necessary the same as the whisper one - web3: this.web3 + web3: this.blockchain.web3 }); } diff --git a/lib/index.js b/lib/index.js index 00dcb5f43..b66da112a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -132,7 +132,8 @@ class Embark { engine.startService("pipeline"); engine.startService("codeGenerator"); engine.startService("deployment"); - engine.startService(engine.config.storageConfig.provider, {bzz: engine.web3.bzz}); + // TODO: this should be just 'storage' and the storage should figure out the module + engine.startService(engine.config.storageConfig.provider); engine.events.on('check:backOnline:Ethereum', function () { engine.logger.info(__('Ethereum node detected') + '..'); @@ -205,8 +206,9 @@ class Embark { engine.startService("pipeline"); engine.startService("codeGenerator"); engine.startService("deployment", {onlyCompile: options.onlyCompile}); + // TODO: this should be just 'storage' and the storage should figure out the modules to load engine.startService("ipfs"); - engine.startService("swarm", {bzz: engine.web3.bzz}); + engine.startService("swarm"); callback(); }, function deploy(callback) { @@ -319,7 +321,8 @@ class Embark { engine.startService("pipeline"); engine.startService("codeGenerator"); engine.startService("deployment"); - engine.startService(platform.toLowerCase(), {bzz: engine.web3.bzz}); + // TODO: this should be just 'storage' and the storage should figure out the modules to load + engine.startService(platform.toLowerCase()); engine.startMonitor(); callback(); },