diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_controller_test.exs index 6153aa6895..c3bce3be95 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_controller_test.exs @@ -3,6 +3,7 @@ defmodule BlockScoutWeb.AddressControllerTest do # ETS tables are shared in `Explorer.Counters.*` async: false + alias Explorer.Chain.Address alias Explorer.Counters.AddressesCounter describe "GET index/2" do @@ -50,7 +51,7 @@ defmodule BlockScoutWeb.AddressControllerTest do test "returns address counters" do address = insert(:address) - conn = get(conn, "/address_counters", %{"id" => to_string(address.hash)}) + conn = get(conn, "/address_counters", %{"id" => Address.checksum(address.hash)}) assert conn.status == 200 {:ok, response} = Jason.decode(conn.resp_body) diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_token_transfer_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_token_transfer_controller_test.exs index cf4c859ce2..dcd40ec9b3 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_token_transfer_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_token_transfer_controller_test.exs @@ -122,7 +122,7 @@ defmodule BlockScoutWeb.AddressTokenTransferControllerTest do conn = get( conn, - address_token_transfers_path(conn, :index, address.hash, token.contract_address_hash), + address_token_transfers_path(conn, :index, Address.checksum(address.hash), token.contract_address_hash), %{type: "JSON"} ) @@ -213,7 +213,7 @@ defmodule BlockScoutWeb.AddressTokenTransferControllerTest do %Token{contract_address_hash: token_hash} = insert(:token) conn = - get(conn, address_token_transfers_path(conn, :index, Address.checksum(address_hash), token_hash), %{ + get(conn, address_token_transfers_path(conn, :index, Address.checksum(address_hash), Address.checksum(token_hash)), %{ type: "JSON" }) @@ -225,7 +225,7 @@ defmodule BlockScoutWeb.AddressTokenTransferControllerTest do token_hash = "0x8bf38d4764929064f2d4d3a56520a76ab3df415b" conn = - get(conn, address_token_transfers_path(conn, :index, address_hash, token_hash), %{ + get(conn, address_token_transfers_path(conn, :index, Address.checksum(address_hash), Address.checksum(token_hash)), %{ type: "JSON" })