Merge pull request #5264 from blockscout/np-fix-partial-bug-sourcify

Fix bug with 500 response on `partial` sourcify status
pull/5239/head
Victor Baranov 3 years ago committed by GitHub
commit 35c40492c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 4
      apps/block_scout_web/lib/block_scout_web/controllers/address_contract_verification_controller.ex

@ -4,6 +4,7 @@
### Fixes ### Fixes
- [#5269](https://github.com/blockscout/blockscout/pull/5269) - Address Page: Fix implementation address align - [#5269](https://github.com/blockscout/blockscout/pull/5269) - Address Page: Fix implementation address align
- [#5264](https://github.com/blockscout/blockscout/pull/5264) - Fix bug with 500 response on `partial` sourcify status
- [#5259](https://github.com/blockscout/blockscout/pull/5259) - Fix `coin-balances/by-day` bug - [#5259](https://github.com/blockscout/blockscout/pull/5259) - Fix `coin-balances/by-day` bug
### Chore ### Chore

@ -147,6 +147,10 @@ defmodule BlockScoutWeb.AddressContractVerificationController do
{:ok, _verified_status} <- Sourcify.check_by_address(address_hash_string) do {:ok, _verified_status} <- Sourcify.check_by_address(address_hash_string) do
get_metadata_and_publish(address_hash_string, conn) get_metadata_and_publish(address_hash_string, conn)
else else
{:error, "partial"} ->
{:ok, status, metadata} = Sourcify.check_by_address_any(address_hash_string)
process_metadata_and_publish(address_hash_string, metadata, status == "partial", conn)
{:error, %{"error" => error}} -> {:error, %{"error" => error}} ->
EventsPublisher.broadcast( EventsPublisher.broadcast(
prepare_verification_error(error, address_hash_string, conn), prepare_verification_error(error, address_hash_string, conn),

Loading…
Cancel
Save