Structure pending transaction query

pull/3/head
Doc Ritezel 7 years ago committed by GitHub
parent 4dcd5751ed
commit 5c2131bfe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      lib/explorer_web/controllers/pending_transaction_controller.ex

@ -23,12 +23,15 @@ defmodule ExplorerWeb.PendingTransactionController do
order_by: [desc: transaction.inserted_at], order_by: [desc: transaction.inserted_at],
where: is_nil(block_transaction.transaction_id) where: is_nil(block_transaction.transaction_id)
transactions = transactions = query |> Repo.paginate(params)
query
|> Repo.paginate(params)
|> Map.put(:entries, transactions.entries
|> Enum.map(&TransactionForm.build/1))
render(conn, "index.html", transactions: transactions) render(
conn,
"index.html",
transactions:
transactions
|> Map.put(:entries, transactions.entries
|> Enum.map(&TransactionForm.build/1))
)
end end
end end

Loading…
Cancel
Save