{"action":"created","comment":{"url":"https://api.github.com/repos/embark-framework/embark/pulls/comments/200856688","pull_request_review_id":135247832,"id":200856688,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDg1NjY4OA==","diff_hunk":"@@ -66,20 +58,31 @@ class IPFS {\n         }\n         self.logger.trace(\"IPFS available\");\n         return cb({name: \"IPFS \", status: 'on'});\n-      }\n+      });\n     });\n   }\n \n-  addProviderToEmbarkJS() {\n-    const self = this;\n-    // TODO: make this a shouldAdd condition\n-    if (this.storageConfig === {}) {\n-      return;\n+  _getNodeUrl() {\n+    if (this.storageConfig.upload.provider === 'ipfs') {\n+      let {protocol, host, port} = this.storageConfig.upload;\n+      return (protocol || 'http') + '://' + host + ':' + port + '/api/v0/version';\n     }\n \n-    if (this.storageConfig.available_providers.indexOf('ipfs') < 0 || _.findWhere(this.storageConfig.dappConnection, {'provider': 'ipfs'}) === undefined || this.storageConfig.enabled !== true) {\n-      return;\n+    for (let connection of this.storageConfig.dappConnection) {\n+      if (connection.provider === 'ipfs') {","path":"lib/modules/ipfs/index.js","position":103,"original_position":103,"commit_id":"4aaf83a064eafcba31c59eae3b57f9b99fbb4c2a","original_commit_id":"4aaf83a064eafcba31c59eae3b57f9b99fbb4c2a","user":{"login":"emizzle","id":5089238,"node_id":"MDQ6VXNlcjUwODkyMzg=","avatar_url":"https://avatars0.githubusercontent.com/u/5089238?v=4","gravatar_id":"","url":"https://api.github.com/users/emizzle","html_url":"https://github.com/emizzle","followers_url":"https://api.github.com/users/emizzle/followers","following_url":"https://api.github.com/users/emizzle/following{/other_user}","gists_url":"https://api.github.com/users/emizzle/gists{/gist_id}","starred_url":"https://api.github.com/users/emizzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emizzle/subscriptions","organizations_url":"https://api.github.com/users/emizzle/orgs","repos_url":"https://api.github.com/users/emizzle/repos","events_url":"https://api.github.com/users/emizzle/events{/privacy}","received_events_url":"https://api.github.com/users/emizzle/received_events","type":"User","site_admin":false},"body":"What about the case when the user has specified an upload provider as well as a dappConnection provider that are both ipfs, but point to different ipfs urls? Maybe this use case is not supported?","created_at":"2018-07-08T22:41:27Z","updated_at":"2018-07-08T23:04:45Z","html_url":"https://github.com/embark-framework/embark/pull/609#discussion_r200856688","pull_request_url":"https://api.github.com/repos/embark-framework/embark/pulls/609","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/comments/200856688"},"html":{"href":"https://github.com/embark-framework/embark/pull/609#discussion_r200856688"},"pull_request":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/609"}},"in_reply_to_id":200856451},"pull_request":{"url":"https://api.github.com/repos/embark-framework/embark/pulls/609","id":199963377,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5OTYzMzc3","html_url":"https://github.com/embark-framework/embark/pull/609","diff_url":"https://github.com/embark-framework/embark/pull/609.diff","patch_url":"https://github.com/embark-framework/embark/pull/609.patch","issue_url":"https://api.github.com/repos/embark-framework/embark/issues/609","number":609,"state":"open","locked":false,"title":"Refactor storage component","user":{"login":"iurimatias","id":176720,"node_id":"MDQ6VXNlcjE3NjcyMA==","avatar_url":"https://avatars2.githubusercontent.com/u/176720?v=4","gravatar_id":"","url":"https://api.github.com/users/iurimatias","html_url":"https://github.com/iurimatias","followers_url":"https://api.github.com/users/iurimatias/followers","following_url":"https://api.github.com/users/iurimatias/following{/other_user}","gists_url":"https://api.github.com/users/iurimatias/gists{/gist_id}","starred_url":"https://api.github.com/users/iurimatias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iurimatias/subscriptions","organizations_url":"https://api.github.com/users/iurimatias/orgs","repos_url":"https://api.github.com/users/iurimatias/repos","events_url":"https://api.github.com/users/iurimatias/events{/privacy}","received_events_url":"https://api.github.com/users/iurimatias/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-08T22:10:11Z","updated_at":"2018-07-08T23:04:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be5631cd184608c551469b3ea9ae9729f0e37ad3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"andremedeiros","id":9689,"node_id":"MDQ6VXNlcjk2ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/9689?v=4","gravatar_id":"","url":"https://api.github.com/users/andremedeiros","html_url":"https://github.com/andremedeiros","followers_url":"https://api.github.com/users/andremedeiros/followers","following_url":"https://api.github.com/users/andremedeiros/following{/other_user}","gists_url":"https://api.github.com/users/andremedeiros/gists{/gist_id}","starred_url":"https://api.github.com/users/andremedeiros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andremedeiros/subscriptions","organizations_url":"https://api.github.com/users/andremedeiros/orgs","repos_url":"https://api.github.com/users/andremedeiros/repos","events_url":"https://api.github.com/users/andremedeiros/events{/privacy}","received_events_url":"https://api.github.com/users/andremedeiros/received_events","type":"User","site_admin":false},{"login":"michaelsbradleyjr","id":194260,"node_id":"MDQ6VXNlcjE5NDI2MA==","avatar_url":"https://avatars0.githubusercontent.com/u/194260?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelsbradleyjr","html_url":"https://github.com/michaelsbradleyjr","followers_url":"https://api.github.com/users/michaelsbradleyjr/followers","following_url":"https://api.github.com/users/michaelsbradleyjr/following{/other_user}","gists_url":"https://api.github.com/users/michaelsbradleyjr/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsbradleyjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsbradleyjr/subscriptions","organizations_url":"https://api.github.com/users/michaelsbradleyjr/orgs","repos_url":"https://api.github.com/users/michaelsbradleyjr/repos","events_url":"https://api.github.com/users/michaelsbradleyjr/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsbradleyjr/received_events","type":"User","site_admin":false},{"login":"VoR0220","id":7756785,"node_id":"MDQ6VXNlcjc3NTY3ODU=","avatar_url":"https://avatars2.githubusercontent.com/u/7756785?v=4","gravatar_id":"","url":"https://api.github.com/users/VoR0220","html_url":"https://github.com/VoR0220","followers_url":"https://api.github.com/users/VoR0220/followers","following_url":"https://api.github.com/users/VoR0220/following{/other_user}","gists_url":"https://api.github.com/users/VoR0220/gists{/gist_id}","starred_url":"https://api.github.com/users/VoR0220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoR0220/subscriptions","organizations_url":"https://api.github.com/users/VoR0220/orgs","repos_url":"https://api.github.com/users/VoR0220/repos","events_url":"https://api.github.com/users/VoR0220/events{/privacy}","received_events_url":"https://api.github.com/users/VoR0220/received_events","type":"User","site_admin":false},{"login":"jrainville","id":11926403,"node_id":"MDQ6VXNlcjExOTI2NDAz","avatar_url":"https://avatars3.githubusercontent.com/u/11926403?v=4","gravatar_id":"","url":"https://api.github.com/users/jrainville","html_url":"https://github.com/jrainville","followers_url":"https://api.github.com/users/jrainville/followers","following_url":"https://api.github.com/users/jrainville/following{/other_user}","gists_url":"https://api.github.com/users/jrainville/gists{/gist_id}","starred_url":"https://api.github.com/users/jrainville/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrainville/subscriptions","organizations_url":"https://api.github.com/users/jrainville/orgs","repos_url":"https://api.github.com/users/jrainville/repos","events_url":"https://api.github.com/users/jrainville/events{/privacy}","received_events_url":"https://api.github.com/users/jrainville/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/embark-framework/embark/pulls/609/commits","review_comments_url":"https://api.github.com/repos/embark-framework/embark/pulls/609/comments","review_comment_url":"https://api.github.com/repos/embark-framework/embark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/embark-framework/embark/issues/609/comments","statuses_url":"https://api.github.com/repos/embark-framework/embark/statuses/4aaf83a064eafcba31c59eae3b57f9b99fbb4c2a","head":{"label":"embark-framework:refactor_storage_component","ref":"refactor_storage_component","sha":"4aaf83a064eafcba31c59eae3b57f9b99fbb4c2a","user":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":36172821,"node_id":"MDEwOlJlcG9zaXRvcnkzNjE3MjgyMQ==","name":"embark","full_name":"embark-framework/embark","owner":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/embark-framework/embark","description":"Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms","fork":false,"url":"https://api.github.com/repos/embark-framework/embark","forks_url":"https://api.github.com/repos/embark-framework/embark/forks","keys_url":"https://api.github.com/repos/embark-framework/embark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/embark-framework/embark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/embark-framework/embark/teams","hooks_url":"https://api.github.com/repos/embark-framework/embark/hooks","issue_events_url":"https://api.github.com/repos/embark-framework/embark/issues/events{/number}","events_url":"https://api.github.com/repos/embark-framework/embark/events","assignees_url":"https://api.github.com/repos/embark-framework/embark/assignees{/user}","branches_url":"https://api.github.com/repos/embark-framework/embark/branches{/branch}","tags_url":"https://api.github.com/repos/embark-framework/embark/tags","blobs_url":"https://api.github.com/repos/embark-framework/embark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/embark-framework/embark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/embark-framework/embark/git/refs{/sha}","trees_url":"https://api.github.com/repos/embark-framework/embark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/embark-framework/embark/statuses/{sha}","languages_url":"https://api.github.com/repos/embark-framework/embark/languages","stargazers_url":"https://api.github.com/repos/embark-framework/embark/stargazers","contributors_url":"https://api.github.com/repos/embark-framework/embark/contributors","subscribers_url":"https://api.github.com/repos/embark-framework/embark/subscribers","subscription_url":"https://api.github.com/repos/embark-framework/embark/subscription","commits_url":"https://api.github.com/repos/embark-framework/embark/commits{/sha}","git_commits_url":"https://api.github.com/repos/embark-framework/embark/git/commits{/sha}","comments_url":"https://api.github.com/repos/embark-framework/embark/comments{/number}","issue_comment_url":"https://api.github.com/repos/embark-framework/embark/issues/comments{/number}","contents_url":"https://api.github.com/repos/embark-framework/embark/contents/{+path}","compare_url":"https://api.github.com/repos/embark-framework/embark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/embark-framework/embark/merges","archive_url":"https://api.github.com/repos/embark-framework/embark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/embark-framework/embark/downloads","issues_url":"https://api.github.com/repos/embark-framework/embark/issues{/number}","pulls_url":"https://api.github.com/repos/embark-framework/embark/pulls{/number}","milestones_url":"https://api.github.com/repos/embark-framework/embark/milestones{/number}","notifications_url":"https://api.github.com/repos/embark-framework/embark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/embark-framework/embark/labels{/name}","releases_url":"https://api.github.com/repos/embark-framework/embark/releases{/id}","deployments_url":"https://api.github.com/repos/embark-framework/embark/deployments","created_at":"2015-05-24T13:10:10Z","updated_at":"2018-07-08T21:53:31Z","pushed_at":"2018-07-08T22:24:36Z","git_url":"git://github.com/embark-framework/embark.git","ssh_url":"git@github.com:embark-framework/embark.git","clone_url":"https://github.com/embark-framework/embark.git","svn_url":"https://github.com/embark-framework/embark","homepage":"https://embark.status.im/","size":9626,"stargazers_count":2096,"watchers_count":2096,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":300,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":300,"open_issues":16,"watchers":2096,"default_branch":"develop"}},"base":{"label":"embark-framework:develop","ref":"develop","sha":"d40ae2f3747c4e0e02983f91387e0ca9ddd8eb44","user":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":36172821,"node_id":"MDEwOlJlcG9zaXRvcnkzNjE3MjgyMQ==","name":"embark","full_name":"embark-framework/embark","owner":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/embark-framework/embark","description":"Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms","fork":false,"url":"https://api.github.com/repos/embark-framework/embark","forks_url":"https://api.github.com/repos/embark-framework/embark/forks","keys_url":"https://api.github.com/repos/embark-framework/embark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/embark-framework/embark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/embark-framework/embark/teams","hooks_url":"https://api.github.com/repos/embark-framework/embark/hooks","issue_events_url":"https://api.github.com/repos/embark-framework/embark/issues/events{/number}","events_url":"https://api.github.com/repos/embark-framework/embark/events","assignees_url":"https://api.github.com/repos/embark-framework/embark/assignees{/user}","branches_url":"https://api.github.com/repos/embark-framework/embark/branches{/branch}","tags_url":"https://api.github.com/repos/embark-framework/embark/tags","blobs_url":"https://api.github.com/repos/embark-framework/embark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/embark-framework/embark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/embark-framework/embark/git/refs{/sha}","trees_url":"https://api.github.com/repos/embark-framework/embark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/embark-framework/embark/statuses/{sha}","languages_url":"https://api.github.com/repos/embark-framework/embark/languages","stargazers_url":"https://api.github.com/repos/embark-framework/embark/stargazers","contributors_url":"https://api.github.com/repos/embark-framework/embark/contributors","subscribers_url":"https://api.github.com/repos/embark-framework/embark/subscribers","subscription_url":"https://api.github.com/repos/embark-framework/embark/subscription","commits_url":"https://api.github.com/repos/embark-framework/embark/commits{/sha}","git_commits_url":"https://api.github.com/repos/embark-framework/embark/git/commits{/sha}","comments_url":"https://api.github.com/repos/embark-framework/embark/comments{/number}","issue_comment_url":"https://api.github.com/repos/embark-framework/embark/issues/comments{/number}","contents_url":"https://api.github.com/repos/embark-framework/embark/contents/{+path}","compare_url":"https://api.github.com/repos/embark-framework/embark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/embark-framework/embark/merges","archive_url":"https://api.github.com/repos/embark-framework/embark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/embark-framework/embark/downloads","issues_url":"https://api.github.com/repos/embark-framework/embark/issues{/number}","pulls_url":"https://api.github.com/repos/embark-framework/embark/pulls{/number}","milestones_url":"https://api.github.com/repos/embark-framework/embark/milestones{/number}","notifications_url":"https://api.github.com/repos/embark-framework/embark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/embark-framework/embark/labels{/name}","releases_url":"https://api.github.com/repos/embark-framework/embark/releases{/id}","deployments_url":"https://api.github.com/repos/embark-framework/embark/deployments","created_at":"2015-05-24T13:10:10Z","updated_at":"2018-07-08T21:53:31Z","pushed_at":"2018-07-08T22:24:36Z","git_url":"git://github.com/embark-framework/embark.git","ssh_url":"git@github.com:embark-framework/embark.git","clone_url":"https://github.com/embark-framework/embark.git","svn_url":"https://github.com/embark-framework/embark","homepage":"https://embark.status.im/","size":9626,"stargazers_count":2096,"watchers_count":2096,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":300,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":300,"open_issues":16,"watchers":2096,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/609"},"html":{"href":"https://github.com/embark-framework/embark/pull/609"},"issue":{"href":"https://api.github.com/repos/embark-framework/embark/issues/609"},"comments":{"href":"https://api.github.com/repos/embark-framework/embark/issues/609/comments"},"review_comments":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/609/comments"},"review_comment":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/609/commits"},"statuses":{"href":"https://api.github.com/repos/embark-framework/embark/statuses/4aaf83a064eafcba31c59eae3b57f9b99fbb4c2a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"emizzle"}}