Merge branch 'master' into api-menu-item

pull/2506/head
Victor Baranov 5 years ago committed by GitHub
commit ba6433dd08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      CHANGELOG.md
  2. 1
      PULL_REQUEST_TEMPLATE.md
  3. 5
      apps/block_scout_web/assets/css/theme/_dark-theme.scss
  4. 10
      apps/block_scout_web/assets/js/lib/async_listing_load.js
  5. 17
      apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex
  6. 24
      apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex
  7. 43
      apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex
  8. 4
      apps/block_scout_web/mix.exs
  9. 40
      apps/block_scout_web/priv/gettext/default.pot
  10. 40
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
  11. 14
      apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs
  12. 4
      apps/explorer/mix.exs
  13. 6
      mix.lock

@ -6,6 +6,10 @@
- [#2456](https://github.com/poanetwork/blockscout/pull/2456) - fetch pending transactions for geth - [#2456](https://github.com/poanetwork/blockscout/pull/2456) - fetch pending transactions for geth
### Fixes ### Fixes
- [#2519](https://github.com/poanetwork/blockscout/pull/2519) - enable `First` page button in pagination
- [#2515](https://github.com/poanetwork/blockscout/pull/2515) - do not aggregate NFT token transfers
- [#2512](https://github.com/poanetwork/blockscout/pull/2512) - alert link fix
- [#2508](https://github.com/poanetwork/blockscout/pull/2508) - logs view columns fix
- [#2506](https://github.com/poanetwork/blockscout/pull/2506) - fix two active tab in the top menu - [#2506](https://github.com/poanetwork/blockscout/pull/2506) - fix two active tab in the top menu
- [#2503](https://github.com/poanetwork/blockscout/pull/2503) - Mitigate autocompletion library influence to page loading performance - [#2503](https://github.com/poanetwork/blockscout/pull/2503) - Mitigate autocompletion library influence to page loading performance
- [#2502](https://github.com/poanetwork/blockscout/pull/2502) - increase reward task timeout - [#2502](https://github.com/poanetwork/blockscout/pull/2502) - increase reward task timeout
@ -16,6 +20,8 @@
- [#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
- [#2507](https://github.com/poanetwork/blockscout/pull/2507) - update minor version of ecto, ex_machina, phoenix_live_reload
- [#2516](https://github.com/poanetwork/blockscout/pull/2516) - update absinthe plug from fork
- [#2473](https://github.com/poanetwork/blockscout/pull/2473) - get rid of cldr warnings - [#2473](https://github.com/poanetwork/blockscout/pull/2473) - get rid of cldr warnings
- [#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
- [#2492](https://github.com/poanetwork/blockscout/pull/2492) - hide decoded row if event is not decoded - [#2492](https://github.com/poanetwork/blockscout/pull/2492) - hide decoded row if event is not decoded

@ -36,3 +36,4 @@
- [ ] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again. - [ ] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
- [ ] I checked whether I should update the docs and did so if necessary - [ ] I checked whether I should update the docs and did so if necessary
- [ ] If I added/changed/removed ENV var, I should update the list of env vars in https://github.com/poanetwork/blockscout/blob/master/docs/env-variables.md to reflect changes in the table here https://poanetwork.github.io/blockscout/#/env-variables?id=blockscout-env-variables - [ ] If I added/changed/removed ENV var, I should update the list of env vars in https://github.com/poanetwork/blockscout/blob/master/docs/env-variables.md to reflect changes in the table here https://poanetwork.github.io/blockscout/#/env-variables?id=blockscout-env-variables
- [ ] If I add new indices into DB, I checked, that they don't redundant with PGHero or other tools

@ -680,4 +680,9 @@ $labels-dark: #8a8dba; // header nav, labels
color: #3f436b !important; color: #3f436b !important;
border-right-color: #3f436b !important; border-right-color: #3f436b !important;
} }
// alert link
.alert-link {
color: $dark-secondary;
}
} }

@ -201,6 +201,16 @@ export const elements = {
$el.attr('href', state.prevPagePath) $el.attr('href', state.prevPagePath)
} }
}, },
'[data-async-listing] [data-first-page-button]': {
render ($el, state) {
if (state.pagesStack.length === 0) {
return $el.hide()
}
$el.show()
$el.attr('disabled', false)
$el.attr('href', window.location.href.split('?')[0])
}
},
'[data-async-listing] [data-page-number]': { '[data-async-listing] [data-page-number]': {
render ($el, state) { render ($el, state) {
if (state.emptyResponse) { if (state.emptyResponse) {

@ -14,15 +14,14 @@
<!-- Pagination --> <!-- Pagination -->
<ul class="pagination"> <ul class="pagination">
<!-- First --> <!-- First -->
<%= if assigns[:first_page_path] do %> <li class="page-item">
<li class="page-item"> <a
<a disabled
<%= if !assigns[:first_page_path] do %>disabled<% end %> class="page-link"
class="page-link" href
href='<%= "#{assigns[:first_page_path]}" %>' data-first-page-button
>First</a> >First</a>
</li> </li>
<% end %>
<!-- Previous --> <!-- Previous -->
<li class="page-item"> <li class="page-item">
<a <a

@ -1,7 +1,7 @@
<div data-test="transaction_log" class="tile tile-muted"> <div data-test="transaction_log" class="tile tile-muted">
<dl class="row"> <dl class="row">
<dt class="col-md-1"> <%= gettext "Address" %> </dt> <dt class="col-lg-2"> <%= gettext "Address" %> </dt>
<dd class="col-md-11"> <dd class="col-lg-10">
<h3 class=""> <h3 class="">
<%= link( <%= link(
@log.address, @log.address,
@ -13,8 +13,8 @@
</dd> </dd>
<%= 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> <dt class="col-lg-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-11"> <dd class="col-lg-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 @transaction do %> <%= case @transaction do %>
@ -25,16 +25,16 @@
<% end %> <% end %>
</div> </div>
<% {:error, :could_not_decode} -> %> <% {:error, :could_not_decode} -> %>
<dt class="col-md-1"><%= gettext "Decoded" %></dt> <dt class="col-lg-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-11"> <dd class="col-lg-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>
<% {:error, :no_matching_function} -> %> <% {:error, :no_matching_function} -> %>
<%= nil %> <%= nil %>
<% {:ok, method_id, text, mapping} -> %> <% {:ok, method_id, text, mapping} -> %>
<dt class="col-md-1"><%= gettext "Decoded" %></dt> <dt class="col-lg-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-11"> <dd class="col-lg-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>
@ -88,8 +88,8 @@
<%= nil %> <%= nil %>
<% end %> <% end %>
<dt class="col-md-1"><%= gettext "Topics" %></dt> <dt class="col-lg-2"><%= gettext "Topics" %></dt>
<dd class="col-md-11"> <dd class="col-lg-10">
<div class="raw-transaction-log-topics"> <div class="raw-transaction-log-topics">
<%= unless is_nil(@log.first_topic) do %> <%= unless is_nil(@log.first_topic) do %>
<div class="text-dark"> <div class="text-dark">
@ -117,10 +117,10 @@
<% end %> <% end %>
</div> </div>
</dd> </dd>
<dt class="col-md-1"> <dt class="col-lg-2">
<%= gettext "Data" %> <%= gettext "Data" %>
</dt> </dt>
<dd class="col-md-11"> <dd class="col-lg-10">
<%= unless is_nil(@log.data) do %> <%= unless is_nil(@log.data) do %>
<div class="text-dark raw-transaction-log-data"> <div class="text-dark raw-transaction-log-data">
<%= @log.data %> <%= @log.data %>

@ -40,22 +40,43 @@ defmodule BlockScoutWeb.TransactionView do
end end
def aggregate_token_transfers(token_transfers) do def aggregate_token_transfers(token_transfers) do
token_transfers {transfers, nft_transfers} =
|> Enum.reduce(%{}, fn token_transfer, acc -> token_transfers
new_entry = %{ |> Enum.reduce({%{}, []}, fn token_transfer, acc ->
token: token_transfer.token, aggregate_reducer(token_transfer, acc)
amount: token_transfer.amount, end)
token_id: token_transfer.token_id
}
existing_entry = Map.get(acc, token_transfer.token_contract_address, %{new_entry | amount: Decimal.new(0)}) final_transfers = Map.values(transfers)
Map.put(acc, token_transfer.token_contract_address, %{ final_transfers ++ nft_transfers
end
defp aggregate_reducer(%{amount: amount} = token_transfer, {acc1, acc2}) when is_nil(amount) do
new_entry = %{
token: token_transfer.token,
amount: nil,
token_id: token_transfer.token_id
}
{acc1, [new_entry | acc2]}
end
defp aggregate_reducer(token_transfer, {acc1, acc2}) do
new_entry = %{
token: token_transfer.token,
amount: token_transfer.amount,
token_id: token_transfer.token_id
}
existing_entry = Map.get(acc1, token_transfer.token_contract_address, %{new_entry | amount: Decimal.new(0)})
new_acc1 =
Map.put(acc1, token_transfer.token_contract_address, %{
new_entry new_entry
| amount: Decimal.add(new_entry.amount, existing_entry.amount) | amount: Decimal.add(new_entry.amount, existing_entry.amount)
}) })
end)
|> Enum.map(fn {_key, value} -> value end) {new_acc1, acc2}
end end
def token_type_name(type) do def token_type_name(type) do

@ -64,7 +64,7 @@ defmodule BlockScoutWeb.Mixfile do
# Integrates Absinthe subscriptions with Phoenix # Integrates Absinthe subscriptions with Phoenix
{:absinthe_phoenix, git: "https://github.com/ayrat555/absinthe_phoenix.git", branch: "master"}, {:absinthe_phoenix, git: "https://github.com/ayrat555/absinthe_phoenix.git", branch: "master"},
# Plug support for Absinthe # Plug support for Absinthe
{:absinthe_plug, git: "https://github.com/ayrat555/absinthe_plug.git", branch: "ab-allow-to-set-default-query"}, {:absinthe_plug, git: "https://github.com/ayrat555/absinthe_plug.git", branch: "ab-enable-default-query"},
# Absinthe support for the Relay framework # Absinthe support for the Relay framework
{:absinthe_relay, "~> 1.4"}, {:absinthe_relay, "~> 1.4"},
{:bypass, "~> 1.0", only: :test}, {:bypass, "~> 1.0", only: :test},
@ -102,7 +102,7 @@ defmodule BlockScoutWeb.Mixfile do
{:phoenix, "~> 1.4"}, {:phoenix, "~> 1.4"},
{:phoenix_ecto, "~> 4.0"}, {:phoenix_ecto, "~> 4.0"},
{:phoenix_html, "~> 2.10"}, {:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: [:dev]}, {:phoenix_live_reload, "~> 1.2", only: [:dev]},
{:phoenix_pubsub, "~> 1.0"}, {:phoenix_pubsub, "~> 1.0"},
# use `:cowboy` for WebServer with `:plug` # use `:cowboy` for WebServer with `:plug`
{:plug_cowboy, "~> 2.0"}, {:plug_cowboy, "~> 2.0"},

@ -49,7 +49,7 @@ msgid "%{subnetwork} Explorer - BlockScout"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:163 #: lib/block_scout_web/views/transaction_view.ex:184
msgid "(Awaiting internal transactions for status)" msgid "(Awaiting internal transactions for status)"
msgstr "" msgstr ""
@ -276,12 +276,12 @@ msgid "Contract Address Pending"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:240 #: lib/block_scout_web/views/transaction_view.ex:261
msgid "Contract Call" msgid "Contract Call"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:239 #: lib/block_scout_web/views/transaction_view.ex:260
msgid "Contract Creation" msgid "Contract Creation"
msgstr "" msgstr ""
@ -356,12 +356,12 @@ msgid "Error trying to fetch balances."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:167 #: lib/block_scout_web/views/transaction_view.ex:188
msgid "Error: %{reason}" msgid "Error: %{reason}"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:165 #: lib/block_scout_web/views/transaction_view.ex:186
msgid "Error: (Awaiting internal transactions for reason)" msgid "Error: (Awaiting internal transactions for reason)"
msgstr "" msgstr ""
@ -466,7 +466,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11
#: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6
#: lib/block_scout_web/views/address_view.ex:306 #: lib/block_scout_web/views/address_view.ex:306
#: lib/block_scout_web/views/transaction_view.ex:293 #: lib/block_scout_web/views/transaction_view.ex:314
msgid "Internal Transactions" msgid "Internal Transactions"
msgstr "" msgstr ""
@ -493,7 +493,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17
#: lib/block_scout_web/templates/transaction_log/index.html.eex:8 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8
#: lib/block_scout_web/views/address_view.ex:312 #: lib/block_scout_web/views/address_view.ex:312
#: lib/block_scout_web/views/transaction_view.ex:294 #: lib/block_scout_web/views/transaction_view.ex:315
msgid "Logs" msgid "Logs"
msgstr "" msgstr ""
@ -506,8 +506,8 @@ msgid "Market Cap"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:148 #: lib/block_scout_web/views/transaction_view.ex:169
#: lib/block_scout_web/views/transaction_view.ex:148 #: lib/block_scout_web/views/transaction_view.ex:169
msgid "Max of" msgid "Max of"
msgstr "" msgstr ""
@ -598,8 +598,8 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:58 #: lib/block_scout_web/templates/layout/_topnav.html.eex:58
#: lib/block_scout_web/views/transaction_view.ex:162 #: lib/block_scout_web/views/transaction_view.ex:183
#: lib/block_scout_web/views/transaction_view.ex:196 #: lib/block_scout_web/views/transaction_view.ex:217
msgid "Pending" msgid "Pending"
msgstr "" msgstr ""
@ -686,7 +686,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8 #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8
#: lib/block_scout_web/views/transaction_view.ex:164 #: lib/block_scout_web/views/transaction_view.ex:185
msgid "Success" msgid "Success"
msgstr "" msgstr ""
@ -791,7 +791,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:5 #: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:5
#: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:4 #: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:4
#: lib/block_scout_web/views/transaction_view.ex:238 #: lib/block_scout_web/views/transaction_view.ex:259
msgid "Token Transfer" msgid "Token Transfer"
msgstr "" msgstr ""
@ -801,7 +801,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:4 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:4
#: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7
#: lib/block_scout_web/views/tokens/overview_view.ex:35 #: lib/block_scout_web/views/tokens/overview_view.ex:35
#: lib/block_scout_web/views/transaction_view.ex:292 #: lib/block_scout_web/views/transaction_view.ex:313
msgid "Token Transfers" msgid "Token Transfers"
msgstr "" msgstr ""
@ -835,7 +835,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:3 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:3
#: lib/block_scout_web/views/transaction_view.ex:241 #: lib/block_scout_web/views/transaction_view.ex:262
msgid "Transaction" msgid "Transaction"
msgstr "" msgstr ""
@ -1499,7 +1499,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:24 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:24
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7 #: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7
#: lib/block_scout_web/views/transaction_view.ex:295 #: lib/block_scout_web/views/transaction_view.ex:316
msgid "Raw Trace" msgid "Raw Trace"
msgstr "" msgstr ""
@ -1510,7 +1510,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: #:
#: lib/block_scout_web/templates/common_components/_pagination_container.html.eex:40 #: lib/block_scout_web/templates/common_components/_pagination_container.html.eex:39
msgid "Page" msgid "Page"
msgstr "" msgstr ""
@ -1528,7 +1528,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: #:
#: lib/block_scout_web/templates/common_components/_pagination_container.html.eex:40 #: lib/block_scout_web/templates/common_components/_pagination_container.html.eex:39
msgid "of" msgid "of"
msgstr "" msgstr ""
@ -1707,12 +1707,12 @@ msgid "Change Network"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:63 #: lib/block_scout_web/views/transaction_view.ex:84
msgid "ERC-20 " msgid "ERC-20 "
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:64 #: lib/block_scout_web/views/transaction_view.ex:85
msgid "ERC-721 " msgid "ERC-721 "
msgstr "" msgstr ""

@ -49,7 +49,7 @@ msgid "%{subnetwork} Explorer - BlockScout"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:163 #: lib/block_scout_web/views/transaction_view.ex:184
msgid "(Awaiting internal transactions for status)" msgid "(Awaiting internal transactions for status)"
msgstr "" msgstr ""
@ -276,12 +276,12 @@ msgid "Contract Address Pending"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:240 #: lib/block_scout_web/views/transaction_view.ex:261
msgid "Contract Call" msgid "Contract Call"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:239 #: lib/block_scout_web/views/transaction_view.ex:260
msgid "Contract Creation" msgid "Contract Creation"
msgstr "" msgstr ""
@ -356,12 +356,12 @@ msgid "Error trying to fetch balances."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:167 #: lib/block_scout_web/views/transaction_view.ex:188
msgid "Error: %{reason}" msgid "Error: %{reason}"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:165 #: lib/block_scout_web/views/transaction_view.ex:186
msgid "Error: (Awaiting internal transactions for reason)" msgid "Error: (Awaiting internal transactions for reason)"
msgstr "" msgstr ""
@ -466,7 +466,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11
#: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6
#: lib/block_scout_web/views/address_view.ex:306 #: lib/block_scout_web/views/address_view.ex:306
#: lib/block_scout_web/views/transaction_view.ex:293 #: lib/block_scout_web/views/transaction_view.ex:314
msgid "Internal Transactions" msgid "Internal Transactions"
msgstr "" msgstr ""
@ -493,7 +493,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17
#: lib/block_scout_web/templates/transaction_log/index.html.eex:8 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8
#: lib/block_scout_web/views/address_view.ex:312 #: lib/block_scout_web/views/address_view.ex:312
#: lib/block_scout_web/views/transaction_view.ex:294 #: lib/block_scout_web/views/transaction_view.ex:315
msgid "Logs" msgid "Logs"
msgstr "" msgstr ""
@ -506,8 +506,8 @@ msgid "Market Cap"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:148 #: lib/block_scout_web/views/transaction_view.ex:169
#: lib/block_scout_web/views/transaction_view.ex:148 #: lib/block_scout_web/views/transaction_view.ex:169
msgid "Max of" msgid "Max of"
msgstr "" msgstr ""
@ -598,8 +598,8 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:58 #: lib/block_scout_web/templates/layout/_topnav.html.eex:58
#: lib/block_scout_web/views/transaction_view.ex:162 #: lib/block_scout_web/views/transaction_view.ex:183
#: lib/block_scout_web/views/transaction_view.ex:196 #: lib/block_scout_web/views/transaction_view.ex:217
msgid "Pending" msgid "Pending"
msgstr "" msgstr ""
@ -686,7 +686,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8 #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8
#: lib/block_scout_web/views/transaction_view.ex:164 #: lib/block_scout_web/views/transaction_view.ex:185
msgid "Success" msgid "Success"
msgstr "" msgstr ""
@ -791,7 +791,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:5 #: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:5
#: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:4 #: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:4
#: lib/block_scout_web/views/transaction_view.ex:238 #: lib/block_scout_web/views/transaction_view.ex:259
msgid "Token Transfer" msgid "Token Transfer"
msgstr "" msgstr ""
@ -801,7 +801,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:4 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:4
#: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7
#: lib/block_scout_web/views/tokens/overview_view.ex:35 #: lib/block_scout_web/views/tokens/overview_view.ex:35
#: lib/block_scout_web/views/transaction_view.ex:292 #: lib/block_scout_web/views/transaction_view.ex:313
msgid "Token Transfers" msgid "Token Transfers"
msgstr "" msgstr ""
@ -835,7 +835,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:3 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:3
#: lib/block_scout_web/views/transaction_view.ex:241 #: lib/block_scout_web/views/transaction_view.ex:262
msgid "Transaction" msgid "Transaction"
msgstr "" msgstr ""
@ -1500,7 +1500,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:24 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:24
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7 #: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7
#: lib/block_scout_web/views/transaction_view.ex:295 #: lib/block_scout_web/views/transaction_view.ex:316
msgid "Raw Trace" msgid "Raw Trace"
msgstr "" msgstr ""
@ -1511,7 +1511,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: #:
#: lib/block_scout_web/templates/common_components/_pagination_container.html.eex:40 #: lib/block_scout_web/templates/common_components/_pagination_container.html.eex:39
msgid "Page" msgid "Page"
msgstr "" msgstr ""
@ -1529,7 +1529,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: #:
#: lib/block_scout_web/templates/common_components/_pagination_container.html.eex:40 #: lib/block_scout_web/templates/common_components/_pagination_container.html.eex:39
msgid "of" msgid "of"
msgstr "" msgstr ""
@ -1708,12 +1708,12 @@ msgid "Change Network"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:63 #: lib/block_scout_web/views/transaction_view.ex:84
msgid "ERC-20 " msgid "ERC-20 "
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:64 #: lib/block_scout_web/views/transaction_view.ex:85
msgid "ERC-721 " msgid "ERC-721 "
msgstr "" msgstr ""

@ -268,5 +268,19 @@ defmodule BlockScoutWeb.TransactionViewTest do
assert Enum.count(result) == 1 assert Enum.count(result) == 1
assert List.first(result).amount == Decimal.new(3) assert List.first(result).amount == Decimal.new(3)
end end
test "does not aggregate NFT tokens" do
transaction =
:transaction
|> insert()
|> with_block()
token_transfer = insert(:token_transfer, transaction: transaction, amount: nil)
result = TransactionView.aggregate_token_transfers([token_transfer, token_transfer, token_transfer])
assert Enum.count(result) == 3
assert List.first(result).amount == nil
end
end end
end end

@ -74,13 +74,13 @@ defmodule Explorer.Mixfile do
{:decimal, "~> 1.0"}, {:decimal, "~> 1.0"},
{:dialyxir, "~> 0.5", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 0.5", only: [:dev, :test], runtime: false},
# `override: true` for `ex_machina` compatibility # `override: true` for `ex_machina` compatibility
{:ecto, "~> 3.0", override: true}, {:ecto, "~> 3.1", override: true},
# Storing blockchain data and derived data in PostgreSQL. # Storing blockchain data and derived data in PostgreSQL.
{:ecto_sql, "~> 3.1"}, {:ecto_sql, "~> 3.1"},
# JSONRPC access to query smart contracts # JSONRPC access to query smart contracts
{:ethereum_jsonrpc, in_umbrella: true}, {:ethereum_jsonrpc, in_umbrella: true},
# Data factory for testing # Data factory for testing
{:ex_machina, "~> 2.1", only: [:test]}, {:ex_machina, "~> 2.3", only: [:test]},
# Code coverage # Code coverage
{:excoveralls, "~> 0.10.0", only: [:test], github: "KronicDeth/excoveralls", branch: "circle-workflows"}, {:excoveralls, "~> 0.10.0", only: [:test], github: "KronicDeth/excoveralls", branch: "circle-workflows"},
{:exvcr, "~> 0.10", only: :test}, {:exvcr, "~> 0.10", only: :test},

@ -2,8 +2,8 @@
"abi": {:hex, :abi, "0.1.12", "87ae04cb09e2308db7b3c350584dc3934de0e308f6a056ba82be5756b081a1ca", [:mix], [{:exth_crypto, "~> 0.1.4", [hex: :exth_crypto, repo: "hexpm", optional: false]}], "hexpm"}, "abi": {:hex, :abi, "0.1.12", "87ae04cb09e2308db7b3c350584dc3934de0e308f6a056ba82be5756b081a1ca", [:mix], [{:exth_crypto, "~> 0.1.4", [hex: :exth_crypto, repo: "hexpm", optional: false]}], "hexpm"},
"abnf2": {:hex, :abnf2, "0.1.2", "6f8792b8ac3288dba5fc889c2bceae9fe78f74e1a7b36bea9726ffaa9d7bef95", [:mix], []}, "abnf2": {:hex, :abnf2, "0.1.2", "6f8792b8ac3288dba5fc889c2bceae9fe78f74e1a7b36bea9726ffaa9d7bef95", [:mix], []},
"absinthe": {:hex, :absinthe, "1.4.14", "fef224a6aac63d6eaafbc0cb96040a8abcd572275b9b4db69d46329acdcae7c7", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"}, "absinthe": {:hex, :absinthe, "1.4.14", "fef224a6aac63d6eaafbc0cb96040a8abcd572275b9b4db69d46329acdcae7c7", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
"absinthe_phoenix": {:git, "https://github.com/ayrat555/absinthe_phoenix.git", "4104c7213c328c3698b52710d49cd6d85449305c", [branch: "master"]}, "absinthe_phoenix": {:git, "https://github.com/ayrat555/absinthe_phoenix.git", "0f5127844a9e4e1c5fecb1fcee225894a2af6336", [branch: "master"]},
"absinthe_plug": {:git, "https://github.com/ayrat555/absinthe_plug.git", "e74da0a6e004fe4126885b5f5f60a3e72abd70bb", [branch: "ab-allow-to-set-default-query"]}, "absinthe_plug": {:git, "https://github.com/ayrat555/absinthe_plug.git", "cbe1c170e11e60b3b0146b925a1ce6ec562840ce", [branch: "ab-enable-default-query"]},
"absinthe_relay": {:hex, :absinthe_relay, "1.4.6", "ec0e2288994b388556247cf9601245abec785cdf206d6e844f2992d29de21624", [:mix], [{:absinthe, "~> 1.4.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm"}, "absinthe_relay": {:hex, :absinthe_relay, "1.4.6", "ec0e2288994b388556247cf9601245abec785cdf206d6e844f2992d29de21624", [:mix], [{:absinthe, "~> 1.4.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm"},
"accept": {:hex, :accept, "0.3.3", "548ebb6fb2e8b0d170e75bb6123aea6ceecb0189bb1231eeadf52eac08384a97", [:rebar3], [], "hexpm"}, "accept": {:hex, :accept, "0.3.3", "548ebb6fb2e8b0d170e75bb6123aea6ceecb0189bb1231eeadf52eac08384a97", [:rebar3], [], "hexpm"},
"artificery": {:hex, :artificery, "0.2.6", "f602909757263f7897130cbd006b0e40514a541b148d366ad65b89236b93497a", [:mix], [], "hexpm"}, "artificery": {:hex, :artificery, "0.2.6", "f602909757263f7897130cbd006b0e40514a541b148d366ad65b89236b93497a", [:mix], [], "hexpm"},
@ -43,7 +43,7 @@
"ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.6.4", "5b1ac8451f889576bb29dee70412de1170974298727ab944aa4d17e91bdd3472", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.6", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.3", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, "ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.6.4", "5b1ac8451f889576bb29dee70412de1170974298727ab944aa4d17e91bdd3472", [:mix], [{:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.6", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.3", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"},
"ex_cldr_units": {:hex, :ex_cldr_units, "2.5.1", "0e65067a22a7c5146266c313d6333c2700868c32aa6d536f47c6c0d84aac3ac1", [:mix], [{:ex_cldr, "~> 2.6", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_lists, "~> 2.2", [hex: :ex_cldr_lists, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.6", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"}, "ex_cldr_units": {:hex, :ex_cldr_units, "2.5.1", "0e65067a22a7c5146266c313d6333c2700868c32aa6d536f47c6c0d84aac3ac1", [:mix], [{:ex_cldr, "~> 2.6", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_lists, "~> 2.2", [hex: :ex_cldr_lists, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.6", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.19.2", "6f4081ccd9ed081b6dc0bd5af97a41e87f5554de469e7d76025fba535180565f", [:mix], [{:earmark, "~> 1.2", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"}, "ex_doc": {:hex, :ex_doc, "0.19.2", "6f4081ccd9ed081b6dc0bd5af97a41e87f5554de469e7d76025fba535180565f", [:mix], [{:earmark, "~> 1.2", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"ex_machina": {:hex, :ex_machina, "2.2.2", "d84217a6fb7840ff771d2561b8aa6d74a0d8968e4b10ecc0d7e9890dc8fb1c6a", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm"}, "ex_machina": {:hex, :ex_machina, "2.3.0", "92a5ad0a8b10ea6314b876a99c8c9e3f25f4dde71a2a835845b136b9adaf199a", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm"},
"ex_rlp": {:hex, :ex_rlp, "0.5.2", "7f4ce7bd55e543c054ce6d49629b01e9833c3462e3d547952be89865f39f2c58", [:mix], [], "hexpm"}, "ex_rlp": {:hex, :ex_rlp, "0.5.2", "7f4ce7bd55e543c054ce6d49629b01e9833c3462e3d547952be89865f39f2c58", [:mix], [], "hexpm"},
"ex_utils": {:hex, :ex_utils, "0.1.7", "2c133e0bcdc49a858cf8dacf893308ebc05bc5fba501dc3d2935e65365ec0bf3", [:mix], [], "hexpm"}, "ex_utils": {:hex, :ex_utils, "0.1.7", "2c133e0bcdc49a858cf8dacf893308ebc05bc5fba501dc3d2935e65365ec0bf3", [:mix], [], "hexpm"},
"exactor": {:hex, :exactor, "2.2.4", "5efb4ddeb2c48d9a1d7c9b465a6fffdd82300eb9618ece5d34c3334d5d7245b1", [:mix], []}, "exactor": {:hex, :exactor, "2.2.4", "5efb4ddeb2c48d9a1d7c9b465a6fffdd82300eb9618ece5d34c3334d5d7245b1", [:mix], []},

Loading…
Cancel
Save