Skip to content

Commit

Permalink
Don't return token_balances upon insertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkachowski committed Feb 7, 2024
1 parent f4ae5d4 commit 3e27da0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ defmodule Explorer.Chain.Import.Runner.Address.TokenBalances do
end)
|> Enum.sort_by(&{&1.token_contract_address_hash, &1.token_id, &1.address_hash, &1.block_number})

{:ok, inserted_changes_list} =
{:ok, _inserted_changes_list} =
if Enum.count(ordered_changes_list) > 0 do
Import.insert_changes_list(
repo,
Expand All @@ -95,15 +95,15 @@ defmodule Explorer.Chain.Import.Runner.Address.TokenBalances do
{:unsafe_fragment, ~s<(address_hash, token_contract_address_hash, COALESCE(token_id, -1), block_number)>},
on_conflict: on_conflict,
for: TokenBalance,
returning: true,
returning: false
timeout: timeout,
timestamps: timestamps
)
else
{:ok, []}
end

{:ok, inserted_changes_list}
{:ok, []}
end

defp default_on_conflict do
Expand Down

0 comments on commit 3e27da0

Please sign in to comment.