diff --git a/lib/contracts/abi.js b/lib/contracts/abi.js index 7246de69..86480995 100644 --- a/lib/contracts/abi.js +++ b/lib/contracts/abi.js @@ -108,10 +108,8 @@ ABIGenerator.prototype.generateABI = function(options) { result += this.generateProvider(); result += this.generateContracts(options.useEmbarkJS); - - // TODO: disable this for now until refactor is over - //result += this.generateStorageInitialization(options.useEmbarkJS); - //result += this.generateCommunicationInitialization(options.useEmbarkJS); + result += this.generateStorageInitialization(options.useEmbarkJS); + result += this.generateCommunicationInitialization(options.useEmbarkJS); return result; }; diff --git a/lib/contracts/deploy_manager.js b/lib/contracts/deploy_manager.js index 2e2baff7..7a83a954 100644 --- a/lib/contracts/deploy_manager.js +++ b/lib/contracts/deploy_manager.js @@ -8,12 +8,19 @@ var ABIGenerator = require('./abi.js'); var DeployManager = function(options) { this.config = options.config; this.logger = options.logger; + this.blockchainConfig = this.config.blockchainConfig; this.plugins = options.plugins; this.events = options.events; }; DeployManager.prototype.deployContracts = function(done) { var self = this; + + if (self.blockchainConfig === {} || self.blockchainConfig.enabled === false) { + self.logger.info("Blockchain component is disabled in the config".underline); + return done(); + } + async.waterfall([ function buildContracts(callback) { var contractsManager = new ContractsManager({ diff --git a/test_app/config/communication.json b/test_app/config/communication.json index fb96acac..bccfad7d 100644 --- a/test_app/config/communication.json +++ b/test_app/config/communication.json @@ -1,5 +1,6 @@ { "default": { + "enabled": false, "provider": "whisper" } }