diff --git a/apps/block_scout_web/lib/block_scout_web/checksum_address.ex b/apps/block_scout_web/lib/block_scout_web/checksum_address.ex index 279affa0b9..d464ca73e3 100644 --- a/apps/block_scout_web/lib/block_scout_web/checksum_address.ex +++ b/apps/block_scout_web/lib/block_scout_web/checksum_address.ex @@ -31,7 +31,14 @@ defmodule BlockScoutWeb.ChecksumAddress do if checksummed_hash != id do conn = %{conn | params: Map.merge(conn.params, %{param_name => checksummed_hash})} - new_path = String.replace(conn.request_path, id, checksummed_hash) + path_with_checksummed_address = String.replace(conn.request_path, id, checksummed_hash) + + new_path = + if conn.query_string != "" do + path_with_checksummed_address <> "?" <> conn.query_string + else + path_with_checksummed_address + end conn |> Controller.redirect(to: new_path)