Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token instance metadata retriever refinement: process metadata if only image URL is passed to tokenURI #3128

Merged
merged 3 commits into from
May 27, 2020

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented May 26, 2020

#3056
Fixes #3127

Motivation

Token instance metadata retriever doesn't process instances for which image URL is returned instead of Token URI

Changelog

If headers of the response from a request to token URI link contains {"Content-Type", "image/png"}, then generate token metadata JSON with token instance image only.

Chore:

  • upgrade httpoison 1.0.0 -> 1.6.2

Checklist for your Pull Request (PR)

@vbaranov vbaranov force-pushed the vb-refine-token-instance-metadata-retriever branch from 06accbb to 156cbf5 Compare May 26, 2020 15:31
@vbaranov vbaranov self-assigned this May 26, 2020
@vbaranov vbaranov force-pushed the vb-refine-token-instance-metadata-retriever branch from 156cbf5 to 0eb253d Compare May 26, 2020 15:37
@coveralls
Copy link

coveralls commented May 26, 2020

Pull Request Test Coverage Report for Build 71fcb0f8-7c39-4aed-9c7b-91e5a72dbf60

  • 5 of 8 (62.5%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 75.069%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/block_scout_web/lib/block_scout_web/views/tokens/instance/overview_view.ex 2 3 66.67%
apps/explorer/lib/explorer/token/instance_metadata_retriever.ex 3 5 60.0%
Files with Coverage Reduction New Missed Lines %
apps/block_scout_web/lib/block_scout_web/controllers/chain/market_history_chart_controller.ex 1 78.57%
Totals Coverage Status
Change from base Build f1737080-7128-437e-bedc-841cecd52b93: -0.01%
Covered Lines: 5715
Relevant Lines: 7613

💛 - Coveralls

@vbaranov vbaranov force-pushed the vb-refine-token-instance-metadata-retriever branch 2 times, most recently from 44d4565 to e7f847a Compare May 26, 2020 20:11
@vbaranov vbaranov force-pushed the vb-refine-token-instance-metadata-retriever branch from e7f847a to 082d921 Compare May 26, 2020 20:14
@vbaranov vbaranov merged commit 9ea491a into master May 27, 2020
@vbaranov vbaranov deleted the vb-refine-token-instance-metadata-retriever branch May 27, 2020 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Token instance metadata fetcher cannot process token image if URL of image is returned in token URI
2 participants