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