Fix transactions response

pull/6390/head
Никита Поздняков 2 years ago
parent b9566c1b0b
commit 6b18d64e56
No known key found for this signature in database
GPG Key ID: F344106F9804FE5F
  1. 1
      CHANGELOG.md
  2. 8
      apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex

@ -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

@ -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

Loading…
Cancel
Save