diff --git a/lib/contracts/blockchain.js b/lib/contracts/blockchain.js index b1c4d3c05..6ff218cee 100644 --- a/lib/contracts/blockchain.js +++ b/lib/contracts/blockchain.js @@ -48,7 +48,6 @@ class Blockchain { if (this.contractsConfig.deployment.type !== "rpc" && this.contractsConfig.deployment.type !== "ws") { const message = __("contracts config error: unknown deployment type %s", this.contractsConfig.deployment.type); this.logger.error(message); - //return cb(message); } const protocol = (this.contractsConfig.deployment.type === "rpc") ? this.contractsConfig.deployment.protocol : 'ws'; @@ -283,7 +282,10 @@ class Blockchain { } getGasPrice(cb) { - this.web3.eth.getGasPrice(cb); + const self = this; + this.onReady(() => { + self.web3.eth.getGasPrice(cb); + }); } ContractObject(params) { diff --git a/lib/modules/graph/index.js b/lib/modules/graph/index.js index cc29ee1f5..9f4ff0fce 100644 --- a/lib/modules/graph/index.js +++ b/lib/modules/graph/index.js @@ -2,6 +2,7 @@ const async = require('async'); const Viz = require('viz.js'); const fs = require('fs'); +// TODO: refactor this class to use the plugin api and not refeneences directly class GraphGenerator { constructor(embark, _options) { const self = this;