Fix get_implementation_address_hash call

pull/6523/head
Никита Поздняков 2 years ago
parent e57c238f19
commit e3f9af22de
No known key found for this signature in database
GPG Key ID: F344106F9804FE5F
  1. 4
      apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex

@ -5,7 +5,7 @@ defmodule BlockScoutWeb.API.V2.AddressView do
alias BlockScoutWeb.API.V2.{ApiView, Helper, TokenView} alias BlockScoutWeb.API.V2.{ApiView, Helper, TokenView}
alias BlockScoutWeb.API.V2.Helper alias BlockScoutWeb.API.V2.Helper
alias Explorer.{Chain, Market} alias Explorer.{Chain, Market}
alias Explorer.Chain.Address alias Explorer.Chain.{Address, SmartContract}
alias Explorer.ExchangeRates.Token alias Explorer.ExchangeRates.Token
def render("message.json", assigns) do def render("message.json", assigns) do
@ -38,7 +38,7 @@ defmodule BlockScoutWeb.API.V2.AddressView do
{implementation_address, implementation_name} = {implementation_address, implementation_name} =
with true <- is_proxy, with true <- is_proxy,
{address, name} <- Chain.get_implementation_address_hash(address.hash, address.smart_contract.abi), {address, name} <- SmartContract.get_implementation_address_hash(address.smart_contract),
false <- is_nil(address), false <- is_nil(address),
{:ok, address_hash} <- Chain.string_to_address_hash(address), {:ok, address_hash} <- Chain.string_to_address_hash(address),
checksummed_address <- Address.checksum(address_hash) do checksummed_address <- Address.checksum(address_hash) do

Loading…
Cancel
Save