Explicit message on token balance update error (#10129)

pull/10132/head
Victor Baranov 6 months ago committed by GitHub
parent f0f83d23d1
commit 67a966833d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      apps/indexer/lib/indexer/fetcher/on_demand/token_balance.ex

@ -194,8 +194,14 @@ defmodule Indexer.Fetcher.OnDemand.TokenBalance do
|> Map.put(:value_fetched_at, DateTime.utc_now())
end
defp prepare_updated_balance({{:error, error}, _ctb}, _block_number) do
Logger.warn(fn -> ["Error on updating current token balance: ", inspect(error)] end)
defp prepare_updated_balance({{:error, error}, ctb}, block_number) do
Logger.warn(fn ->
[
"Error on updating current token #{to_string(ctb.token_contract_address_hash)} balance for address #{to_string(ctb.address_hash)} at block number #{block_number}: ",
inspect(error)
]
end)
nil
end

Loading…
Cancel
Save