diff --git a/apps/indexer/lib/indexer/block/uncataloged_rewards/importer.ex b/apps/indexer/lib/indexer/block/uncataloged_rewards/importer.ex index 8c544f2837..5c98a9eaa3 100644 --- a/apps/indexer/lib/indexer/block/uncataloged_rewards/importer.ex +++ b/apps/indexer/lib/indexer/block/uncataloged_rewards/importer.ex @@ -100,7 +100,10 @@ defmodule Indexer.Block.UncatalogedRewards.Importer do defp insert_reward_group(rewards) do rewards |> Enum.reduce({Multi.new(), 0}, fn changeset, {multi, index} -> - {Multi.insert(multi, "insert_#{index}", changeset), index + 1} + {Multi.insert(multi, "insert_#{index}", changeset, + conflict_target: ~w(address_hash address_type block_hash), + on_conflict: {:replace, [:reward]} + ), index + 1} end) |> elem(0) |> Explorer.Repo.transaction()