Skip to content

Commit

Permalink
fix: Resolve flaky address_controller test for web
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaranov committed Jun 6, 2024
1 parent b5780d3 commit d9586c2
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ defmodule BlockScoutWeb.API.V2.AddressControllerTest do
tx_hash = to_string(tx.hash)
address_hash = Address.checksum(proxy_address.hash)

{:ok, implementation_contract_address_hash} =
Chain.string_to_address_hash("0x" <> implementation_contract_address_hash_string)

checksummed_implementation_contract_address_hash = Address.checksum(implementation_contract_address_hash)

insert(:proxy_implementation,
proxy_address_hash: proxy_address.hash,
proxy_type: "eip1167",
Expand All @@ -177,9 +182,9 @@ defmodule BlockScoutWeb.API.V2.AddressControllerTest do
"watchlist_names" => [],
"creator_address_hash" => ^from,
"creation_tx_hash" => ^tx_hash,
"implementation_address" => "0x" <> ^implementation_contract_address_hash_string,
"implementation_address" => ^checksummed_implementation_contract_address_hash,
"implementations" => [
%{"address" => "0x" <> ^implementation_contract_address_hash_string, "name" => ^name}
%{"address" => ^checksummed_implementation_contract_address_hash, "name" => ^name}
]
} = json_response(request, 200)
end
Expand Down

0 comments on commit d9586c2

Please sign in to comment.