|
|
|
@ -83,10 +83,12 @@ defmodule BlockScoutWeb.AddressTransactionController do |
|
|
|
|
unprocessable_entity(conn) |
|
|
|
|
|
|
|
|
|
{:error, :not_found} -> |
|
|
|
|
with {:ok, _} <- Chain.Hash.Address.validate(address_hash_string) do |
|
|
|
|
json(conn, %{items: [], next_page_path: ""}) |
|
|
|
|
else |
|
|
|
|
{:error, _} -> not_found(conn) |
|
|
|
|
case Chain.Hash.Address.validate(address_hash_string) do |
|
|
|
|
{:ok, _} -> |
|
|
|
|
json(conn, %{items: [], next_page_path: ""}) |
|
|
|
|
|
|
|
|
|
{:error, _} -> |
|
|
|
|
not_found(conn) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
@ -113,20 +115,22 @@ defmodule BlockScoutWeb.AddressTransactionController do |
|
|
|
|
{:ok, address_hash} = Chain.string_to_address_hash(address_hash_string) |
|
|
|
|
address = %Chain.Address{hash: address_hash, smart_contract: nil, token: nil} |
|
|
|
|
|
|
|
|
|
with {:ok, _} <- Chain.Hash.Address.validate(address_hash_string) do |
|
|
|
|
render( |
|
|
|
|
conn, |
|
|
|
|
"index.html", |
|
|
|
|
address: address, |
|
|
|
|
coin_balance_status: nil, |
|
|
|
|
exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), |
|
|
|
|
filter: params["filter"], |
|
|
|
|
transaction_count: 0, |
|
|
|
|
validation_count: 0, |
|
|
|
|
current_path: current_path(conn) |
|
|
|
|
) |
|
|
|
|
else |
|
|
|
|
{:error, _} -> not_found(conn) |
|
|
|
|
case Chain.Hash.Address.validate(address_hash_string) do |
|
|
|
|
{:ok, _} -> |
|
|
|
|
render( |
|
|
|
|
conn, |
|
|
|
|
"index.html", |
|
|
|
|
address: address, |
|
|
|
|
coin_balance_status: nil, |
|
|
|
|
exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), |
|
|
|
|
filter: params["filter"], |
|
|
|
|
transaction_count: 0, |
|
|
|
|
validation_count: 0, |
|
|
|
|
current_path: current_path(conn) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
{:error, _} -> |
|
|
|
|
not_found(conn) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|