mirror of https://github.com/embarklabs/embark.git
fix metamask check for non dev environment
This commit is contained in:
parent
db3356cec0
commit
6ee387653d
|
@ -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});
|
||||
|
|
Loading…
Reference in New Issue