fix metamask check for non dev environment

This commit is contained in:
Iuri Matias 2018-06-29 18:00:21 -04:00
parent db3356cec0
commit 6ee387653d
1 changed files with 2 additions and 6 deletions

View File

@ -126,7 +126,6 @@ class CodeGenerator {
result += plugin.generateProvider(self) + "\n";
});
} else {
let web3Load;
if (isDeployment) {
@ -134,11 +133,8 @@ class CodeGenerator {
web3Load = Templates.define_web3_simple({url: connection, done: 'done();'});
} else {
let connectionList = "[" + this.contractsConfig.dappConnection.map((x) => '"' + x + '"').join(',') + "]";
if (self.env === 'development') {
web3Load = Templates.web3_connector({connectionList: connectionList, done: 'done(err);', warnAboutMetamask: true});
} else {
web3Load = Templates.web3_connector({connectionList: connectionList, done: 'done(err);', warnAboutMetamask: true});
}
let isDev = (self.env === 'development');
web3Load = Templates.web3_connector({connectionList: connectionList, done: 'done(err);', warnAboutMetamask: isDev});
}
result += Templates.do_when_loaded({block: web3Load});