diff --git a/lib/contracts/code_generator.js b/lib/contracts/code_generator.js index 046824d7..e7adc4c9 100644 --- a/lib/contracts/code_generator.js +++ b/lib/contracts/code_generator.js @@ -27,7 +27,7 @@ class CodeGenerator { this.storageConfig = options.storageConfig || {}; this.communicationConfig = options.communicationConfig || {}; this.namesystemConfig = options.namesystemConfig || {}; - this.env = options.env || ''; + this.env = options.env || 'development'; // TODO: this should also be removed and use events instead this.contractsManager = options.contractsManager; this.plugins = options.plugins; diff --git a/lib/contracts/code_templates/web3-connector.js.ejs b/lib/contracts/code_templates/web3-connector.js.ejs index 5c245736..0509b813 100644 --- a/lib/contracts/code_templates/web3-connector.js.ejs +++ b/lib/contracts/code_templates/web3-connector.js.ejs @@ -27,7 +27,7 @@ __reduce(<%- connectionList %>,function(prev, value, next) { __getAccounts(function(err, accounts) { web3.eth.defaultAccount = accounts[0]; <% if (warnAboutMetamask) { %> - if (web3.eth.currentProvider.isMetamask === true) { + if (web3.eth.currentProvider.isMetaMask) { console.log("Note: Embark has detected you are in the development environment and using Metamask, please make it's connecting to your local node"); } <% } %>