Merge pull request #4316 from blockscout/np-fix-decompiled-contracts-bug

Fix decompiled contracts bug
pull/4302/head
Victor Baranov 3 years ago committed by GitHub
commit 01e553f5fc
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/views/address_decompiled_contract_view.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 - [#4067](https://github.com/blockscout/blockscout/pull/4067) - Display LP tokens USD value and custom metadata in tokens dropdown at address page
### Fixes ### Fixes
- [#4316](https://github.com/blockscout/blockscout/pull/4316) - Fix `/decompiled-contracts` bug
- [#4310](https://github.com/blockscout/blockscout/pull/4310) - Fix logo URL redirection, set font-family defaults for chart.js - [#4310](https://github.com/blockscout/blockscout/pull/4310) - Fix logo URL redirection, set font-family defaults for chart.js
- [#4308](https://github.com/blockscout/blockscout/pull/4308) - Fix internal server error on contract verification options page - [#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 - [#4307](https://github.com/blockscout/blockscout/pull/4307) - Fix for composing IPFS URLs for NFTs images

@ -230,6 +230,10 @@ defmodule BlockScoutWeb.AddressDecompiledContractView do
end) end)
end end
def last_decompiled_contract_version(decompiled_contracts) when is_nil(decompiled_contracts), do: nil
def last_decompiled_contract_version(decompiled_contracts) when decompiled_contracts == [], do: nil
def last_decompiled_contract_version(decompiled_contracts) do def last_decompiled_contract_version(decompiled_contracts) do
Enum.max_by(decompiled_contracts, & &1.decompiler_version) Enum.max_by(decompiled_contracts, & &1.decompiler_version)
end end

Loading…
Cancel
Save