Skip to content

Commit

Permalink
Merge pull request #2864 from poanetwork/ab-add-instance-metadata-check
Browse files Browse the repository at this point in the history
add token instance metadata check
  • Loading branch information
vbaranov committed Nov 20, 2019
2 parents 29faeff + ccc2014 commit 896dc1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [#2822](https://github.com/poanetwork/blockscout/pull/2822) - Estimated address count on the main page, if cache is empty

### Fixes
- [#2864](https://github.com/poanetwork/blockscout/pull/2864) - add token instance metadata type check
- [#2855](https://github.com/poanetwork/blockscout/pull/2855) - Fix favicons load
- [#2854](https://github.com/poanetwork/blockscout/pull/2854) - Fix all npm vulnerabilities
- [#2851](https://github.com/poanetwork/blockscout/pull/2851) - Fix paths for front assets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ defmodule Explorer.Token.InstanceMetadataRetriever do
{:ok, %Response{body: body, status_code: 200}} ->
{:ok, json} = decode_json(body)

{:ok, %{metadata: json}}
if is_map(json) do
{:ok, %{metadata: json}}
else
{:error, :wrong_metadata_type}
end

{:ok, %Response{body: body}} ->
{:error, body}
Expand Down

0 comments on commit 896dc1e

Please sign in to comment.