Cut 'from' param from query contract request if it's empty

pull/6891/head
Nikita Pozdniakov 2 years ago
parent 217cb4bcea
commit 15962fb907
No known key found for this signature in database
GPG Key ID: F344106F9804FE5F
  1. 1
      CHANGELOG.md
  2. 2
      apps/explorer/lib/explorer/smart_contract/reader.ex

@ -6,6 +6,7 @@
### Fixes
- [#6891](https://github.com/blockscout/blockscout/pull/6891) - Fix read contract for geth
- [#6889](https://github.com/blockscout/blockscout/pull/6889) - Fix Internal Server Error on tx input decoding
### Chore

@ -144,11 +144,11 @@ defmodule Explorer.SmartContract.Reader do
|> Enum.map(fn {method_id, args} ->
%{
contract_address: contract_address,
from: from,
method_id: method_id,
args: args,
block_number: block_number
}
|> (&if(!is_nil(from) && from != "", do: Map.put(&1, :from, from), else: &1)).()
end)
requests

Loading…
Cancel
Save