Merge pull request #3514 from poanetwork/vb-fix-empty-array

Read contract: fix internal server error for method with empty output array
pull/3515/head
Victor Baranov 4 years ago committed by GitHub
commit e4f79c0e15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 2
      apps/explorer/lib/explorer/smart_contract/reader.ex

@ -7,6 +7,7 @@
- [#3462](https://github.com/poanetwork/blockscout/pull/3462) - Display price for bridged tokens
### Fixes
- [#3514](https://github.com/poanetwork/blockscout/pull/3514) - Read contract: fix internal server error
- [#3513](https://github.com/poanetwork/blockscout/pull/3513) - Fix input data processing for method call (array type of data)
- [#3509](https://github.com/poanetwork/blockscout/pull/3509) - Fix QR code tooltip appearance in mobile view
- [#3507](https://github.com/poanetwork/blockscout/pull/3507), [#3510](https://github.com/poanetwork/blockscout/pull/3510) - Fix left margin of balance card in mobile view

@ -454,6 +454,8 @@ defmodule Explorer.SmartContract.Reader do
if String.contains?(number_rest, "[]") do
values_array = Enum.at(values, index)
values_array = if is_list(values_array), do: values_array, else: []
values_array_formatted =
Enum.map(values_array, fn value ->
bytes_to_string(value)

Loading…
Cancel
Save