Merge pull request #2492 from poanetwork/ab-hide-decoded-row

hide decoded row if event is not decoded
pull/2508/head
Victor Baranov 5 years ago committed by GitHub
commit 2dbe359061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 10
      apps/block_scout_web/lib/block_scout_web/templates/address_logs/_logs.html.eex
  3. 10
      apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex
  4. 44
      apps/block_scout_web/priv/gettext/default.pot
  5. 44
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -15,6 +15,7 @@
- [#2425](https://github.com/poanetwork/blockscout/pull/2425) - Force to show address view for checksummed address even if it is not in DB - [#2425](https://github.com/poanetwork/blockscout/pull/2425) - Force to show address view for checksummed address even if it is not in DB
### Chore ### Chore
- [#2492](https://github.com/poanetwork/blockscout/pull/2492) - hide decoded row if event is not decoded
- [#2402](https://github.com/poanetwork/blockscout/pull/2402) - bump otp version to 22.0 - [#2402](https://github.com/poanetwork/blockscout/pull/2402) - bump otp version to 22.0
- [#2432](https://github.com/poanetwork/blockscout/pull/2432) - bump credo version - [#2432](https://github.com/poanetwork/blockscout/pull/2432) - bump credo version
- [#2457](https://github.com/poanetwork/blockscout/pull/2457) - update mix.lock - [#2457](https://github.com/poanetwork/blockscout/pull/2457) - update mix.lock

@ -11,10 +11,10 @@
) %> ) %>
</h3> </h3>
</dd> </dd>
<dt class="col-md-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-10">
<%= case decode(@log, @log.transaction) do %> <%= case decode(@log, @log.transaction) do %>
<% {:error, :contract_not_verified} -> %> <% {:error, :contract_not_verified} -> %>
<dt class="col-md-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-10">
<div class="alert alert-info"> <div class="alert alert-info">
<%= gettext "To see decoded input data, the contract must be verified." %> <%= gettext "To see decoded input data, the contract must be verified." %>
<%= case @log.transaction do %> <%= case @log.transaction do %>
@ -25,10 +25,14 @@
<% end %> <% end %>
</div> </div>
<% {:error, :could_not_decode} -> %> <% {:error, :could_not_decode} -> %>
<dt class="col-md-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-10">
<div class="alert alert-danger"> <div class="alert alert-danger">
<%= gettext "Failed to decode log data." %> <%= gettext "Failed to decode log data." %>
</div> </div>
<% {:ok, method_id, text, mapping} -> %> <% {:ok, method_id, text, mapping} -> %>
<dt class="col-md-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-10">
<table summary="Transaction Info" class="table thead-light table-bordered transaction-input-table"> <table summary="Transaction Info" class="table thead-light table-bordered transaction-input-table">
<tr> <tr>
<td>Method Id</td> <td>Method Id</td>
@ -78,7 +82,7 @@
<% end %> <% end %>
</table> </table>
</div> </div>
<% _ -> %> <% _ -> %>
<%= nil %> <%= nil %>
<% end %> <% end %>
<dt class="col-md-2"><%= gettext "Topics" %></dt> <dt class="col-md-2"><%= gettext "Topics" %></dt>

@ -11,10 +11,10 @@
) %> ) %>
</h3> </h3>
</dd> </dd>
<dt class="col-md-1"><%= gettext "Decoded" %></dt>
<dd class="col-md-11">
<%= case decode(@log, @transaction) do %> <%= case decode(@log, @transaction) do %>
<% {:error, :contract_not_verified} -> %> <% {:error, :contract_not_verified} -> %>
<dt class="col-md-1"><%= gettext "Decoded" %></dt>
<dd class="col-md-11">
<div class="alert alert-info"> <div class="alert alert-info">
<%= gettext "To see decoded input data, the contract must be verified." %> <%= gettext "To see decoded input data, the contract must be verified." %>
<%= case @transaction do %> <%= case @transaction do %>
@ -25,10 +25,16 @@
<% end %> <% end %>
</div> </div>
<% {:error, :could_not_decode} -> %> <% {:error, :could_not_decode} -> %>
<dt class="col-md-1"><%= gettext "Decoded" %></dt>
<dd class="col-md-11">
<div class="alert alert-danger"> <div class="alert alert-danger">
<%= gettext "Failed to decode log data." %> <%= gettext "Failed to decode log data." %>
</div> </div>
<% {:error, :no_matching_function} -> %>
<%= nil %>
<% {:ok, method_id, text, mapping} -> %> <% {:ok, method_id, text, mapping} -> %>
<dt class="col-md-1"><%= gettext "Decoded" %></dt>
<dd class="col-md-11">
<table summary="Transaction Info" class="table thead-light table-bordered transaction-input-table"> <table summary="Transaction Info" class="table thead-light table-bordered transaction-input-table">
<tr> <tr>
<td>Method Id</td> <td>Method Id</td>

@ -547,10 +547,10 @@ msgid "Must be set to:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:46 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:46 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:52
msgid "Name" msgid "Name"
msgstr "" msgstr ""
@ -1108,8 +1108,12 @@ msgid "Static Call"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:14 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:16
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:14 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:28
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:34
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:16
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:28
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:36
msgid "Decoded" msgid "Decoded"
msgstr "" msgstr ""
@ -1753,9 +1757,9 @@ msgid "Constructor Arguments"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:59 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:63
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:59 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:65
msgid "Copy Value" msgid "Copy Value"
msgstr "" msgstr ""
@ -1765,29 +1769,29 @@ msgid "Create2"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:49 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:53
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:114 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:118
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:55
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:115 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:121
msgid "Data" msgid "Data"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:29 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:31
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:29 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:31
msgid "Failed to decode log data." msgid "Failed to decode log data."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:48 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:52
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:48 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:54
msgid "Indexed?" msgid "Indexed?"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:43 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:47
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:43 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49
msgid "Log Data" msgid "Log Data"
msgstr "" msgstr ""
@ -1799,14 +1803,14 @@ msgid "Reward"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:84 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:88
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:85 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:91
msgid "Topics" msgid "Topics"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:47 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:51
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:47 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:53
msgid "Type" msgid "Type"
msgstr "" msgstr ""

@ -547,10 +547,10 @@ msgid "Must be set to:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:46 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:46 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:52
msgid "Name" msgid "Name"
msgstr "" msgstr ""
@ -1108,8 +1108,12 @@ msgid "Static Call"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:14 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:16
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:14 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:28
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:34
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:16
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:28
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:36
msgid "Decoded" msgid "Decoded"
msgstr "" msgstr ""
@ -1754,9 +1758,9 @@ msgid "Constructor Arguments"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:59 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:63
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:59 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:65
msgid "Copy Value" msgid "Copy Value"
msgstr "" msgstr ""
@ -1766,29 +1770,29 @@ msgid "Create2"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:49 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:53
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:114 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:118
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:55
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:115 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:121
msgid "Data" msgid "Data"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:29 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:31
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:29 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:31
msgid "Failed to decode log data." msgid "Failed to decode log data."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:48 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:52
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:48 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:54
msgid "Indexed?" msgid "Indexed?"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:43 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:47
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:43 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49
msgid "Log Data" msgid "Log Data"
msgstr "" msgstr ""
@ -1800,14 +1804,14 @@ msgid "Reward"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:84 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:88
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:85 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:91
msgid "Topics" msgid "Topics"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:47 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:51
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:47 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:53
msgid "Type" msgid "Type"
msgstr "" msgstr ""

Loading…
Cancel
Save