From e4b5a0bd18b972a3bd7baac29e697718b051f822 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Wed, 6 Nov 2019 12:54:14 +0300 Subject: [PATCH] remove token transfers from transactions tab --- .../controllers/address_transaction_controller.ex | 4 ---- .../lib/block_scout_web/views/transaction_view.ex | 1 + apps/explorer/lib/explorer/chain.ex | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex index b79800a464..2bac5acdb2 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex @@ -19,10 +19,6 @@ defmodule BlockScoutWeb.AddressTransactionController do [created_contract_address: :names] => :optional, [from_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 } ] diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex index 121bd6ad5e..ede96a048d 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex @@ -230,6 +230,7 @@ defmodule BlockScoutWeb.TransactionView do 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?(_), do: false def qr_code(%Transaction{hash: hash}) do hash diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 77d7066757..4ed62f0fe7 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -312,7 +312,6 @@ defmodule Explorer.Chain do paging_options |> fetch_transactions() |> join_associations(necessity_by_association) - |> Transaction.preload_token_transfers(address_hash) base_query |> Transaction.matching_address_queries_list(direction, address_hash)