Merge pull request #4465 from blockscout/vb-fixcontract-error

Fix contract read page error
pull/4472/head
Victor Baranov 3 years ago committed by GitHub
commit 64debea96c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 7
      apps/block_scout_web/lib/block_scout_web/views/smart_contract_view.ex

@ -9,7 +9,7 @@
### Chore
- [#4444](https://github.com/blockscout/blockscout/pull/4444) - Main page performance cumulative update
- [#4439](https://github.com/blockscout/blockscout/pull/4439) - Fix revert response in contract's output
- [#4439](https://github.com/blockscout/blockscout/pull/4439), - [#4465](https://github.com/blockscout/blockscout/pull/4465) - Fix revert response in contract's output
## 3.7.2-beta

@ -17,7 +17,12 @@ defmodule BlockScoutWeb.SmartContractView do
def writable?(function) when is_nil(function), do: false
def outputs?(outputs) when not is_nil(outputs), do: Enum.any?(outputs)
def outputs?(outputs) when not is_nil(outputs) do
case outputs do
{:error, _} -> false
_ -> Enum.any?(outputs)
end
end
def outputs?(outputs) when is_nil(outputs), do: false

Loading…
Cancel
Save