mirror of https://github.com/embarklabs/embark.git
take into account available providers list
This commit is contained in:
parent
cb5230f569
commit
d1a207941d
|
@ -289,7 +289,7 @@ class CodeGenerator {
|
|||
let embarkjsCode = fs.readFileSync(fs.embarkPath('js/embark.js')).toString();
|
||||
let code = "";
|
||||
|
||||
code += "\nimport Web3 from '" + utils.joinPath(fs.embarkPath("js/web3-1.0.min.js")) + "'\n";
|
||||
code += "\nimport Web3 from '" + utils.joinPath(fs.embarkPath("js/web3-1.0.min.js")) + "';\n";
|
||||
code += "\nimport web3 from 'Embark/web3';\n";
|
||||
|
||||
code += "\n" + embarkjsCode + "\n";
|
||||
|
|
|
@ -86,10 +86,12 @@ class IPFS {
|
|||
}
|
||||
|
||||
addIPFSToEmbarkJS() {
|
||||
// TODO: make this a shouldAdd condition
|
||||
if (this.storageConfig === {}) {
|
||||
return;
|
||||
}
|
||||
if(this.storageConfig.provider !== 'ipfs' || this.storageConfig.enabled !== true) {
|
||||
|
||||
if ((this.storageConfig.available_providers.indexOf('ipfs') < 0) && (this.storageConfig.provider !== 'ipfs' || this.storageConfig.enabled !== true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class Whisper {
|
|||
if (this.communicationConfig === {}) {
|
||||
return;
|
||||
}
|
||||
if(this.communicationConfig.provider !== 'whisper' || this.communicationConfig.enabled !== true) {
|
||||
if ((this.communicationConfig.available_providers.indexOf('whisper') < 0) && (this.communicationConfig.provider !== 'whisper' || this.communicationConfig.enabled !== true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue