This commit is contained in:
Iuri Matias 2018-08-29 17:16:45 -04:00
parent af947910c4
commit 1be58863e7
2 changed files with 1 additions and 16 deletions

View File

@ -3,7 +3,5 @@ whenEnvIsLoaded(function(){
<%- block %>
});
if (EmbarkJS) {
EmbarkJS.environment = "<%- environment %>";
}
EmbarkJS.environment = "<%- environment %>";
});

View File

@ -103,13 +103,6 @@ class CodeGenerator {
});
}
//generateContext() {
// let result = "";
// result += Templates.main_context();
// result += Templates.load_manager();
// return result;
//}
generateProvider(isDeployment) {
let self = this;
let result = "";
@ -350,11 +343,6 @@ class CodeGenerator {
contractCode += contractName + "JSONConfig.web3 = web3;\n";
contractCode += "let " + contractName + " = new EmbarkJS.Blockchain.Contract(" + contractName + "JSONConfig);\n";
//contractCode += "\n__embarkContext.execWhenReady(function() {\n";
//contractCode += "\n" + contractName + ".setProvider(web3.currentProvider);\n";
//contractCode += "\n" + contractName + ".options.from = web3.eth.defaultAccount;\n";
//contractCode += "\n});\n";
contractCode += "export default " + contractName + ";\n";
cb(contractCode);
}
@ -386,7 +374,6 @@ class CodeGenerator {
let providerCode = self.generateProvider(false);
code += providerCode;
//code += "\nglobal.__embarkContext = __mainContext.__loadManagerInstance;\n";
code += "\nexport default web3;\n";
next(null, code);
}