From 4c7f0753314cba93685884d977157b4befa10b7c Mon Sep 17 00:00:00 2001 From: Rabbit Date: Thu, 17 Oct 2024 21:13:06 +0800 Subject: [PATCH] fix: update udt info (#2249) --- app/workers/update_udt_info_worker.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/workers/update_udt_info_worker.rb b/app/workers/update_udt_info_worker.rb index 60a4b9038..0b92e4402 100644 --- a/app/workers/update_udt_info_worker.rb +++ b/app/workers/update_udt_info_worker.rb @@ -7,13 +7,8 @@ def perform(block_number) return if local_block.blank? type_hashes = [] - local_block.cell_outputs.udt.select(:id, :type_hash).each do |udt_output| - type_hashes << udt_output.type_hash - end - local_block.cell_outputs.omiga_inscription.select(:id, :type_hash).each do |udt_output| - type_hashes << udt_output.type_hash - end - local_block.cell_outputs.xudt.select(:id, :type_hash).each do |udt_output| + local_block.cell_outputs.where(cell_type: ["udt", "omiga_inscription", "xudt", "xudt_compatible"]). + select(:id, :type_hash).each do |udt_output| type_hashes << udt_output.type_hash end local_block.ckb_transactions.pluck(:id).each do |tx_id|