diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token/_tokens.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token/_tokens.html.eex index c974ff549a..5296512291 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token/_tokens.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token/_tokens.html.eex @@ -2,7 +2,7 @@
<%= link( - to: address_token_transfers_path(@conn, :index, @address.hash, @token.contract_address_hash), + to: address_token_transfers_path(@conn, :index, to_string(@address.hash), to_string(@token.contract_address_hash)), class: "tile-title-lg", "data-test": "token_transfers_#{@token.contract_address_hash}" ) do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex index 1366a83a0a..0fa96e73bd 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex @@ -11,7 +11,7 @@ data-token-symbol="<%= token_balance.token.symbol %>" > <%= link( - to: token_path(@conn, :show, token_balance.token.contract_address_hash), + to: token_path(@conn, :show, to_string(token_balance.token.contract_address_hash)), class: "dropdown-item" ) do %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/_token.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/_token.html.eex index f4e70f59ac..a905f72de9 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/_token.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/_token.html.eex @@ -10,7 +10,7 @@ <%= gettext "Token ID" %>: - <%= link(@token_transfer.token_id, to: token_instance_path(@conn, :show, @token.contract_address_hash, to_string(@token_transfer.token_id))) %> + <%= link(@token_transfer.token_id, to: token_instance_path(@conn, :show, "#{@token.contract_address_hash}", "#{@token_transfer.token_id}")) %> diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_token_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_token_controller_test.exs index 16df97b9fc..b1697e32a6 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_token_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_token_controller_test.exs @@ -57,7 +57,7 @@ defmodule BlockScoutWeb.AddressTokenControllerTest do to_address: address ) - conn = get(conn, address_token_path(conn, :index, address), type: "JSON") + conn = get(conn, address_token_path(conn, :index, to_string(address.hash)), type: "JSON") {:ok, %{"items" => items}} = conn.resp_body @@ -99,7 +99,7 @@ defmodule BlockScoutWeb.AddressTokenControllerTest do %Token{name: name, type: type, inserted_at: inserted_at} = token conn = - get(conn, address_token_path(BlockScoutWeb.Endpoint, :index, address.hash), %{ + get(conn, address_token_path(BlockScoutWeb.Endpoint, :index, to_string(address.hash)), %{ "token_name" => name, "token_type" => type, "token_inserted_at" => inserted_at, @@ -131,7 +131,7 @@ defmodule BlockScoutWeb.AddressTokenControllerTest do insert(:token_transfer, token_contract_address: token.contract_address, from_address: address) end) - conn = get(conn, address_token_path(BlockScoutWeb.Endpoint, :index, address.hash), type: "JSON") + conn = get(conn, address_token_path(BlockScoutWeb.Endpoint, :index, to_string(address.hash)), type: "JSON") {:ok, %{"next_page_path" => next_page_path}} = conn.resp_body diff --git a/apps/block_scout_web/test/block_scout_web/features/viewing_addresses_test.exs b/apps/block_scout_web/test/block_scout_web/features/viewing_addresses_test.exs index bb223077a2..61edb22a7c 100644 --- a/apps/block_scout_web/test/block_scout_web/features/viewing_addresses_test.exs +++ b/apps/block_scout_web/test/block_scout_web/features/viewing_addresses_test.exs @@ -336,37 +336,6 @@ defmodule BlockScoutWeb.ViewingAddressesTest do |> refute_has(AddressPage.token_transfer(transaction, taft, count: 1)) end - test "transactions with multiple token transfers shows only the first one by default", %{ - addresses: addresses, - block: block, - session: session - } do - lincoln = addresses.lincoln - taft = addresses.taft - - contract_address = insert(:contract_address) - - insert(:token, contract_address: contract_address) - - transaction = - :transaction - |> insert(from_address: lincoln, to_address: contract_address) - |> with_block(block) - - insert_list( - 3, - :token_transfer, - from_address: lincoln, - to_address: taft, - transaction: transaction, - token_contract_address: contract_address - ) - - session - |> AddressPage.visit_page(lincoln) - |> assert_has(AddressPage.token_transfers(transaction, count: 1)) - end - test "transaction with multiple token transfers shows all transfers if expanded", %{ addresses: addresses, block: block,