diff --git a/CHANGELOG.md b/CHANGELOG.md index be6c7081e0..2f386f5024 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ### Fixes +- [#6390](https://github.com/blockscout/blockscout/pull/6390) - Fix transactions responses in API v2 - [#6357](https://github.com/blockscout/blockscout/pull/6357) - Fix definitions of NETWORK_PATH, API_PATH, SOCKET_ROOT: process trailing slash - [#6338](https://github.com/blockscout/blockscout/pull/6338) - Fix token search with space - [#6329](https://github.com/blockscout/blockscout/pull/6329) - Prevent logger from truncating response from rust verifier service in case of an error diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex index 8b6c48f5b8..dc1b9ef006 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex @@ -19,14 +19,14 @@ defmodule BlockScoutWeb.API.V2.TransactionView do ApiView.render("message.json", assigns) end - def render("transactions.json", %{transactions: transactions, conn: conn}) do - Enum.map(transactions, &prepare_transaction(&1, conn, false)) - end - def render("transactions.json", %{transactions: transactions, next_page_params: next_page_params, conn: conn}) do %{"items" => Enum.map(transactions, &prepare_transaction(&1, conn, false)), "next_page_params" => next_page_params} end + def render("transactions.json", %{transactions: transactions, conn: conn}) do + Enum.map(transactions, &prepare_transaction(&1, conn, false)) + end + def render("transaction.json", %{transaction: transaction, conn: conn}) do prepare_transaction(transaction, conn, true) end