{"action":"created","comment":{"url":"https://api.github.com/repos/gitcoinco/web/pulls/comments/213306205","pull_request_review_id":150113133,"id":213306205,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzMwNjIwNQ==","diff_hunk":"@@ -223,22 +228,51 @@ var callbacks = {\n     var tokens = val['tokens'];\n     var decimals = 3;\n \n-    var ui_elements = [];\n+    let crowdfunded_tokens = [];\n+    let tooltip_info = [];\n+\n+    crowdfunded_tokens.push({\n+      amount: token_value_to_display(result['value_in_token'], decimals),\n+      token: result['token_name']\n+    });\n \n+    tooltip_info.push('<p class=\"font-weight-bold m-0 pb-1\" style=\"color:#775EC7;\">Intial : ' +\n+      $('#value_in_token').html() + '</p>');\n+\n+    if (usd_value) {\n+      tooltip_info.push('<p class=\"m-0\" style=\"margin-top: 3px;\">Crowdfunding worth $' + usd_value + '</p>');\n+      $('#value_in_usdt').html(result['value_in_usdt'] + usd_value);\n+    }\n+  \n     for (var token in tokens) {\n       if (token) {\n         var val = tokens[token];\n+        var funding = normalizeAmount(val, decimals);\n \n-        ui_elements.push(Math.round(val * 10 ** decimals) / 10 ** decimals + ' ' + token);\n+        if (crowdfunded_tokens.filter(fund => fund.token === token).length > 0) {","path":"app/assets/v2/js/pages/bounty_details.js","position":38,"original_position":38,"commit_id":"fd20e4427dba07594679c8b347121d760733f1c8","original_commit_id":"fd20e4427dba07594679c8b347121d760733f1c8","user":{"login":"SaptakS","id":9530293,"node_id":"MDQ6VXNlcjk1MzAyOTM=","avatar_url":"https://avatars2.githubusercontent.com/u/9530293?v=4","gravatar_id":"","url":"https://api.github.com/users/SaptakS","html_url":"https://github.com/SaptakS","followers_url":"https://api.github.com/users/SaptakS/followers","following_url":"https://api.github.com/users/SaptakS/following{/other_user}","gists_url":"https://api.github.com/users/SaptakS/gists{/gist_id}","starred_url":"https://api.github.com/users/SaptakS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaptakS/subscriptions","organizations_url":"https://api.github.com/users/SaptakS/orgs","repos_url":"https://api.github.com/users/SaptakS/repos","events_url":"https://api.github.com/users/SaptakS/events{/privacy}","received_events_url":"https://api.github.com/users/SaptakS/received_events","type":"User","site_admin":false},"body":"I kind of agree with @stickler-ci here. Though in this case it works perfectly fine, but in general this might often mess up the logic of the code, hence assignment and functions are not recommended inside an if condition or loop. So I would say maybe declare a variable.","created_at":"2018-08-28T13:10:26Z","updated_at":"2018-08-28T13:10:26Z","html_url":"https://github.com/gitcoinco/web/pull/2109#discussion_r213306205","pull_request_url":"https://api.github.com/repos/gitcoinco/web/pulls/2109","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/comments/213306205"},"html":{"href":"https://github.com/gitcoinco/web/pull/2109#discussion_r213306205"},"pull_request":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/2109"}},"in_reply_to_id":213269991},"pull_request":{"url":"https://api.github.com/repos/gitcoinco/web/pulls/2109","id":211383726,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMzgzNzI2","html_url":"https://github.com/gitcoinco/web/pull/2109","diff_url":"https://github.com/gitcoinco/web/pull/2109.diff","patch_url":"https://github.com/gitcoinco/web/pull/2109.patch","issue_url":"https://api.github.com/repos/gitcoinco/web/issues/2109","number":2109,"state":"open","locked":false,"title":"bounty: crowdfunded bounties","user":{"login":"thelostone-mc","id":5358146,"node_id":"MDQ6VXNlcjUzNTgxNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/5358146?v=4","gravatar_id":"","url":"https://api.github.com/users/thelostone-mc","html_url":"https://github.com/thelostone-mc","followers_url":"https://api.github.com/users/thelostone-mc/followers","following_url":"https://api.github.com/users/thelostone-mc/following{/other_user}","gists_url":"https://api.github.com/users/thelostone-mc/gists{/gist_id}","starred_url":"https://api.github.com/users/thelostone-mc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelostone-mc/subscriptions","organizations_url":"https://api.github.com/users/thelostone-mc/orgs","repos_url":"https://api.github.com/users/thelostone-mc/repos","events_url":"https://api.github.com/users/thelostone-mc/events{/privacy}","received_events_url":"https://api.github.com/users/thelostone-mc/received_events","type":"User","site_admin":false},"body":"##### Description\r\n\r\nFor crowdfunded bounties: \r\n\r\n- [x] Display users icon on token tag\r\n- [x] On hover -> show split up\r\n- [x] Update amount tag\r\n- [ ] Update bot txt\r\n\r\n##### Checklist\r\n\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] linter status: 100% pass\r\n- [x] changes don't break existing behavior\r\n- [x] commit message follows [commit guidelines](https://github.com/gitcoinco/web/blob/master/docs/CONTRIBUTING.md#step-4-commit)\r\n\r\n##### Affected core subsystem(s)\r\n\r\n<!-- Provide affected core subsystem(s) (like doc, ui, crypto, etc). -->\r\n\r\n##### Testing\r\n![x](https://user-images.githubusercontent.com/5358146/44719233-49104780-aae0-11e8-8b42-f2b72f6f579c.gif)\r\n\r\n\r\n##### Fixes\r\n\r\nhttps://github.com/gitcoinco/web/issues/2072","created_at":"2018-08-28T11:05:05Z","updated_at":"2018-08-28T13:10:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5031f6059ffba9d5f565707cfe6300741ec1d701","assignee":null,"assignees":[],"requested_reviewers":[{"login":"SaptakS","id":9530293,"node_id":"MDQ6VXNlcjk1MzAyOTM=","avatar_url":"https://avatars2.githubusercontent.com/u/9530293?v=4","gravatar_id":"","url":"https://api.github.com/users/SaptakS","html_url":"https://github.com/SaptakS","followers_url":"https://api.github.com/users/SaptakS/followers","following_url":"https://api.github.com/users/SaptakS/following{/other_user}","gists_url":"https://api.github.com/users/SaptakS/gists{/gist_id}","starred_url":"https://api.github.com/users/SaptakS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaptakS/subscriptions","organizations_url":"https://api.github.com/users/SaptakS/orgs","repos_url":"https://api.github.com/users/SaptakS/repos","events_url":"https://api.github.com/users/SaptakS/events{/privacy}","received_events_url":"https://api.github.com/users/SaptakS/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":820451824,"node_id":"MDU6TGFiZWw4MjA0NTE4MjQ=","url":"https://api.github.com/repos/gitcoinco/web/labels/in%20progress","name":"in progress","color":"4abc40","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/gitcoinco/web/pulls/2109/commits","review_comments_url":"https://api.github.com/repos/gitcoinco/web/pulls/2109/comments","review_comment_url":"https://api.github.com/repos/gitcoinco/web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gitcoinco/web/issues/2109/comments","statuses_url":"https://api.github.com/repos/gitcoinco/web/statuses/fd20e4427dba07594679c8b347121d760733f1c8","head":{"label":"thelostone-mc:crowd","ref":"crowd","sha":"fd20e4427dba07594679c8b347121d760733f1c8","user":{"login":"thelostone-mc","id":5358146,"node_id":"MDQ6VXNlcjUzNTgxNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/5358146?v=4","gravatar_id":"","url":"https://api.github.com/users/thelostone-mc","html_url":"https://github.com/thelostone-mc","followers_url":"https://api.github.com/users/thelostone-mc/followers","following_url":"https://api.github.com/users/thelostone-mc/following{/other_user}","gists_url":"https://api.github.com/users/thelostone-mc/gists{/gist_id}","starred_url":"https://api.github.com/users/thelostone-mc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelostone-mc/subscriptions","organizations_url":"https://api.github.com/users/thelostone-mc/orgs","repos_url":"https://api.github.com/users/thelostone-mc/repos","events_url":"https://api.github.com/users/thelostone-mc/events{/privacy}","received_events_url":"https://api.github.com/users/thelostone-mc/received_events","type":"User","site_admin":false},"repo":{"id":112568212,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI1NjgyMTI=","name":"web","full_name":"thelostone-mc/web","owner":{"login":"thelostone-mc","id":5358146,"node_id":"MDQ6VXNlcjUzNTgxNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/5358146?v=4","gravatar_id":"","url":"https://api.github.com/users/thelostone-mc","html_url":"https://github.com/thelostone-mc","followers_url":"https://api.github.com/users/thelostone-mc/followers","following_url":"https://api.github.com/users/thelostone-mc/following{/other_user}","gists_url":"https://api.github.com/users/thelostone-mc/gists{/gist_id}","starred_url":"https://api.github.com/users/thelostone-mc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelostone-mc/subscriptions","organizations_url":"https://api.github.com/users/thelostone-mc/orgs","repos_url":"https://api.github.com/users/thelostone-mc/repos","events_url":"https://api.github.com/users/thelostone-mc/events{/privacy}","received_events_url":"https://api.github.com/users/thelostone-mc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thelostone-mc/web","description":"Push Open Source Forward.","fork":true,"url":"https://api.github.com/repos/thelostone-mc/web","forks_url":"https://api.github.com/repos/thelostone-mc/web/forks","keys_url":"https://api.github.com/repos/thelostone-mc/web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thelostone-mc/web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thelostone-mc/web/teams","hooks_url":"https://api.github.com/repos/thelostone-mc/web/hooks","issue_events_url":"https://api.github.com/repos/thelostone-mc/web/issues/events{/number}","events_url":"https://api.github.com/repos/thelostone-mc/web/events","assignees_url":"https://api.github.com/repos/thelostone-mc/web/assignees{/user}","branches_url":"https://api.github.com/repos/thelostone-mc/web/branches{/branch}","tags_url":"https://api.github.com/repos/thelostone-mc/web/tags","blobs_url":"https://api.github.com/repos/thelostone-mc/web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thelostone-mc/web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thelostone-mc/web/git/refs{/sha}","trees_url":"https://api.github.com/repos/thelostone-mc/web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thelostone-mc/web/statuses/{sha}","languages_url":"https://api.github.com/repos/thelostone-mc/web/languages","stargazers_url":"https://api.github.com/repos/thelostone-mc/web/stargazers","contributors_url":"https://api.github.com/repos/thelostone-mc/web/contributors","subscribers_url":"https://api.github.com/repos/thelostone-mc/web/subscribers","subscription_url":"https://api.github.com/repos/thelostone-mc/web/subscription","commits_url":"https://api.github.com/repos/thelostone-mc/web/commits{/sha}","git_commits_url":"https://api.github.com/repos/thelostone-mc/web/git/commits{/sha}","comments_url":"https://api.github.com/repos/thelostone-mc/web/comments{/number}","issue_comment_url":"https://api.github.com/repos/thelostone-mc/web/issues/comments{/number}","contents_url":"https://api.github.com/repos/thelostone-mc/web/contents/{+path}","compare_url":"https://api.github.com/repos/thelostone-mc/web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thelostone-mc/web/merges","archive_url":"https://api.github.com/repos/thelostone-mc/web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thelostone-mc/web/downloads","issues_url":"https://api.github.com/repos/thelostone-mc/web/issues{/number}","pulls_url":"https://api.github.com/repos/thelostone-mc/web/pulls{/number}","milestones_url":"https://api.github.com/repos/thelostone-mc/web/milestones{/number}","notifications_url":"https://api.github.com/repos/thelostone-mc/web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thelostone-mc/web/labels{/name}","releases_url":"https://api.github.com/repos/thelostone-mc/web/releases{/id}","deployments_url":"https://api.github.com/repos/thelostone-mc/web/deployments","created_at":"2017-11-30T05:22:19Z","updated_at":"2018-08-24T20:45:51Z","pushed_at":"2018-08-28T10:59:55Z","git_url":"git://github.com/thelostone-mc/web.git","ssh_url":"git@github.com:thelostone-mc/web.git","clone_url":"https://github.com/thelostone-mc/web.git","svn_url":"https://github.com/thelostone-mc/web","homepage":"https://gitcoin.co","size":181606,"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":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gitcoinco:master","ref":"master","sha":"b3cfa172b8193777e6a5ad4f386ad93c350d930f","user":{"login":"gitcoinco","id":30044474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMDQ0NDc0","avatar_url":"https://avatars1.githubusercontent.com/u/30044474?v=4","gravatar_id":"","url":"https://api.github.com/users/gitcoinco","html_url":"https://github.com/gitcoinco","followers_url":"https://api.github.com/users/gitcoinco/followers","following_url":"https://api.github.com/users/gitcoinco/following{/other_user}","gists_url":"https://api.github.com/users/gitcoinco/gists{/gist_id}","starred_url":"https://api.github.com/users/gitcoinco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitcoinco/subscriptions","organizations_url":"https://api.github.com/users/gitcoinco/orgs","repos_url":"https://api.github.com/users/gitcoinco/repos","events_url":"https://api.github.com/users/gitcoinco/events{/privacy}","received_events_url":"https://api.github.com/users/gitcoinco/received_events","type":"Organization","site_admin":false},"repo":{"id":96767206,"node_id":"MDEwOlJlcG9zaXRvcnk5Njc2NzIwNg==","name":"web","full_name":"gitcoinco/web","owner":{"login":"gitcoinco","id":30044474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMDQ0NDc0","avatar_url":"https://avatars1.githubusercontent.com/u/30044474?v=4","gravatar_id":"","url":"https://api.github.com/users/gitcoinco","html_url":"https://github.com/gitcoinco","followers_url":"https://api.github.com/users/gitcoinco/followers","following_url":"https://api.github.com/users/gitcoinco/following{/other_user}","gists_url":"https://api.github.com/users/gitcoinco/gists{/gist_id}","starred_url":"https://api.github.com/users/gitcoinco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitcoinco/subscriptions","organizations_url":"https://api.github.com/users/gitcoinco/orgs","repos_url":"https://api.github.com/users/gitcoinco/repos","events_url":"https://api.github.com/users/gitcoinco/events{/privacy}","received_events_url":"https://api.github.com/users/gitcoinco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitcoinco/web","description":"Grow Open Source","fork":false,"url":"https://api.github.com/repos/gitcoinco/web","forks_url":"https://api.github.com/repos/gitcoinco/web/forks","keys_url":"https://api.github.com/repos/gitcoinco/web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitcoinco/web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitcoinco/web/teams","hooks_url":"https://api.github.com/repos/gitcoinco/web/hooks","issue_events_url":"https://api.github.com/repos/gitcoinco/web/issues/events{/number}","events_url":"https://api.github.com/repos/gitcoinco/web/events","assignees_url":"https://api.github.com/repos/gitcoinco/web/assignees{/user}","branches_url":"https://api.github.com/repos/gitcoinco/web/branches{/branch}","tags_url":"https://api.github.com/repos/gitcoinco/web/tags","blobs_url":"https://api.github.com/repos/gitcoinco/web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitcoinco/web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitcoinco/web/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitcoinco/web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitcoinco/web/statuses/{sha}","languages_url":"https://api.github.com/repos/gitcoinco/web/languages","stargazers_url":"https://api.github.com/repos/gitcoinco/web/stargazers","contributors_url":"https://api.github.com/repos/gitcoinco/web/contributors","subscribers_url":"https://api.github.com/repos/gitcoinco/web/subscribers","subscription_url":"https://api.github.com/repos/gitcoinco/web/subscription","commits_url":"https://api.github.com/repos/gitcoinco/web/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitcoinco/web/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitcoinco/web/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitcoinco/web/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitcoinco/web/contents/{+path}","compare_url":"https://api.github.com/repos/gitcoinco/web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitcoinco/web/merges","archive_url":"https://api.github.com/repos/gitcoinco/web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitcoinco/web/downloads","issues_url":"https://api.github.com/repos/gitcoinco/web/issues{/number}","pulls_url":"https://api.github.com/repos/gitcoinco/web/pulls{/number}","milestones_url":"https://api.github.com/repos/gitcoinco/web/milestones{/number}","notifications_url":"https://api.github.com/repos/gitcoinco/web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitcoinco/web/labels{/name}","releases_url":"https://api.github.com/repos/gitcoinco/web/releases{/id}","deployments_url":"https://api.github.com/repos/gitcoinco/web/deployments","created_at":"2017-07-10T10:53:45Z","updated_at":"2018-08-28T03:11:49Z","pushed_at":"2018-08-28T11:42:13Z","git_url":"git://github.com/gitcoinco/web.git","ssh_url":"git@github.com:gitcoinco/web.git","clone_url":"https://github.com/gitcoinco/web.git","svn_url":"https://github.com/gitcoinco/web","homepage":"https://gitcoin.co","size":268766,"stargazers_count":405,"watchers_count":405,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":239,"mirror_url":null,"archived":false,"open_issues_count":561,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":239,"open_issues":561,"watchers":405,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/2109"},"html":{"href":"https://github.com/gitcoinco/web/pull/2109"},"issue":{"href":"https://api.github.com/repos/gitcoinco/web/issues/2109"},"comments":{"href":"https://api.github.com/repos/gitcoinco/web/issues/2109/comments"},"review_comments":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/2109/comments"},"review_comment":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gitcoinco/web/pulls/2109/commits"},"statuses":{"href":"https://api.github.com/repos/gitcoinco/web/statuses/fd20e4427dba07594679c8b347121d760733f1c8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"SaptakS"}}