remove token transfers from transactions tab

pull/2825/head
Ayrat Badykov 5 years ago
parent 6aea425975
commit e4b5a0bd18
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 4
      apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex
  2. 1
      apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex
  3. 1
      apps/explorer/lib/explorer/chain.ex

@ -19,10 +19,6 @@ defmodule BlockScoutWeb.AddressTransactionController do
[created_contract_address: :names] => :optional, [created_contract_address: :names] => :optional,
[from_address: :names] => :optional, [from_address: :names] => :optional,
[to_address: :names] => :optional, [to_address: :names] => :optional,
[token_transfers: :token] => :optional,
[token_transfers: :to_address] => :optional,
[token_transfers: :from_address] => :optional,
[token_transfers: :token_contract_address] => :optional,
:block => :required :block => :required
} }
] ]

@ -230,6 +230,7 @@ defmodule BlockScoutWeb.TransactionView do
def involves_token_transfers?(%Transaction{token_transfers: []}), do: false def involves_token_transfers?(%Transaction{token_transfers: []}), do: false
def involves_token_transfers?(%Transaction{token_transfers: transfers}) when is_list(transfers), do: true def involves_token_transfers?(%Transaction{token_transfers: transfers}) when is_list(transfers), do: true
def involves_token_transfers?(_), do: false
def qr_code(%Transaction{hash: hash}) do def qr_code(%Transaction{hash: hash}) do
hash hash

@ -312,7 +312,6 @@ defmodule Explorer.Chain do
paging_options paging_options
|> fetch_transactions() |> fetch_transactions()
|> join_associations(necessity_by_association) |> join_associations(necessity_by_association)
|> Transaction.preload_token_transfers(address_hash)
base_query base_query
|> Transaction.matching_address_queries_list(direction, address_hash) |> Transaction.matching_address_queries_list(direction, address_hash)

Loading…
Cancel
Save