From ac63f1bb291585663439c1892f83f4015e38f21e Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 20 Feb 2020 19:48:21 +0300 Subject: [PATCH] Fix filters functionality --- .../lib/block_scout_web/checksum_address.ex | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)