@ -5,7 +5,7 @@ defmodule BlockScoutWeb.AddressTransactionController do
use BlockScoutWeb , :controller
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 ]
import BlockScoutWeb.Chain , only : [ current_filter : 1 , paging_options : 1 , next_page_params : 3 , split_list_by_page : 1 ]
alias BlockScoutWeb.TransactionView
alias BlockScoutWeb.TransactionView
@ -96,6 +96,8 @@ defmodule BlockScoutWeb.AddressTransactionController do
def index ( conn , %{ " address_id " = > address_hash_string } = params ) do
def index ( conn , %{ " address_id " = > address_hash_string } = params ) do
with { :ok , address_hash } <- Chain . string_to_address_hash ( address_hash_string ) ,
with { :ok , address_hash } <- Chain . string_to_address_hash ( address_hash_string ) ,
{ :ok , address } <- Chain . hash_to_address ( address_hash ) do
{ :ok , address } <- Chain . hash_to_address ( address_hash ) do
{ transaction_count , validation_count } = transaction_and_validation_count ( address_hash )
render (
render (
conn ,
conn ,
" index.html " ,
" index.html " ,
@ -103,8 +105,8 @@ defmodule BlockScoutWeb.AddressTransactionController do
coin_balance_status : CoinBalanceOnDemand . trigger_fetch ( address ) ,
coin_balance_status : CoinBalanceOnDemand . trigger_fetch ( address ) ,
exchange_rate : Market . get_exchange_rate ( Explorer . coin ( ) ) || Token . null ( ) ,
exchange_rate : Market . get_exchange_rate ( Explorer . coin ( ) ) || Token . null ( ) ,
filter : params [ " filter " ] ,
filter : params [ " filter " ] ,
transaction_count : transaction_count ( address_hash ) ,
transaction_count : transaction_count ,
validation_count : validation_count ( address_hash ) ,
validation_count : validation_count ,
current_path : current_path ( conn )
current_path : current_path ( conn )
)
)
else
else