{"action":"created","comment":{"url":"https://api.github.com/repos/sclem/pfcrypto/pulls/comments/157636908","pull_request_review_id":84312069,"id":157636908,"diff_hunk":"@@ -5,14 +5,20 @@ function setPrices(holdings, callback) {\n         if (this.readyState === 4) {\n             var fixed = [];\n             var data = JSON.parse(this.responseText);\n-            data.forEach(function(c) {\n-                holdings.forEach(function(h) {\n+            holdings.forEach(function(h) {\n+                var found = false;\n+                data.forEach(function(c) {\n                     //Trim any special characters\n                     if (h.ticker && h.ticker.toLowerCase().match(/[a-z-]+/g)[0] === c.id) {\n                         h.price = +c.price_usd;\n                         fixed.push(h);\n-                    }\n+                        found = true;\n+                    }    \n                 });\n+                // Push original in order to get erc20 balance updates\n+                if (!found && h.description && h.description.toLowerCase().slice(0, 8) === \"erc20:0x\") {","path":"personalcapital.js","position":null,"original_position":18,"commit_id":"49198e827bd194f685c1f575225783079d0581cd","original_commit_id":"985bcc1a9768333a9bdc5b2c885bb8110dc9df85","user":{"login":"danielheyman","id":4808291,"avatar_url":"https://avatars1.githubusercontent.com/u/4808291?v=4","gravatar_id":"","url":"https://api.github.com/users/danielheyman","html_url":"https://github.com/danielheyman","followers_url":"https://api.github.com/users/danielheyman/followers","following_url":"https://api.github.com/users/danielheyman/following{/other_user}","gists_url":"https://api.github.com/users/danielheyman/gists{/gist_id}","starred_url":"https://api.github.com/users/danielheyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielheyman/subscriptions","organizations_url":"https://api.github.com/users/danielheyman/orgs","repos_url":"https://api.github.com/users/danielheyman/repos","events_url":"https://api.github.com/users/danielheyman/events{/privacy}","received_events_url":"https://api.github.com/users/danielheyman/received_events","type":"User","site_admin":false},"body":"Good call!","created_at":"2017-12-19T00:25:33Z","updated_at":"2017-12-19T00:25:33Z","html_url":"https://github.com/sclem/pfcrypto/pull/5#discussion_r157636908","pull_request_url":"https://api.github.com/repos/sclem/pfcrypto/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/sclem/pfcrypto/pulls/comments/157636908"},"html":{"href":"https://github.com/sclem/pfcrypto/pull/5#discussion_r157636908"},"pull_request":{"href":"https://api.github.com/repos/sclem/pfcrypto/pulls/5"}},"in_reply_to_id":157598881},"pull_request":{"url":"https://api.github.com/repos/sclem/pfcrypto/pulls/5","id":158514411,"html_url":"https://github.com/sclem/pfcrypto/pull/5","diff_url":"https://github.com/sclem/pfcrypto/pull/5.diff","patch_url":"https://github.com/sclem/pfcrypto/pull/5.patch","issue_url":"https://api.github.com/repos/sclem/pfcrypto/issues/5","number":5,"state":"open","locked":false,"title":"Add erc20 balance support","user":{"login":"danielheyman","id":4808291,"avatar_url":"https://avatars1.githubusercontent.com/u/4808291?v=4","gravatar_id":"","url":"https://api.github.com/users/danielheyman","html_url":"https://github.com/danielheyman","followers_url":"https://api.github.com/users/danielheyman/followers","following_url":"https://api.github.com/users/danielheyman/following{/other_user}","gists_url":"https://api.github.com/users/danielheyman/gists{/gist_id}","starred_url":"https://api.github.com/users/danielheyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielheyman/subscriptions","organizations_url":"https://api.github.com/users/danielheyman/orgs","repos_url":"https://api.github.com/users/danielheyman/repos","events_url":"https://api.github.com/users/danielheyman/events{/privacy}","received_events_url":"https://api.github.com/users/danielheyman/received_events","type":"User","site_admin":false},"body":"Descriptions should be in the format \"erc20:address\" to automatically update the balance.","created_at":"2017-12-15T03:10:27Z","updated_at":"2017-12-19T00:25:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5db4fd74a3bc305132a55942265269629465f6ed","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/sclem/pfcrypto/pulls/5/commits","review_comments_url":"https://api.github.com/repos/sclem/pfcrypto/pulls/5/comments","review_comment_url":"https://api.github.com/repos/sclem/pfcrypto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sclem/pfcrypto/issues/5/comments","statuses_url":"https://api.github.com/repos/sclem/pfcrypto/statuses/49198e827bd194f685c1f575225783079d0581cd","head":{"label":"danielheyman:master","ref":"master","sha":"49198e827bd194f685c1f575225783079d0581cd","user":{"login":"danielheyman","id":4808291,"avatar_url":"https://avatars1.githubusercontent.com/u/4808291?v=4","gravatar_id":"","url":"https://api.github.com/users/danielheyman","html_url":"https://github.com/danielheyman","followers_url":"https://api.github.com/users/danielheyman/followers","following_url":"https://api.github.com/users/danielheyman/following{/other_user}","gists_url":"https://api.github.com/users/danielheyman/gists{/gist_id}","starred_url":"https://api.github.com/users/danielheyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielheyman/subscriptions","organizations_url":"https://api.github.com/users/danielheyman/orgs","repos_url":"https://api.github.com/users/danielheyman/repos","events_url":"https://api.github.com/users/danielheyman/events{/privacy}","received_events_url":"https://api.github.com/users/danielheyman/received_events","type":"User","site_admin":false},"repo":{"id":114311670,"name":"pfcrypto","full_name":"danielheyman/pfcrypto","owner":{"login":"danielheyman","id":4808291,"avatar_url":"https://avatars1.githubusercontent.com/u/4808291?v=4","gravatar_id":"","url":"https://api.github.com/users/danielheyman","html_url":"https://github.com/danielheyman","followers_url":"https://api.github.com/users/danielheyman/followers","following_url":"https://api.github.com/users/danielheyman/following{/other_user}","gists_url":"https://api.github.com/users/danielheyman/gists{/gist_id}","starred_url":"https://api.github.com/users/danielheyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielheyman/subscriptions","organizations_url":"https://api.github.com/users/danielheyman/orgs","repos_url":"https://api.github.com/users/danielheyman/repos","events_url":"https://api.github.com/users/danielheyman/events{/privacy}","received_events_url":"https://api.github.com/users/danielheyman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielheyman/pfcrypto","description":"chome extension to automatically update cryptocurrency holdings in personal capital","fork":true,"url":"https://api.github.com/repos/danielheyman/pfcrypto","forks_url":"https://api.github.com/repos/danielheyman/pfcrypto/forks","keys_url":"https://api.github.com/repos/danielheyman/pfcrypto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielheyman/pfcrypto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielheyman/pfcrypto/teams","hooks_url":"https://api.github.com/repos/danielheyman/pfcrypto/hooks","issue_events_url":"https://api.github.com/repos/danielheyman/pfcrypto/issues/events{/number}","events_url":"https://api.github.com/repos/danielheyman/pfcrypto/events","assignees_url":"https://api.github.com/repos/danielheyman/pfcrypto/assignees{/user}","branches_url":"https://api.github.com/repos/danielheyman/pfcrypto/branches{/branch}","tags_url":"https://api.github.com/repos/danielheyman/pfcrypto/tags","blobs_url":"https://api.github.com/repos/danielheyman/pfcrypto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielheyman/pfcrypto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielheyman/pfcrypto/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielheyman/pfcrypto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielheyman/pfcrypto/statuses/{sha}","languages_url":"https://api.github.com/repos/danielheyman/pfcrypto/languages","stargazers_url":"https://api.github.com/repos/danielheyman/pfcrypto/stargazers","contributors_url":"https://api.github.com/repos/danielheyman/pfcrypto/contributors","subscribers_url":"https://api.github.com/repos/danielheyman/pfcrypto/subscribers","subscription_url":"https://api.github.com/repos/danielheyman/pfcrypto/subscription","commits_url":"https://api.github.com/repos/danielheyman/pfcrypto/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielheyman/pfcrypto/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielheyman/pfcrypto/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielheyman/pfcrypto/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielheyman/pfcrypto/contents/{+path}","compare_url":"https://api.github.com/repos/danielheyman/pfcrypto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielheyman/pfcrypto/merges","archive_url":"https://api.github.com/repos/danielheyman/pfcrypto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielheyman/pfcrypto/downloads","issues_url":"https://api.github.com/repos/danielheyman/pfcrypto/issues{/number}","pulls_url":"https://api.github.com/repos/danielheyman/pfcrypto/pulls{/number}","milestones_url":"https://api.github.com/repos/danielheyman/pfcrypto/milestones{/number}","notifications_url":"https://api.github.com/repos/danielheyman/pfcrypto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielheyman/pfcrypto/labels{/name}","releases_url":"https://api.github.com/repos/danielheyman/pfcrypto/releases{/id}","deployments_url":"https://api.github.com/repos/danielheyman/pfcrypto/deployments","created_at":"2017-12-15T01:04:13Z","updated_at":"2017-12-15T01:04:15Z","pushed_at":"2017-12-19T00:23:57Z","git_url":"git://github.com/danielheyman/pfcrypto.git","ssh_url":"git@github.com:danielheyman/pfcrypto.git","clone_url":"https://github.com/danielheyman/pfcrypto.git","svn_url":"https://github.com/danielheyman/pfcrypto","homepage":"https://chrome.google.com/webstore/detail/pfcrypto/ceepigemlmlbphjhffddplfecgedhoeb","size":25,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sclem:master","ref":"master","sha":"69681a7e135d0246111b284d6b2f059958cbd064","user":{"login":"sclem","id":8977050,"avatar_url":"https://avatars3.githubusercontent.com/u/8977050?v=4","gravatar_id":"","url":"https://api.github.com/users/sclem","html_url":"https://github.com/sclem","followers_url":"https://api.github.com/users/sclem/followers","following_url":"https://api.github.com/users/sclem/following{/other_user}","gists_url":"https://api.github.com/users/sclem/gists{/gist_id}","starred_url":"https://api.github.com/users/sclem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sclem/subscriptions","organizations_url":"https://api.github.com/users/sclem/orgs","repos_url":"https://api.github.com/users/sclem/repos","events_url":"https://api.github.com/users/sclem/events{/privacy}","received_events_url":"https://api.github.com/users/sclem/received_events","type":"User","site_admin":false},"repo":{"id":97324344,"name":"pfcrypto","full_name":"sclem/pfcrypto","owner":{"login":"sclem","id":8977050,"avatar_url":"https://avatars3.githubusercontent.com/u/8977050?v=4","gravatar_id":"","url":"https://api.github.com/users/sclem","html_url":"https://github.com/sclem","followers_url":"https://api.github.com/users/sclem/followers","following_url":"https://api.github.com/users/sclem/following{/other_user}","gists_url":"https://api.github.com/users/sclem/gists{/gist_id}","starred_url":"https://api.github.com/users/sclem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sclem/subscriptions","organizations_url":"https://api.github.com/users/sclem/orgs","repos_url":"https://api.github.com/users/sclem/repos","events_url":"https://api.github.com/users/sclem/events{/privacy}","received_events_url":"https://api.github.com/users/sclem/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sclem/pfcrypto","description":"chome extension to automatically update cryptocurrency holdings in personal capital","fork":false,"url":"https://api.github.com/repos/sclem/pfcrypto","forks_url":"https://api.github.com/repos/sclem/pfcrypto/forks","keys_url":"https://api.github.com/repos/sclem/pfcrypto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sclem/pfcrypto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sclem/pfcrypto/teams","hooks_url":"https://api.github.com/repos/sclem/pfcrypto/hooks","issue_events_url":"https://api.github.com/repos/sclem/pfcrypto/issues/events{/number}","events_url":"https://api.github.com/repos/sclem/pfcrypto/events","assignees_url":"https://api.github.com/repos/sclem/pfcrypto/assignees{/user}","branches_url":"https://api.github.com/repos/sclem/pfcrypto/branches{/branch}","tags_url":"https://api.github.com/repos/sclem/pfcrypto/tags","blobs_url":"https://api.github.com/repos/sclem/pfcrypto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sclem/pfcrypto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sclem/pfcrypto/git/refs{/sha}","trees_url":"https://api.github.com/repos/sclem/pfcrypto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sclem/pfcrypto/statuses/{sha}","languages_url":"https://api.github.com/repos/sclem/pfcrypto/languages","stargazers_url":"https://api.github.com/repos/sclem/pfcrypto/stargazers","contributors_url":"https://api.github.com/repos/sclem/pfcrypto/contributors","subscribers_url":"https://api.github.com/repos/sclem/pfcrypto/subscribers","subscription_url":"https://api.github.com/repos/sclem/pfcrypto/subscription","commits_url":"https://api.github.com/repos/sclem/pfcrypto/commits{/sha}","git_commits_url":"https://api.github.com/repos/sclem/pfcrypto/git/commits{/sha}","comments_url":"https://api.github.com/repos/sclem/pfcrypto/comments{/number}","issue_comment_url":"https://api.github.com/repos/sclem/pfcrypto/issues/comments{/number}","contents_url":"https://api.github.com/repos/sclem/pfcrypto/contents/{+path}","compare_url":"https://api.github.com/repos/sclem/pfcrypto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sclem/pfcrypto/merges","archive_url":"https://api.github.com/repos/sclem/pfcrypto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sclem/pfcrypto/downloads","issues_url":"https://api.github.com/repos/sclem/pfcrypto/issues{/number}","pulls_url":"https://api.github.com/repos/sclem/pfcrypto/pulls{/number}","milestones_url":"https://api.github.com/repos/sclem/pfcrypto/milestones{/number}","notifications_url":"https://api.github.com/repos/sclem/pfcrypto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sclem/pfcrypto/labels{/name}","releases_url":"https://api.github.com/repos/sclem/pfcrypto/releases{/id}","deployments_url":"https://api.github.com/repos/sclem/pfcrypto/deployments","created_at":"2017-07-15T15:23:22Z","updated_at":"2017-12-14T23:37:12Z","pushed_at":"2017-12-19T00:23:57Z","git_url":"git://github.com/sclem/pfcrypto.git","ssh_url":"git@github.com:sclem/pfcrypto.git","clone_url":"https://github.com/sclem/pfcrypto.git","svn_url":"https://github.com/sclem/pfcrypto","homepage":"https://chrome.google.com/webstore/detail/pfcrypto/ceepigemlmlbphjhffddplfecgedhoeb","size":23,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":6,"open_issues":1,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sclem/pfcrypto/pulls/5"},"html":{"href":"https://github.com/sclem/pfcrypto/pull/5"},"issue":{"href":"https://api.github.com/repos/sclem/pfcrypto/issues/5"},"comments":{"href":"https://api.github.com/repos/sclem/pfcrypto/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/sclem/pfcrypto/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/sclem/pfcrypto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sclem/pfcrypto/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/sclem/pfcrypto/statuses/49198e827bd194f685c1f575225783079d0581cd"}},"author_association":"NONE"}}
{"actor":{"display_login":"danielheyman"}}