cleanup
This commit is contained in:
parent
af947910c4
commit
1be58863e7
|
@ -3,7 +3,5 @@ whenEnvIsLoaded(function(){
|
||||||
<%- block %>
|
<%- block %>
|
||||||
});
|
});
|
||||||
|
|
||||||
if (EmbarkJS) {
|
EmbarkJS.environment = "<%- environment %>";
|
||||||
EmbarkJS.environment = "<%- environment %>";
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -103,13 +103,6 @@ class CodeGenerator {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//generateContext() {
|
|
||||||
// let result = "";
|
|
||||||
// result += Templates.main_context();
|
|
||||||
// result += Templates.load_manager();
|
|
||||||
// return result;
|
|
||||||
//}
|
|
||||||
|
|
||||||
generateProvider(isDeployment) {
|
generateProvider(isDeployment) {
|
||||||
let self = this;
|
let self = this;
|
||||||
let result = "";
|
let result = "";
|
||||||
|
@ -350,11 +343,6 @@ class CodeGenerator {
|
||||||
contractCode += contractName + "JSONConfig.web3 = web3;\n";
|
contractCode += contractName + "JSONConfig.web3 = web3;\n";
|
||||||
contractCode += "let " + contractName + " = new EmbarkJS.Blockchain.Contract(" + contractName + "JSONConfig);\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";
|
contractCode += "export default " + contractName + ";\n";
|
||||||
cb(contractCode);
|
cb(contractCode);
|
||||||
}
|
}
|
||||||
|
@ -386,7 +374,6 @@ class CodeGenerator {
|
||||||
|
|
||||||
let providerCode = self.generateProvider(false);
|
let providerCode = self.generateProvider(false);
|
||||||
code += providerCode;
|
code += providerCode;
|
||||||
//code += "\nglobal.__embarkContext = __mainContext.__loadManagerInstance;\n";
|
|
||||||
code += "\nexport default web3;\n";
|
code += "\nexport default web3;\n";
|
||||||
next(null, code);
|
next(null, code);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue