From 2f828c72d1507826eb21f4e9d8510b62cfb6d2fe Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 7 Jul 2018 19:49:18 +0300 Subject: [PATCH] re-add set providers call --- lib/modules/storage/index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/modules/storage/index.js b/lib/modules/storage/index.js index 48eaf9a2c..80591b92b 100644 --- a/lib/modules/storage/index.js +++ b/lib/modules/storage/index.js @@ -23,12 +23,13 @@ class Storage { if (!this._storageConfig.enabled) return; - // // filter list of dapp connections based on available_providers set in config - // let hasSwarm = _.contains(this._storageConfig.available_providers, 'swarm'); // don't need to eval this in every loop iteration - // // contains valid dapp storage providers - // this._validDappProviders = _.filter(this._storageConfig.dappConnection, (conn) => { - // return _.contains(this._storageConfig.available_providers, conn.provider) || (conn === '$BZZ' && hasSwarm); - // }); + // filter list of dapp connections based on available_providers set in config + let hasSwarm = _.contains(this._storageConfig.available_providers, 'swarm'); // don't need to eval this in every loop iteration + // contains valid dapp storage providers + this._validDappProviders = _.filter(this._storageConfig.dappConnection, (conn) => { + return _.contains(self._storageConfig.available_providers, conn.provider) || (conn === '$BZZ' && hasSwarm); + }); + this.addSetProviders(); // this.initStorageForEmbark(); // this.initStorageForDapp();