Fix tuple array output in contract interaction

pull/3495/head
Victor Baranov 4 years ago
parent 6afc85d534
commit de4c2e476d
  1. 2
      CHANGELOG.md
  2. 11
      apps/block_scout_web/lib/block_scout_web/views/smart_contract_view.ex

@ -7,7 +7,7 @@
### Fixes
- [#3494](https://github.com/poanetwork/blockscout/pull/3494) - Contracts interaction: fix method call with array[] input
- [#3494](https://github.com/poanetwork/blockscout/pull/3494) - Contracts interaction: fix tuple output display
- [#3494](https://github.com/poanetwork/blockscout/pull/3494), [#3495](https://github.com/poanetwork/blockscout/pull/3495) - Contracts interaction: fix tuple output display
- [#3479](https://github.com/poanetwork/blockscout/pull/3479) - Fix working with big numbers in Staking DApp
- [#3477](https://github.com/poanetwork/blockscout/pull/3477) - Contracts interaction: fix broken call of GnosisProxy contract methods with parameters
- [#3477](https://github.com/poanetwork/blockscout/pull/3477) - Contracts interaction: fix broken call of fallback function

@ -49,15 +49,8 @@ defmodule BlockScoutWeb.SmartContractView do
def values(values, type) when is_list(values) and type == "tuple[]" do
array_from_tuple = tupple_to_array(values)
array_from_tuple_final =
if Enum.count(array_from_tuple) > 0 do
[result] = array_from_tuple
result
else
array_from_tuple
end
array_from_tuple_final
array_from_tuple
|> Enum.join(", ")
end
def values(value, type) when type in ["address", "address payable"] do

Loading…
Cancel
Save