diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_internal_transaction_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_internal_transaction_controller_test.exs index 72d0f5d8b9..1239192f37 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_internal_transaction_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_internal_transaction_controller_test.exs @@ -104,7 +104,12 @@ defmodule BlockScoutWeb.AddressInternalTransactionControllerTest do transaction_index: transaction.index ) - path = address_internal_transaction_path(conn, :index, address, %{"filter" => "from", "type" => "JSON"}) + path = + address_internal_transaction_path(conn, :index, Address.checksum(address), %{ + "filter" => "from", + "type" => "JSON" + }) + conn = get(conn, path) internal_transaction_tiles = json_response(conn, 200)["items"] @@ -282,7 +287,7 @@ defmodule BlockScoutWeb.AddressInternalTransactionControllerTest do ) conn = - get(conn, address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, address.hash), %{ + get(conn, address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, Address.checksum(address.hash)), %{ "block_number" => Integer.to_string(b_block.number), "transaction_index" => Integer.to_string(transaction_3.index), "index" => Integer.to_string(index), @@ -322,10 +327,15 @@ defmodule BlockScoutWeb.AddressInternalTransactionControllerTest do end) conn = - get(conn, address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, address.hash, %{"type" => "JSON"})) + get( + conn, + address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, Address.checksum(address.hash), %{ + "type" => "JSON" + }) + ) expected_response = - address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, Address.checksum(address.hash), %{ + address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, address.hash, %{ "block_number" => number, "index" => 11, "transaction_index" => transaction_index diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_token_balance_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_token_balance_controller_test.exs index 355a32b515..cdafe886d5 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_token_balance_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_token_balance_controller_test.exs @@ -8,7 +8,7 @@ defmodule BlockScoutWeb.AddressTokenBalanceControllerTest do test "without AJAX", %{conn: conn} do %Address{hash: hash} = Factory.insert(:address) - response_conn = get(conn, address_token_balance_path(conn, :index, to_string(hash))) + response_conn = get(conn, address_token_balance_path(conn, :index, Address.checksum(hash))) assert html_response(response_conn, 404) end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/smart_contract_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/smart_contract_controller_test.exs index f59fb37203..5e4f723b75 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/smart_contract_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/smart_contract_controller_test.exs @@ -107,7 +107,7 @@ defmodule BlockScoutWeb.SmartContractControllerTest do smart_contract_path( BlockScoutWeb.Endpoint, :show, - smart_contract.address_hash, + Address.checksum(smart_contract.address_hash), function_name: "get", args: [] ) diff --git a/apps/block_scout_web/test/block_scout_web/features/pages/address_page.ex b/apps/block_scout_web/test/block_scout_web/features/pages/address_page.ex index c2f9596d5c..f4a1cc72eb 100644 --- a/apps/block_scout_web/test/block_scout_web/features/pages/address_page.ex +++ b/apps/block_scout_web/test/block_scout_web/features/pages/address_page.ex @@ -166,7 +166,7 @@ defmodule BlockScoutWeb.AddressPage do css("[data-identifier-hash='#{transaction_hash}'] [data-test='token_transfers_expansion']") end - def visit_page(session, %Address{hash: address_hash}), do: visit_page(session, address_hash) + def visit_page(session, %Address{hash: address_hash}), do: visit_page(session, Address.checksum(address_hash)) def visit_page(session, address_hash) do visit(session, "/address/#{Address.checksum(address_hash)}") diff --git a/apps/explorer/test/support/factory.ex b/apps/explorer/test/support/factory.ex index 8722598855..b2a1feeac6 100644 --- a/apps/explorer/test/support/factory.ex +++ b/apps/explorer/test/support/factory.ex @@ -72,7 +72,7 @@ defmodule Explorer.Factory do def contract_address_factory do %Address{ - hash: Address.checksum(address_hash()), + hash: address_hash(), contract_code: Map.fetch!(contract_code_info(), :bytecode) } end