Merge pull request #4308 from blockscout/vb-fix-verification-options-page-internal-server-error

Fix internal server error on contract verification options page
pull/4310/head
Victor Baranov 3 years ago committed by GitHub
commit 568402dec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 20
      apps/explorer/lib/explorer/chain.ex

@ -10,6 +10,7 @@
- [#4067](https://github.com/blockscout/blockscout/pull/4067) - Display LP tokens USD value and custom metadata in tokens dropdown at address page
### Fixes
- [#4308](https://github.com/blockscout/blockscout/pull/4308) - Fix internal server error on contract verification options page
- [#4307](https://github.com/blockscout/blockscout/pull/4307) - Fix for composing IPFS URLs for NFTs images
- [#4306](https://github.com/blockscout/blockscout/pull/4306) - Check token instance images MIME types
- [#4295](https://github.com/blockscout/blockscout/pull/4295) - Mobile view fix: transaction tile tx hash overflow

@ -3693,14 +3693,20 @@ defmodule Explorer.Chain do
end
end
def smart_contract_verified?(address_hash) do
query =
from(
smart_contract in SmartContract,
where: smart_contract.address_hash == ^address_hash
)
def smart_contract_verified?(address_hash_str) do
case string_to_address_hash(address_hash_str) do
{:ok, address_hash} ->
query =
from(
smart_contract in SmartContract,
where: smart_contract.address_hash == ^address_hash
)
if Repo.one(query), do: true, else: false
if Repo.one(query), do: true, else: false
_ ->
false
end
end
defp fetch_transactions(paging_options \\ nil) do

Loading…
Cancel
Save