fix cr issues

pull/2432/head
Ayrat Badykov 5 years ago
parent 1465f6d2fc
commit 8f92a1f720
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 6
      apps/block_scout_web/lib/block_scout_web/controllers/recent_transactions_controller.ex
  2. 7
      apps/indexer/lib/indexer/fetcher/internal_transaction.ex

@ -6,8 +6,7 @@ defmodule BlockScoutWeb.RecentTransactionsController do
alias Phoenix.View alias Phoenix.View
def index(conn, _params) do def index(conn, _params) do
case ajax?(conn) do if ajax?(conn) do
true ->
recent_transactions = recent_transactions =
Chain.recent_collated_transactions( Chain.recent_collated_transactions(
necessity_by_association: %{ necessity_by_association: %{
@ -29,8 +28,7 @@ defmodule BlockScoutWeb.RecentTransactionsController do
end) end)
json(conn, %{transactions: transactions}) json(conn, %{transactions: transactions})
else
_ ->
unprocessable_entity(conn) unprocessable_entity(conn)
end end
end end

@ -205,7 +205,8 @@ defmodule Indexer.Fetcher.InternalTransaction do
{hash, block_number} {hash, block_number}
end) end)
case Chain.import(%{ imports =
Chain.import(%{
addresses: %{params: addresses_params}, addresses: %{params: addresses_params},
internal_transactions: %{params: internal_transactions_params_without_failed_creations}, internal_transactions: %{params: internal_transactions_params_without_failed_creations},
internal_transactions_indexed_at_blocks: %{ internal_transactions_indexed_at_blocks: %{
@ -213,7 +214,9 @@ defmodule Indexer.Fetcher.InternalTransaction do
with: :number_only_changeset with: :number_only_changeset
}, },
timeout: :infinity timeout: :infinity
}) do })
case imports do
{:ok, imported} -> {:ok, imported} ->
async_import_coin_balances(imported, %{ async_import_coin_balances(imported, %{
address_hash_to_fetched_balance_block_number: address_hash_to_block_number address_hash_to_fetched_balance_block_number: address_hash_to_block_number

Loading…
Cancel
Save