From 728b8d82d549c1e539b128452f3959946f5a35bf Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Fri, 13 May 2022 03:12:51 +0300 Subject: [PATCH] Add @current_user to TransactionController --- .../lib/block_scout_web/controllers/transaction_controller.ex | 2 ++ .../lib/block_scout_web/templates/transaction/overview.html.eex | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex index e476b8f808..fbdcdea49f 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex @@ -164,6 +164,7 @@ defmodule BlockScoutWeb.TransactionController do exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), block_height: Chain.block_height(), current_path: Controller.current_full_path(conn), + current_user: current_user(conn), show_token_transfers: true, transaction: transaction, from_tags: get_address_tags(transaction.from_address_hash, current_user(conn)), @@ -200,6 +201,7 @@ defmodule BlockScoutWeb.TransactionController do "show_internal_transactions.html", exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), current_path: Controller.current_full_path(conn), + current_user: current_user(conn), block_height: Chain.block_height(), show_token_transfers: Chain.transaction_has_token_transfers?(transaction_hash), transaction: transaction, diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index 96eb5f5ad2..76ad01c728 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -206,7 +206,6 @@ clipboard_text: from_address_hash, aria_label: gettext("Copy From Address"), title: gettext("Copy From Address") %> - <%= render BlockScoutWeb.AddressView, "_labels.html", tags: @from_tags %>