diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 89e7b8ac61..2257a48876 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -15,7 +15,7 @@ <%= gettext("Blocks") %> -
+ <%= gettext("Showing") %> + <%= Cldr.Number.to_string!(@pending_transaction_count, format: "#,###") %> + <%= gettext("Pending Transactions") %> +
-- <%= gettext("Showing") %> - <%= Cldr.Number.to_string!(@pending_transaction_count, format: "#,###") %> - <%= gettext("Pending Transactions") %> -
+ <%= for transaction <- @transactions do %> <%= render BlockScoutWeb.TransactionView, "_tile.html", transaction: transaction %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex index 1021b0b234..42aa38165f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex @@ -1,48 +1,14 @@+ <%= gettext("Showing") %> + <%= Cldr.Number.to_string!(@transaction_estimated_count, format: "#,###") %> + <%= gettext("Validated Transactions") %> +
-- <%= gettext("Showing") %> - <%= Cldr.Number.to_string!(@transaction_estimated_count, format: "#,###") %> - <%= gettext("Validated Transactions") %> -
+ <%= for transaction <- @transactions do %> <%= render BlockScoutWeb.TransactionView, "_tile.html", transaction: transaction %> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 3e010ddf08..59ea91f34b 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -84,7 +84,7 @@ msgid "A string with the name of the module to be invoked." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:51 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:64 msgid "API" msgstr "" @@ -99,7 +99,7 @@ msgid "API for the %{subnetwork} - BlockScout" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:43 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:56 msgid "Accounts" msgstr "" @@ -258,8 +258,8 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_transaction/index.html.eex:14 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:53 -#: lib/block_scout_web/templates/transaction/index.html.eex:53 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:19 +#: lib/block_scout_web/templates/transaction/index.html.eex:19 msgid "Connection Lost, click to load newer transactions" msgstr "" @@ -579,8 +579,8 @@ msgid "More internal transactions have come in" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:48 -#: lib/block_scout_web/templates/transaction/index.html.eex:48 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:14 +#: lib/block_scout_web/templates/transaction/index.html.eex:14 msgid "More transactions have come in" msgstr "" @@ -642,9 +642,9 @@ msgstr "" #: lib/block_scout_web/templates/address_validation/index.html.eex:117 #: lib/block_scout_web/templates/block/index.html.eex:20 #: lib/block_scout_web/templates/block_transaction/index.html.eex:50 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:70 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:31 #: lib/block_scout_web/templates/tokens/transfer/index.html.eex:34 -#: lib/block_scout_web/templates/transaction/index.html.eex:70 +#: lib/block_scout_web/templates/transaction/index.html.eex:31 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:24 msgid "Older" msgstr "" @@ -660,12 +660,12 @@ msgid "Owner Address" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:82 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:95 msgid "POA Core" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:81 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:94 msgid "POA Sokol" msgstr "" @@ -685,11 +685,7 @@ msgid "Parent Hash" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:16 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:27 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:35 -#: lib/block_scout_web/templates/transaction/index.html.eex:16 -#: lib/block_scout_web/templates/transaction/index.html.eex:35 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:44 #: lib/block_scout_web/templates/transaction/overview.html.eex:54 #: lib/block_scout_web/views/transaction_view.ex:57 #: lib/block_scout_web/views/transaction_view.ex:83 @@ -698,7 +694,8 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_transaction/index.html.eex:60 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:60 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:5 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:9 msgid "Pending Transactions" msgstr "" @@ -760,13 +757,13 @@ msgid "Responses" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:58 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:65 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:78 msgid "Search" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:58 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 msgid "Search by address, transaction hash, or block number" msgstr "" @@ -792,8 +789,8 @@ msgid "Show QR Code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:58 -#: lib/block_scout_web/templates/transaction/index.html.eex:58 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:7 +#: lib/block_scout_web/templates/transaction/index.html.eex:7 msgid "Showing" msgstr "" @@ -1004,8 +1001,6 @@ msgstr "" #: lib/block_scout_web/templates/block_transaction/index.html.eex:35 #: lib/block_scout_web/templates/chain/show.html.eex:71 #: lib/block_scout_web/templates/layout/_topnav.html.eex:35 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:56 -#: lib/block_scout_web/templates/transaction/index.html.eex:56 #: lib/block_scout_web/views/address_view.ex:208 msgid "Transactions" msgstr "" @@ -1048,16 +1043,13 @@ msgid "Used" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:9 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:30 -#: lib/block_scout_web/templates/transaction/index.html.eex:9 -#: lib/block_scout_web/templates/transaction/index.html.eex:27 -#: lib/block_scout_web/templates/transaction/index.html.eex:30 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:39 msgid "Validated" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/index.html.eex:60 +#: lib/block_scout_web/templates/transaction/index.html.eex:5 +#: lib/block_scout_web/templates/transaction/index.html.eex:9 msgid "Validated Transactions" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 2f34bc42a4..a99473cd84 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -84,7 +84,7 @@ msgid "A string with the name of the module to be invoked." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:51 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:64 msgid "API" msgstr "" @@ -99,7 +99,7 @@ msgid "API for the %{subnetwork} - BlockScout" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:43 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:56 msgid "Accounts" msgstr "" @@ -258,8 +258,8 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_transaction/index.html.eex:14 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:53 -#: lib/block_scout_web/templates/transaction/index.html.eex:53 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:19 +#: lib/block_scout_web/templates/transaction/index.html.eex:19 msgid "Connection Lost, click to load newer transactions" msgstr "" @@ -579,8 +579,8 @@ msgid "More internal transactions have come in" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:48 -#: lib/block_scout_web/templates/transaction/index.html.eex:48 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:14 +#: lib/block_scout_web/templates/transaction/index.html.eex:14 msgid "More transactions have come in" msgstr "" @@ -642,9 +642,9 @@ msgstr "" #: lib/block_scout_web/templates/address_validation/index.html.eex:117 #: lib/block_scout_web/templates/block/index.html.eex:20 #: lib/block_scout_web/templates/block_transaction/index.html.eex:50 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:70 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:31 #: lib/block_scout_web/templates/tokens/transfer/index.html.eex:34 -#: lib/block_scout_web/templates/transaction/index.html.eex:70 +#: lib/block_scout_web/templates/transaction/index.html.eex:31 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:24 msgid "Older" msgstr "" @@ -660,12 +660,12 @@ msgid "Owner Address" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:82 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:95 msgid "POA Core" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:81 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:94 msgid "POA Sokol" msgstr "" @@ -685,11 +685,7 @@ msgid "Parent Hash" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:16 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:27 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:35 -#: lib/block_scout_web/templates/transaction/index.html.eex:16 -#: lib/block_scout_web/templates/transaction/index.html.eex:35 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:44 #: lib/block_scout_web/templates/transaction/overview.html.eex:54 #: lib/block_scout_web/views/transaction_view.ex:57 #: lib/block_scout_web/views/transaction_view.ex:83 @@ -698,7 +694,8 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_transaction/index.html.eex:60 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:60 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:5 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:9 msgid "Pending Transactions" msgstr "" @@ -760,13 +757,13 @@ msgid "Responses" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:58 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:65 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:78 msgid "Search" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/layout/_topnav.html.eex:58 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 msgid "Search by address, transaction hash, or block number" msgstr "" @@ -792,8 +789,8 @@ msgid "Show QR Code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:58 -#: lib/block_scout_web/templates/transaction/index.html.eex:58 +#: lib/block_scout_web/templates/pending_transaction/index.html.eex:7 +#: lib/block_scout_web/templates/transaction/index.html.eex:7 msgid "Showing" msgstr "" @@ -1004,8 +1001,6 @@ msgstr "" #: lib/block_scout_web/templates/block_transaction/index.html.eex:35 #: lib/block_scout_web/templates/chain/show.html.eex:71 #: lib/block_scout_web/templates/layout/_topnav.html.eex:35 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:56 -#: lib/block_scout_web/templates/transaction/index.html.eex:56 #: lib/block_scout_web/views/address_view.ex:208 msgid "Transactions" msgstr "" @@ -1048,16 +1043,13 @@ msgid "Used" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:9 -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:30 -#: lib/block_scout_web/templates/transaction/index.html.eex:9 -#: lib/block_scout_web/templates/transaction/index.html.eex:27 -#: lib/block_scout_web/templates/transaction/index.html.eex:30 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:39 msgid "Validated" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/index.html.eex:60 +#: lib/block_scout_web/templates/transaction/index.html.eex:5 +#: lib/block_scout_web/templates/transaction/index.html.eex:9 msgid "Validated Transactions" msgstr "" diff --git a/apps/block_scout_web/test/block_scout_web/features/pages/transaction_list_page.ex b/apps/block_scout_web/test/block_scout_web/features/pages/transaction_list_page.ex index b3de0908ab..a2915bec1a 100644 --- a/apps/block_scout_web/test/block_scout_web/features/pages/transaction_list_page.ex +++ b/apps/block_scout_web/test/block_scout_web/features/pages/transaction_list_page.ex @@ -11,10 +11,6 @@ defmodule BlockScoutWeb.TransactionListPage do click(session, css("[data-transaction-hash='#{transaction_hash}'] [data-test='transaction_hash_link']")) end - def click_pending(session) do - click(session, css("[data-test='pending_transactions_link']")) - end - def contract_creation(%Transaction{hash: hash}) do css("[data-transaction-hash='#{hash}'] [data-test='transaction_type']", text: "Contract Creation") end @@ -30,4 +26,8 @@ defmodule BlockScoutWeb.TransactionListPage do def visit_page(session) do visit(session, "/txs") end + + def visit_pending_transactions_page(session) do + visit(session, "/pending_transactions") + end end diff --git a/apps/block_scout_web/test/block_scout_web/features/viewing_transactions_test.exs b/apps/block_scout_web/test/block_scout_web/features/viewing_transactions_test.exs index fc0fe78dee..db14b900d9 100644 --- a/apps/block_scout_web/test/block_scout_web/features/viewing_transactions_test.exs +++ b/apps/block_scout_web/test/block_scout_web/features/viewing_transactions_test.exs @@ -74,10 +74,13 @@ defmodule BlockScoutWeb.ViewingTransactionsTest do |> refute_has(TransactionListPage.transaction(pending)) end - test "viewing the pending tab", %{pending: pending, pending_contract: pending_contract, session: session} do + test "viewing the pending tranasctions list", %{ + pending: pending, + pending_contract: pending_contract, + session: session + } do session - |> TransactionListPage.visit_page() - |> TransactionListPage.click_pending() + |> TransactionListPage.visit_pending_transactions_page() |> assert_has(TransactionListPage.transaction(pending)) |> assert_has(TransactionListPage.transaction(pending_contract)) |> assert_has(TransactionListPage.transaction_status(pending_contract))