fix count for a contract

pull/2787/head
Ayrat Badykov 5 years ago
parent b04a33e93e
commit 9fbf63f4a6
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 8
      apps/block_scout_web/lib/block_scout_web/controllers/address_controller.ex

@ -108,7 +108,13 @@ defmodule BlockScoutWeb.AddressController do
defp transaction_count(address) do defp transaction_count(address) do
if contract?(address) do if contract?(address) do
Chain.address_to_incoming_transaction_count(address.hash) incoming_transaction_count = Chain.address_to_incoming_transaction_count(address.hash)
if incoming_transaction_count == 0 do
Chain.total_transactions_sent_by_address(address.hash)
else
incoming_transaction_count
end
else else
Chain.total_transactions_sent_by_address(address.hash) Chain.total_transactions_sent_by_address(address.hash)
end end

Loading…
Cancel
Save