|
|
|
@ -5,7 +5,7 @@ defmodule BlockScoutWeb.AddressInternalTransactionController do |
|
|
|
|
|
|
|
|
|
use BlockScoutWeb, :controller |
|
|
|
|
|
|
|
|
|
import BlockScoutWeb.AddressController, only: [transaction_count: 1, validation_count: 1] |
|
|
|
|
import BlockScoutWeb.AddressController, only: [transaction_and_validation_count: 1] |
|
|
|
|
import BlockScoutWeb.Chain, only: [current_filter: 1, paging_options: 1, next_page_params: 3, split_list_by_page: 1] |
|
|
|
|
|
|
|
|
|
alias BlockScoutWeb.InternalTransactionView |
|
|
|
@ -63,6 +63,8 @@ defmodule BlockScoutWeb.AddressInternalTransactionController do |
|
|
|
|
def index(conn, %{"address_id" => address_hash_string} = params) do |
|
|
|
|
with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), |
|
|
|
|
{:ok, address} <- Chain.hash_to_address(address_hash) do |
|
|
|
|
{transaction_count, validation_count} = transaction_and_validation_count(address_hash) |
|
|
|
|
|
|
|
|
|
render( |
|
|
|
|
conn, |
|
|
|
|
"index.html", |
|
|
|
@ -71,8 +73,8 @@ defmodule BlockScoutWeb.AddressInternalTransactionController do |
|
|
|
|
current_path: current_path(conn), |
|
|
|
|
exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), |
|
|
|
|
filter: params["filter"], |
|
|
|
|
transaction_count: transaction_count(address_hash), |
|
|
|
|
validation_count: validation_count(address_hash) |
|
|
|
|
transaction_count: transaction_count, |
|
|
|
|
validation_count: validation_count |
|
|
|
|
) |
|
|
|
|
else |
|
|
|
|
:error -> |
|
|
|
|