|
|
@ -1987,7 +1987,6 @@ defmodule Explorer.Chain do |
|
|
|
|> page_pending_transaction(paging_options) |
|
|
|
|> page_pending_transaction(paging_options) |
|
|
|
|> limit(^paging_options.page_size) |
|
|
|
|> limit(^paging_options.page_size) |
|
|
|
|> pending_transactions_query() |
|
|
|
|> pending_transactions_query() |
|
|
|
|> where([transaction], is_nil(transaction.error) or transaction.error != "dropped/replaced") |
|
|
|
|
|
|
|
|> order_by([transaction], desc: transaction.inserted_at, desc: transaction.hash) |
|
|
|
|> order_by([transaction], desc: transaction.inserted_at, desc: transaction.hash) |
|
|
|
|> join_associations(necessity_by_association) |
|
|
|
|> join_associations(necessity_by_association) |
|
|
|
|> preload([{:token_transfers, [:token, :from_address, :to_address]}]) |
|
|
|
|> preload([{:token_transfers, [:token, :from_address, :to_address]}]) |
|
|
@ -1996,7 +1995,7 @@ defmodule Explorer.Chain do |
|
|
|
|
|
|
|
|
|
|
|
defp pending_transactions_query(query) do |
|
|
|
defp pending_transactions_query(query) do |
|
|
|
from(transaction in query, |
|
|
|
from(transaction in query, |
|
|
|
where: is_nil(transaction.block_hash) |
|
|
|
where: is_nil(transaction.block_hash) and (is_nil(transaction.error) or transaction.error != "dropped/replaced") |
|
|
|
) |
|
|
|
) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|