re-add context code

This commit is contained in:
Iuri Matias 2018-08-29 16:26:12 -04:00
parent 262a6d3aef
commit af947910c4
2 changed files with 10 additions and 8 deletions

View File

@ -1,5 +1,7 @@
whenEnvIsLoaded(function(){
<%- block %>
__mainContext.__loadManagerInstance.doFirst(function(done) {
<%- block %>
});
if (EmbarkJS) {
EmbarkJS.environment = "<%- environment %>";

View File

@ -103,12 +103,12 @@ class CodeGenerator {
});
}
generateContext() {
let result = "";
result += Templates.main_context();
result += Templates.load_manager();
return result;
}
//generateContext() {
// let result = "";
// result += Templates.main_context();
// result += Templates.load_manager();
// return result;
//}
generateProvider(isDeployment) {
let self = this;
@ -386,7 +386,7 @@ class CodeGenerator {
let providerCode = self.generateProvider(false);
code += providerCode;
code += "\nglobal.__embarkContext = __mainContext.__loadManagerInstance;\n";
//code += "\nglobal.__embarkContext = __mainContext.__loadManagerInstance;\n";
code += "\nexport default web3;\n";
next(null, code);
}