{"action":"created","issue":{"url":"https://api.github.com/repos/poanetwork/blockscout/issues/1264","repository_url":"https://api.github.com/repos/poanetwork/blockscout","labels_url":"https://api.github.com/repos/poanetwork/blockscout/issues/1264/labels{/name}","comments_url":"https://api.github.com/repos/poanetwork/blockscout/issues/1264/comments","events_url":"https://api.github.com/repos/poanetwork/blockscout/issues/1264/events","html_url":"https://github.com/poanetwork/blockscout/pull/1264","id":393001770,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMTM2MjI5","number":1264,"title":"Show token price in USD","user":{"login":"fvictorio","id":417134,"node_id":"MDQ6VXNlcjQxNzEzNA==","avatar_url":"https://avatars1.githubusercontent.com/u/417134?v=4","gravatar_id":"","url":"https://api.github.com/users/fvictorio","html_url":"https://github.com/fvictorio","followers_url":"https://api.github.com/users/fvictorio/followers","following_url":"https://api.github.com/users/fvictorio/following{/other_user}","gists_url":"https://api.github.com/users/fvictorio/gists{/gist_id}","starred_url":"https://api.github.com/users/fvictorio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvictorio/subscriptions","organizations_url":"https://api.github.com/users/fvictorio/orgs","repos_url":"https://api.github.com/users/fvictorio/repos","events_url":"https://api.github.com/users/fvictorio/events{/privacy}","received_events_url":"https://api.github.com/users/fvictorio/received_events","type":"User","site_admin":false},"labels":[{"id":859573185,"node_id":"MDU6TGFiZWw4NTk1NzMxODU=","url":"https://api.github.com/repos/poanetwork/blockscout/labels/in%20progress","name":"in progress","color":"ededed","default":false},{"id":935022481,"node_id":"MDU6TGFiZWw5MzUwMjI0ODE=","url":"https://api.github.com/repos/poanetwork/blockscout/labels/wip","name":"wip","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"fvictorio","id":417134,"node_id":"MDQ6VXNlcjQxNzEzNA==","avatar_url":"https://avatars1.githubusercontent.com/u/417134?v=4","gravatar_id":"","url":"https://api.github.com/users/fvictorio","html_url":"https://github.com/fvictorio","followers_url":"https://api.github.com/users/fvictorio/followers","following_url":"https://api.github.com/users/fvictorio/following{/other_user}","gists_url":"https://api.github.com/users/fvictorio/gists{/gist_id}","starred_url":"https://api.github.com/users/fvictorio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvictorio/subscriptions","organizations_url":"https://api.github.com/users/fvictorio/orgs","repos_url":"https://api.github.com/users/fvictorio/repos","events_url":"https://api.github.com/users/fvictorio/events{/privacy}","received_events_url":"https://api.github.com/users/fvictorio/received_events","type":"User","site_admin":false},"assignees":[{"login":"fvictorio","id":417134,"node_id":"MDQ6VXNlcjQxNzEzNA==","avatar_url":"https://avatars1.githubusercontent.com/u/417134?v=4","gravatar_id":"","url":"https://api.github.com/users/fvictorio","html_url":"https://github.com/fvictorio","followers_url":"https://api.github.com/users/fvictorio/followers","following_url":"https://api.github.com/users/fvictorio/following{/other_user}","gists_url":"https://api.github.com/users/fvictorio/gists{/gist_id}","starred_url":"https://api.github.com/users/fvictorio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvictorio/subscriptions","organizations_url":"https://api.github.com/users/fvictorio/orgs","repos_url":"https://api.github.com/users/fvictorio/repos","events_url":"https://api.github.com/users/fvictorio/events{/privacy}","received_events_url":"https://api.github.com/users/fvictorio/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-12-20T11:21:02Z","updated_at":"2018-12-20T12:21:42Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/poanetwork/blockscout/pulls/1264","html_url":"https://github.com/poanetwork/blockscout/pull/1264","diff_url":"https://github.com/poanetwork/blockscout/pull/1264.diff","patch_url":"https://github.com/poanetwork/blockscout/pull/1264.patch"},"body":"Part of #1237.\r\n\r\nThis is a WIP towards showing the tokens prices in USD. It shows it in the tokens tab and dropdown of the address page, and in the token page. The list of \"known\" tokens addresses is hardcoded for testing, and it only has a couple of items.\r\n\r\nI'm still working on this, but I have some questions related to what I've done so far:\r\n\r\n1. Is it enough to use `ExchangeRates.lookup()` for getting the token price? It has all the tokens obtained through `https://api.coinmarketcap.com/v1/ticker/?limit=0`, so I guess it is.\r\n2. Should we fetch the list of known tokens directly from https://raw.githubusercontent.com/kvhnuke/etherwallet/mercury/app/scripts/tokens/ethTokens.json and save it in the ETS? That's what I understand from @acravenho's comment [here](https://github.com/poanetwork/blockscout/issues/1237#issuecomment-448344010) and I already started working on that (it's not pushed yet), but I'd like to be sure.\r\n3. I'm adding the token price in the different controllers, should I move this up to the Explorer app?\r\n\r\nAlso, the price is just shown below the token, so any design advice about that is welcome."},"comment":{"url":"https://api.github.com/repos/poanetwork/blockscout/issues/comments/448980788","html_url":"https://github.com/poanetwork/blockscout/pull/1264#issuecomment-448980788","issue_url":"https://api.github.com/repos/poanetwork/blockscout/issues/1264","id":448980788,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODk4MDc4OA==","user":{"login":"coveralls","id":2354108,"node_id":"MDQ6VXNlcjIzNTQxMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T12:21:42Z","updated_at":"2018-12-20T12:21:42Z","author_association":"NONE","body":"## Pull Request Test Coverage Report for [Build d558096e-a6cc-44f7-b97a-d831bd36c7d0](https://coveralls.io/builds/20737721)\n\n* **23** of **40**   **(57.5%)**  changed or added relevant lines in **5** files are covered.\n* **22** unchanged lines in **8** files lost coverage.\n* Overall coverage decreased (**-0.8%**) to **85.46%**\n\n---\n\n|  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |\n| :-----|--------------|--------|---: |\n| [apps/explorer/lib/explorer/market/market.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Fexplorer%2Flib%2Fexplorer%2Fmarket%2Fmarket.ex#L23) | 0 | 8 | 0.0%\n| [apps/explorer/lib/explorer/known_tokens/known_tokens.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Fexplorer%2Flib%2Fexplorer%2Fknown_tokens%2Fknown_tokens.ex#L44) | 18 | 27 | 66.67%\n<!-- | **Total:** | **23** | **40** | **57.5%** | -->\n\n|  Files with Coverage Reduction | New Missed Lines | % |\n| :-----|--------------|--: |\n| [apps/block_scout_web/lib/block_scout_web/views/tokens/overview_view.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Fblock_scout_web%2Flib%2Fblock_scout_web%2Fviews%2Ftokens%2Foverview_view.ex#L38) | 1 | 85.71% |\n| [apps/ethereum_jsonrpc/test/support/ethereum_jsonrpc/case/parity/http_websocket.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Fethereum_jsonrpc%2Ftest%2Fsupport%2Fethereum_jsonrpc%2Fcase%2Fparity%2Fhttp_websocket.ex#L9) | 1 | 0.0% |\n| [apps/indexer/lib/indexer/address/coin_balances.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Findexer%2Flib%2Findexer%2Faddress%2Fcoin_balances.ex#L13) | 1 | 94.74% |\n| [apps/indexer/lib/indexer/internal_transaction/fetcher.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Findexer%2Flib%2Findexer%2Finternal_transaction%2Ffetcher.ex#L134) | 1 | 91.43% |\n| [apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Fethereum_jsonrpc%2Flib%2Fethereum_jsonrpc%2Fhttp.ex#L153) | 1 | 73.47% |\n| [apps/ethereum_jsonrpc/test/support/ethereum_jsonrpc/web_socket/case/parity.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Fethereum_jsonrpc%2Ftest%2Fsupport%2Fethereum_jsonrpc%2Fweb_socket%2Fcase%2Fparity.ex#L9) | 4 | 0.0% |\n| [apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Fethereum_jsonrpc%2Flib%2Fethereum_jsonrpc%2Fweb_socket%2Fweb_socket_client.ex#L82) | 5 | 76.92% |\n| [apps/indexer/lib/indexer/block/fetcher.ex](https://coveralls.io/builds/20737721/source?filename=apps%2Findexer%2Flib%2Findexer%2Fblock%2Ffetcher.ex#L219) | 8 | 70.0% |\n<!-- | **Total:** | **22** |  | -->\n\n|  Totals | [![Coverage Status](https://coveralls.io/builds/20737721/badge)](https://coveralls.io/builds/20737721) |\n| :-- | --: |\n| Change from base [Build 8910ffdf-218d-4db5-ad35-f6bcdd3c6ee1](https://coveralls.io/builds/20725562): |  -0.8% |\n| Covered Lines: | 3738 |\n| Relevant Lines: | 4374 |\n\n---\n##### 💛  - [Coveralls](https://coveralls.io)\n"}}
{"actor":{"display_login":"coveralls"}}