Skip to content

Commit

Permalink
Merge branch 'fix-spore-cluster-cell-query' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
zmcNotafraid committed Nov 10, 2024
2 parents a47bcbb + 3a1bf2c commit 5ad054a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/ckb_sync/new_node_data_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ def build_udts!(local_block, outputs, outputs_data)
binary_hashes = CkbUtils.hexes_to_bins_sql(CkbSync::Api.instance.spore_cluster_code_hashes)
spore_cluster_type_ids = TypeScript.where("code_hash IN (#{binary_hashes})").where(hash_type: "data1", args: parsed_spore_cell[:cluster_id]).pluck(:id)
if spore_cluster_type_ids.present?
spore_cluster_cell = CellOutput.live.where(type_script_id: spore_cluster_type_ids).last
spore_cluster_cell = CellOutput.where(type_script_id: spore_cluster_type_ids, status: %i[pending live]).last
parsed_cluster_data = CkbUtils.parse_spore_cluster_data(spore_cluster_cell.data)
nft_token_attr[:full_name] = parsed_cluster_data[:name]
end
Expand Down

0 comments on commit 5ad054a

Please sign in to comment.