Transaction list page redesign
pull/404/head
Jimmy Lauzau 6 years ago committed by GitHub
commit 516e57a1df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      apps/explorer_web/assets/css/_typography.scss
  2. 11
      apps/explorer_web/assets/css/components/_tile.scss
  3. 8
      apps/explorer_web/lib/explorer_web/templates/address/_link.html.eex
  4. 6
      apps/explorer_web/lib/explorer_web/templates/address/_responsive_hash.html.eex
  5. 2
      apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex
  6. 8
      apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex
  7. 8
      apps/explorer_web/lib/explorer_web/templates/address_transaction/_transaction.html.eex
  8. 4
      apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex
  9. 4
      apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex
  10. 98
      apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex
  11. 126
      apps/explorer_web/lib/explorer_web/templates/transaction/index.html.eex
  12. 4
      apps/explorer_web/lib/explorer_web/templates/transaction_internal_transaction/index.html.eex
  13. 12
      apps/explorer_web/lib/explorer_web/views/address_view.ex
  14. 4
      apps/explorer_web/lib/explorer_web/views/transaction_view.ex
  15. 45
      apps/explorer_web/priv/gettext/default.pot
  16. 49
      apps/explorer_web/priv/gettext/en/LC_MESSAGES/default.po
  17. 6
      apps/explorer_web/test/explorer_web/features/pages/transaction_list_page.ex
  18. 4
      apps/explorer_web/test/explorer_web/features/viewing_transactions_test.exs

@ -50,3 +50,8 @@ a {
.monospace {
font-family: $font-family-monospace;
}
.contract-address {
text-decoration: underline;
text-decoration-style: dashed;
}

@ -27,10 +27,10 @@
}
}
&-contract {
&-contract-call {
border-left: 4px solid $green;
.tile-label, .tile-text-highlight {
.tile-label {
color: $green;
}
}
@ -38,9 +38,14 @@
&-contract-creation {
border-left: 4px solid $pink;
.tile-label, .tile-text-highlight {
.tile-label {
color: $pink;
}
.tile-text-highlight {
text-decoration: underline;
text-decoration-style: dashed;
}
}
&-token {

@ -1,11 +1,5 @@
<%= if @address_hash do %>
<%= link to: address_path(ExplorerWeb.Endpoint, :show, @locale, @address_hash), "data-address-hash": @address_hash, "data-test": "address_hash_link" do %>
<%= if @contract do %>
<span class="tile-text-highlight">
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @address_hash %>
</span>
<% else %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @address_hash %>
<% end %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @address_hash, contract: @contract %>
<% end %>
<% end %>

@ -1,2 +1,4 @@
<span class="d-none d-md-none d-lg-inline"><%= @address_hash %></span>
<span class="d-md-block d-lg-none "><%= @address_hash |> to_string() |> String.slice(0..5) %>&ndash;<%= @address_hash |> to_string() |> String.slice(-6..-1) %></span>
<span class="<%= if @contract do %>contract-address<% end %>">
<span class="d-none d-md-none d-lg-inline"><%= @address_hash %></span>
<span class="d-md-block d-lg-none "><%= ExplorerWeb.AddressView.trimmed_hash(@address_hash) %></span>
</span>

@ -16,7 +16,7 @@
</span>
</div>
<h1 class="card-title"><%= address_title(@address) %> Details </h1>
<h3 class="" data-test="address_detail_hash"><%= @address %></h3>
<h3 class="<%= if ExplorerWeb.AddressView.contract?(@address) do %>contract-address<% end %>" data-test="address_detail_hash"><%= @address %></h3>
<div class="d-flex flex-row justify-content-start text-muted">
<span class="mr-4" data-test="transaction_count"><%= Cldr.Number.to_string!(@transaction_count) %> <%= gettext "Transactions" %></span>
</div>

@ -7,15 +7,15 @@
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @internal_transaction.transaction_hash %>
<span>
<%= if @address.hash == @internal_transaction.from_address_hash do %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @internal_transaction.from_address_hash %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @internal_transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@internal_transaction.from_address) %>
<% else %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(@internal_transaction.from_address), address_hash: @internal_transaction.from_address_hash %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: @internal_transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@internal_transaction.from_address), locale: @locale %>
<% end %>
&rarr;
<%= if @address.hash == ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction) do %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction) %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction), contract: ExplorerWeb.AddressView.contract?(@internal_transaction.to_address) %>
<% else %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(@internal_transaction.to_address), address_hash: ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction) %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction), contract: ExplorerWeb.AddressView.contract?(@internal_transaction.to_address), locale: @locale %>
<% end %>
</span>
<%= ExplorerWeb.TransactionView.value(@internal_transaction, include_label: false) %> POA

@ -7,15 +7,15 @@
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @transaction.hash %>
<span>
<%= if @address.hash == @transaction.from_address_hash do %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @transaction.from_address_hash %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: @transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@transaction.from_address) %>
<% else %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(@transaction.from_address), address_hash: @transaction.from_address_hash %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: @transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@transaction.from_address), locale: @locale %>
<% end %>
&rarr;
<%= if @address.hash == ExplorerWeb.TransactionView.to_address_hash(@transaction) do %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(@transaction) %>
<%= render ExplorerWeb.AddressView, "_responsive_hash.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(@transaction), contract: ExplorerWeb.AddressView.contract?(@transaction.to_address) %>
<% else %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(@transaction.to_address), address_hash: ExplorerWeb.TransactionView.to_address_hash(@transaction) %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(@transaction), contract: ExplorerWeb.AddressView.contract?(@transaction.to_address), locale: @locale %>
<% end %>
</span>
<%= ExplorerWeb.TransactionView.value(@transaction, include_label: false) %> POA

@ -162,13 +162,13 @@
</td>
<td data-from-now="<%= transaction.block.timestamp %>"></td>
<td class="address-cell">
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), locale: @locale %>
</td>
<td class="u-text-center"><i class="fas fa-arrow-circle-right"></i></td>
<td>
<%= cond do %>
<% transaction.to_address_hash != nil -> %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address), address_hash: transaction.to_address_hash %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.to_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.to_address), locale: @locale %>
<% transaction.created_contract_address_hash != nil -> %>
<i class="fas fa-plus-square"></i>
<%= link(

@ -11,9 +11,9 @@
<div class="col-md-7 col-lg-8 d-flex flex-column">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %>
<span>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), locale: @locale %>
&rarr;
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address), address_hash: ExplorerWeb.TransactionView.to_address_hash(transaction) %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(transaction), contract: ExplorerWeb.AddressView.contract?(transaction.to_address), locale: @locale %>
</span>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA
</div>

@ -1,14 +1,7 @@
<section class="container-fluid">
<h1>
Transactions
</h1>
<p>
<%= gettext("Showing %{count} Pending Transactions", count: @pending_transaction_count) %>
</p>
<section class="container">
<div class="card">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs">
<ul class="nav nav-tabs card-header-tabs d-none d-md-inline-flex">
<li class="nav-item">
<%= link(
gettext("Validated"),
@ -20,64 +13,53 @@
<%= link(
gettext("Pending"),
class: "nav-link active",
"data-test": "pending_transactions_link",
to: pending_transaction_path(@conn, :index, @conn.assigns.locale)
) %>
</li>
</ul>
</div>
<div class="card-body">
<table class="table table-responsive-sm table-font">
<thead>
<tr>
<th>
<%= gettext "Status" %>
</th>
<th><%= gettext "Hash" %></th>
<th><%= gettext "Last Seen" %></th>
<th><%= gettext "From" %></th>
<th><%= gettext "To" %></th>
<th><%= gettext "Value" %> (<%= gettext "Ether" %>)</th>
</tr>
</thead>
<tbody>
<%= for transaction <- @transactions do %>
<tr data-transaction-hash="<%= transaction.hash %>">
<td>
<div class="transaction__dot transaction__dot--pending"></div>
</td>
<td>
<h2 class="card-title mb-0"><%= gettext "Transactions" %></h2>
<p><%= gettext("Showing %{count} Pending Transactions", count: @pending_transaction_count) %></p>
<%= for transaction <- @transactions do %>
<div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>">
<div class="row" data-test="chain_transaction">
<div class="col-md-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label">
<%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %>
</div>
<div class="col-md-7 col-lg-8 d-flex flex-column">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %>
</td>
<td data-from-now="<%= transaction.updated_at %>"></td>
<td>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %>
</td>
<td>
<%= if transaction.to_address_hash != nil do %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address), address_hash: transaction.to_address_hash %>
<span>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), locale: @locale %>
&rarr;
<%= if transaction.to_address_hash do %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.to_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.to_address), locale: @locale %>
<% else %>
<%= gettext "Contract Creation" %>
<%= gettext("Contract Address Pending") %>
<% end %>
</td>
<td>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %>
</td>
</tr>
<% end %>
</tbody>
</table>
</span>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA
</div>
</div>
</div>
<% end %>
<%= if @next_page_params do %>
<%= link(
gettext("Older"),
class: "button button--secondary button--sm float-right mt-3",
to: pending_transaction_path(
@conn,
:index,
@conn.assigns.locale,
@next_page_params
)
) %>
<% end %>
</div>
</div>
<%= if @next_page_params do %>
<%= link(
gettext("Older"),
class: "button button--secondary button--sm float-right mt-3",
to: pending_transaction_path(
@conn,
:index,
@conn.assigns.locale,
@next_page_params
)
) %>
<% end %>
</section>

@ -1,14 +1,7 @@
<section class="container-fluid">
<h1>
Transactions
</h1>
<p>
<%= gettext("Showing %{count} Validated Transactions", count: Cldr.Number.to_string!(@transaction_estimated_count, format: "#,###")) %>
</p>
<section class="container">
<div class="card">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs">
<ul class="nav nav-tabs card-header-tabs d-none d-md-inline-flex">
<li class="nav-item">
<%= link(
gettext("Validated"),
@ -20,81 +13,56 @@
<%= link(
gettext("Pending"),
class: "nav-link",
to: pending_transaction_path(@conn, :index, @conn.assigns.locale),
"data-test": "pending_transactions_link"
"data-test": "pending_transactions_link",
to: pending_transaction_path(@conn, :index, @conn.assigns.locale)
) %>
</li>
</ul>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-font">
<thead>
<tr>
<th><%= gettext "Status" %></th>
<th><%= gettext "Hash" %></th>
<th><%= gettext "Block" %></th>
<th><%= gettext "Age" %></th>
<th><%= gettext "From" %></th>
<th><%= gettext "To" %></th>
<th><%= gettext "Value" %> (<%= gettext "Ether" %>)</th>
</tr>
</thead>
<tbody>
<%= for transaction <- @transactions do %>
<tr data-transaction-hash="<%= transaction.hash %>">
<td>
<div class="transaction__dot transaction__dot--<%= status(transaction) %>"></div>
</td>
<td>
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %>
</td>
<td>
<%= link(
transaction.block_number,
class: "transactions__link",
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block)
) %>
</td>
<td data-from-now="<%= transaction.block.timestamp %>"></td>
<td>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %>
</td>
<td>
<%= cond do %>
<% transaction.to_address_hash != nil -> %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address), address_hash: transaction.to_address_hash %>
<% transaction.created_contract_address_hash != nil -> %>
<%= link(
"Contract Creation",
class: "transaction__link",
"data-address-hash": transaction.created_contract_address_hash,
to: address_path(@conn, :show, @conn.assigns.locale, transaction.created_contract_address_hash),
title: transaction.created_contract_address_hash
) %>
<% true -> %>
<% end %>
</td>
<td>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<h2 class="card-title mb-0"><%= gettext "Transactions" %></h2>
<p><%= gettext("Showing %{count} Validated Transactions", count: Cldr.Number.to_string!(@transaction_estimated_count, format: "#,###")) %></p>
<%= for transaction <- @transactions do %>
<div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>">
<div class="row" data-test="chain_transaction">
<div class="col-md-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label" data-test="transaction_type">
<%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %>
</div>
<div class="col-md-7 col-lg-8 d-flex flex-column">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %>
<span>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), locale: @locale %>
&rarr;
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(transaction), contract: ExplorerWeb.AddressView.contract?(transaction.to_address), locale: @locale %>
</span>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA
</div>
<div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start justify-content-md-end text-md-right">
<span class="mr-2 mr-sm-0" data-from-now="<%= transaction.block.timestamp %>"></span>
<%= link(
gettext("Block #") <> "#{transaction.block.number}",
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block)
) %>
</div>
</div>
</div>
<% end %>
<%= if @next_page_params do %>
<%= link(
gettext("Older"),
class: "button button--secondary button--sm float-right mt-3",
to: transaction_path(
@conn,
:index,
@conn.assigns.locale,
@next_page_params
)
) %>
<% end %>
</div>
</div>
<%= if @next_page_params do %>
<%= link(
gettext("Older"),
class: "button button--secondary button--sm float-right mt-3",
to: transaction_path(
@conn,
:index,
@conn.assigns.locale,
@next_page_params
)
) %>
<% end %>
</section>

@ -38,7 +38,7 @@
<tr>
<td><%= internal_transaction.type %></td>
<td>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(internal_transaction.from_address), address_hash: internal_transaction.from_address_hash %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: internal_transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(internal_transaction.from_address), locale: @locale %>
</td>
<td>
<%= if ExplorerWeb.InternalTransactionView.create?(internal_transaction) do %>
@ -51,7 +51,7 @@
title: internal_transaction.created_contract_address_hash
) %>
<% else %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(internal_transaction.to_address), address_hash: internal_transaction.to_address_hash %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: internal_transaction.to_address_hash, contract: ExplorerWeb.AddressView.contract?(internal_transaction.to_address), locale: @locale %>
<% end %>
</td>
<td><%= ExplorerWeb.TransactionView.value(internal_transaction, include_label: false) %></td>

@ -1,7 +1,7 @@
defmodule ExplorerWeb.AddressView do
use ExplorerWeb, :view
alias Explorer.Chain.{Address, Wei, SmartContract}
alias Explorer.Chain.{Address, Hash, SmartContract, Wei}
alias Explorer.ExchangeRates.Token
alias ExplorerWeb.ExchangeRates.USD
@ -35,7 +35,7 @@ defmodule ExplorerWeb.AddressView do
def contract?(%Address{contract_code: _}), do: true
def contract?(_), do: false
def contract?(nil), do: true
def formatted_usd(%Address{fetched_balance: nil}, _), do: nil
@ -63,5 +63,13 @@ defmodule ExplorerWeb.AddressView do
end
def smart_contract_verified?(%Address{smart_contract: %SmartContract{}}), do: true
def smart_contract_verified?(%Address{smart_contract: nil}), do: false
def trimmed_hash(%Hash{} = hash) do
string_hash = to_string(hash)
"#{String.slice(string_hash, 0..5)}#{String.slice(string_hash, -6..-1)}"
end
def trimmed_hash(_), do: ""
end

@ -101,7 +101,7 @@ defmodule ExplorerWeb.TransactionView do
def type_suffix(%Transaction{} = transaction) do
cond do
contract_creation?(transaction) -> "contract-creation"
involves_contract?(transaction) -> "contract"
involves_contract?(transaction) -> "contract-call"
true -> "transaction"
end
end
@ -109,7 +109,7 @@ defmodule ExplorerWeb.TransactionView do
def transaction_display_type(%Transaction{} = transaction) do
cond do
contract_creation?(transaction) -> gettext("Contract Creation")
involves_contract?(transaction) -> gettext("Contract")
involves_contract?(transaction) -> gettext("Contract Call")
true -> gettext("Transaction")
end
end

@ -1,12 +1,10 @@
#: lib/explorer_web/templates/block/index.html.eex:18
#: lib/explorer_web/templates/block_transaction/index.html.eex:141
#: lib/explorer_web/templates/transaction/index.html.eex:37
#: lib/explorer_web/templates/transaction/overview.html.eex:51
msgid "Age"
msgstr ""
#: lib/explorer_web/templates/block_transaction/index.html.eex:140
#: lib/explorer_web/templates/transaction/index.html.eex:36
msgid "Block"
msgstr ""
@ -28,8 +26,6 @@ msgstr ""
#: lib/explorer_web/templates/block_transaction/index.html.eex:30
#: lib/explorer_web/templates/block_transaction/index.html.eex:139
#: lib/explorer_web/templates/pending_transaction/index.html.eex:35
#: lib/explorer_web/templates/transaction/index.html.eex:35
msgid "Hash"
msgstr ""
@ -52,12 +48,12 @@ msgstr ""
#: lib/explorer_web/templates/block_transaction/index.html.eex:124
#: lib/explorer_web/templates/chain/_transactions.html.eex:4
#: lib/explorer_web/templates/layout/_topnav.html.eex:18
#: lib/explorer_web/templates/pending_transaction/index.html.eex:24
#: lib/explorer_web/templates/transaction/index.html.eex:24
msgid "Transactions"
msgstr ""
#: lib/explorer_web/templates/block_transaction/index.html.eex:145
#: lib/explorer_web/templates/pending_transaction/index.html.eex:39
#: lib/explorer_web/templates/transaction/index.html.eex:40
#: lib/explorer_web/templates/transaction/overview.html.eex:63
#: lib/explorer_web/templates/transaction/overview.html.eex:71
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:33
@ -149,8 +145,6 @@ msgstr ""
#: lib/explorer_web/templates/address_internal_transaction/index.html.eex:98
#: lib/explorer_web/templates/address_transaction/index.html.eex:109
#: lib/explorer_web/templates/block_transaction/index.html.eex:142
#: lib/explorer_web/templates/pending_transaction/index.html.eex:37
#: lib/explorer_web/templates/transaction/index.html.eex:38
#: lib/explorer_web/templates/transaction/overview.html.eex:79
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:31
#: lib/explorer_web/views/address_internal_transaction_view.ex:9
@ -170,8 +164,6 @@ msgstr ""
#: lib/explorer_web/templates/address_internal_transaction/index.html.eex:86
#: lib/explorer_web/templates/address_transaction/index.html.eex:97
#: lib/explorer_web/templates/block_transaction/index.html.eex:144
#: lib/explorer_web/templates/pending_transaction/index.html.eex:38
#: lib/explorer_web/templates/transaction/index.html.eex:39
#: lib/explorer_web/templates/transaction/overview.html.eex:91
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:32
#: lib/explorer_web/views/address_internal_transaction_view.ex:8
@ -215,8 +207,8 @@ msgstr ""
msgid "Showing %{count} Transactions"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:21
#: lib/explorer_web/templates/transaction/index.html.eex:21
#: lib/explorer_web/templates/pending_transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/overview.html.eex:57
#: lib/explorer_web/views/transaction_view.ex:38
#: lib/explorer_web/views/transaction_view.ex:69
@ -227,7 +219,6 @@ msgstr ""
msgid "First Seen"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:36
#: lib/explorer_web/templates/transaction/overview.html.eex:136
msgid "Last Seen"
msgstr ""
@ -237,7 +228,7 @@ msgstr ""
msgid "Logs"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:6
#: lib/explorer_web/templates/pending_transaction/index.html.eex:25
msgid "Showing %{count} Pending Transactions"
msgstr ""
@ -290,8 +281,6 @@ msgid "Out of Gas"
msgstr ""
#: lib/explorer_web/templates/block_transaction/index.html.eex:137
#: lib/explorer_web/templates/pending_transaction/index.html.eex:33
#: lib/explorer_web/templates/transaction/index.html.eex:34
msgid "Status"
msgstr ""
@ -304,8 +293,6 @@ msgid "Showing #%{number}"
msgstr ""
#: lib/explorer_web/templates/address/_values.html.eex:4
#: lib/explorer_web/templates/pending_transaction/index.html.eex:39
#: lib/explorer_web/templates/transaction/index.html.eex:40
#: lib/explorer_web/templates/transaction/overview.html.eex:63
#: lib/explorer_web/templates/transaction/overview.html.eex:159
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:33
@ -372,8 +359,8 @@ msgstr ""
msgid "Fee"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/index.html.eex:14
#: lib/explorer_web/templates/pending_transaction/index.html.eex:7
#: lib/explorer_web/templates/transaction/index.html.eex:7
msgid "Validated"
msgstr ""
@ -416,7 +403,7 @@ msgstr ""
msgid "Dashboard"
msgstr ""
#: lib/explorer_web/templates/transaction/index.html.eex:6
#: lib/explorer_web/templates/transaction/index.html.eex:25
msgid "Showing %{count} Validated Transactions"
msgstr ""
@ -483,8 +470,8 @@ msgstr ""
#: lib/explorer_web/templates/address_transaction/index.html.eex:138
#: lib/explorer_web/templates/block/index.html.eex:60
#: lib/explorer_web/templates/block_transaction/index.html.eex:198
#: lib/explorer_web/templates/pending_transaction/index.html.eex:73
#: lib/explorer_web/templates/transaction/index.html.eex:90
#: lib/explorer_web/templates/pending_transaction/index.html.eex:52
#: lib/explorer_web/templates/transaction/index.html.eex:55
msgid "Older"
msgstr ""
@ -523,7 +510,6 @@ msgid "Newer"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/pending_transaction/index.html.eex:59
#: lib/explorer_web/templates/transaction/overview.html.eex:109
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:47
#: lib/explorer_web/views/transaction_view.ex:111
@ -568,6 +554,7 @@ msgstr ""
#, elixir-format
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:31
#: lib/explorer_web/templates/chain/_transactions.html.eex:23
#: lib/explorer_web/templates/transaction/index.html.eex:46
msgid "Block #"
msgstr ""
@ -636,3 +623,13 @@ msgstr ""
#: lib/explorer_web/templates/address_transaction/index.html.eex:131
msgid "There are no transactions for this address."
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/pending_transaction/index.html.eex:42
msgid "Contract Address Pending"
msgstr ""
#, elixir-format
#: lib/explorer_web/views/transaction_view.ex:112
msgid "Contract Call"
msgstr ""

@ -12,13 +12,11 @@ msgstr ""
#: lib/explorer_web/templates/block/index.html.eex:18
#: lib/explorer_web/templates/block_transaction/index.html.eex:141
#: lib/explorer_web/templates/transaction/index.html.eex:37
#: lib/explorer_web/templates/transaction/overview.html.eex:51
msgid "Age"
msgstr "Age"
#: lib/explorer_web/templates/block_transaction/index.html.eex:140
#: lib/explorer_web/templates/transaction/index.html.eex:36
msgid "Block"
msgstr "Block"
@ -40,8 +38,6 @@ msgstr "Gas Used"
#: lib/explorer_web/templates/block_transaction/index.html.eex:30
#: lib/explorer_web/templates/block_transaction/index.html.eex:139
#: lib/explorer_web/templates/pending_transaction/index.html.eex:35
#: lib/explorer_web/templates/transaction/index.html.eex:35
msgid "Hash"
msgstr "Hash"
@ -64,12 +60,12 @@ msgstr "POA Network Explorer"
#: lib/explorer_web/templates/block_transaction/index.html.eex:124
#: lib/explorer_web/templates/chain/_transactions.html.eex:4
#: lib/explorer_web/templates/layout/_topnav.html.eex:18
#: lib/explorer_web/templates/pending_transaction/index.html.eex:24
#: lib/explorer_web/templates/transaction/index.html.eex:24
msgid "Transactions"
msgstr "Transactions"
#: lib/explorer_web/templates/block_transaction/index.html.eex:145
#: lib/explorer_web/templates/pending_transaction/index.html.eex:39
#: lib/explorer_web/templates/transaction/index.html.eex:40
#: lib/explorer_web/templates/transaction/overview.html.eex:63
#: lib/explorer_web/templates/transaction/overview.html.eex:71
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:33
@ -161,8 +157,6 @@ msgstr "Address"
#: lib/explorer_web/templates/address_internal_transaction/index.html.eex:98
#: lib/explorer_web/templates/address_transaction/index.html.eex:109
#: lib/explorer_web/templates/block_transaction/index.html.eex:142
#: lib/explorer_web/templates/pending_transaction/index.html.eex:37
#: lib/explorer_web/templates/transaction/index.html.eex:38
#: lib/explorer_web/templates/transaction/overview.html.eex:79
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:31
#: lib/explorer_web/views/address_internal_transaction_view.ex:9
@ -182,8 +176,6 @@ msgstr "Success"
#: lib/explorer_web/templates/address_internal_transaction/index.html.eex:86
#: lib/explorer_web/templates/address_transaction/index.html.eex:97
#: lib/explorer_web/templates/block_transaction/index.html.eex:144
#: lib/explorer_web/templates/pending_transaction/index.html.eex:38
#: lib/explorer_web/templates/transaction/index.html.eex:39
#: lib/explorer_web/templates/transaction/overview.html.eex:91
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:32
#: lib/explorer_web/views/address_internal_transaction_view.ex:8
@ -227,8 +219,8 @@ msgstr "Showing #%{start_block} to #%{end_block}"
msgid "Showing %{count} Transactions"
msgstr "Showing %{count} Transactions"
#: lib/explorer_web/templates/pending_transaction/index.html.eex:21
#: lib/explorer_web/templates/transaction/index.html.eex:21
#: lib/explorer_web/templates/pending_transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/overview.html.eex:57
#: lib/explorer_web/views/transaction_view.ex:38
#: lib/explorer_web/views/transaction_view.ex:69
@ -239,7 +231,6 @@ msgstr "Pending"
msgid "First Seen"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:36
#: lib/explorer_web/templates/transaction/overview.html.eex:136
msgid "Last Seen"
msgstr ""
@ -249,7 +240,7 @@ msgstr ""
msgid "Logs"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:6
#: lib/explorer_web/templates/pending_transaction/index.html.eex:25
msgid "Showing %{count} Pending Transactions"
msgstr ""
@ -302,8 +293,6 @@ msgid "Out of Gas"
msgstr ""
#: lib/explorer_web/templates/block_transaction/index.html.eex:137
#: lib/explorer_web/templates/pending_transaction/index.html.eex:33
#: lib/explorer_web/templates/transaction/index.html.eex:34
msgid "Status"
msgstr ""
@ -316,8 +305,6 @@ msgid "Showing #%{number}"
msgstr ""
#: lib/explorer_web/templates/address/_values.html.eex:4
#: lib/explorer_web/templates/pending_transaction/index.html.eex:39
#: lib/explorer_web/templates/transaction/index.html.eex:40
#: lib/explorer_web/templates/transaction/overview.html.eex:63
#: lib/explorer_web/templates/transaction/overview.html.eex:159
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:33
@ -384,8 +371,8 @@ msgstr ""
msgid "Fee"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/index.html.eex:14
#: lib/explorer_web/templates/pending_transaction/index.html.eex:7
#: lib/explorer_web/templates/transaction/index.html.eex:7
msgid "Validated"
msgstr ""
@ -428,7 +415,7 @@ msgstr ""
msgid "Dashboard"
msgstr ""
#: lib/explorer_web/templates/transaction/index.html.eex:6
#: lib/explorer_web/templates/transaction/index.html.eex:25
msgid "Showing %{count} Validated Transactions"
msgstr ""
@ -495,8 +482,8 @@ msgstr ""
#: lib/explorer_web/templates/address_transaction/index.html.eex:138
#: lib/explorer_web/templates/block/index.html.eex:60
#: lib/explorer_web/templates/block_transaction/index.html.eex:198
#: lib/explorer_web/templates/pending_transaction/index.html.eex:73
#: lib/explorer_web/templates/transaction/index.html.eex:90
#: lib/explorer_web/templates/pending_transaction/index.html.eex:52
#: lib/explorer_web/templates/transaction/index.html.eex:55
msgid "Older"
msgstr ""
@ -535,7 +522,6 @@ msgid "Newer"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/pending_transaction/index.html.eex:59
#: lib/explorer_web/templates/transaction/overview.html.eex:109
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:47
#: lib/explorer_web/views/transaction_view.ex:111
@ -580,6 +566,7 @@ msgstr ""
#, elixir-format
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:31
#: lib/explorer_web/templates/chain/_transactions.html.eex:23
#: lib/explorer_web/templates/transaction/index.html.eex:46
msgid "Block #"
msgstr ""
@ -613,7 +600,7 @@ msgstr ""
msgid "block confirmations"
msgstr ""
#, elixir-format, fuzzy
#, elixir-format
#: lib/explorer_web/templates/address_transaction/index.html.eex:81
msgid "Connection Lost, click to load newer transactions"
msgstr ""
@ -629,7 +616,7 @@ msgstr ""
msgid "Internal Transaction"
msgstr ""
#, elixir-format, fuzzy
#, elixir-format
#: lib/explorer_web/templates/address_transaction/index.html.eex:76
msgid "More messages have come in"
msgstr ""
@ -648,3 +635,13 @@ msgstr ""
#: lib/explorer_web/templates/address_transaction/index.html.eex:131
msgid "There are no transactions for this address."
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/pending_transaction/index.html.eex:42
msgid "Contract Address Pending"
msgstr ""
#, elixir-format
#: lib/explorer_web/views/transaction_view.ex:112
msgid "Contract Call"
msgstr ""

@ -5,7 +5,7 @@ defmodule ExplorerWeb.TransactionListPage do
import Wallaby.Query, only: [css: 1, css: 2]
alias Explorer.Chain.{InternalTransaction, Transaction}
alias Explorer.Chain.Transaction
def click_transaction(session, %Transaction{hash: transaction_hash}) do
click(session, css("[data-transaction-hash='#{transaction_hash}'] [data-test='transaction_hash_link']"))
@ -15,8 +15,8 @@ defmodule ExplorerWeb.TransactionListPage do
click(session, css("[data-test='pending_transactions_link']"))
end
def contract_creation(%InternalTransaction{created_contract_address_hash: hash}) do
css("[data-address-hash='#{hash}']", text: "Contract Creation")
def contract_creation(%Transaction{hash: hash}) do
css("[data-transaction-hash='#{hash}'] [data-test='transaction_type']", text: "Contract Creation")
end
def transaction(%Transaction{hash: transaction_hash}) do

@ -111,11 +111,11 @@ defmodule ExplorerWeb.ViewingTransactionsTest do
|> insert(to_address: nil)
|> with_block()
internal_transaction = insert(:internal_transaction_create, transaction: transaction, index: 0)
insert(:internal_transaction_create, transaction: transaction, index: 0)
session
|> TransactionListPage.visit_page()
|> assert_has(TransactionListPage.contract_creation(internal_transaction))
|> assert_has(TransactionListPage.contract_creation(transaction))
end
end

Loading…
Cancel
Save