Skip to content

Commit

Permalink
Fix/sync spore udt info (#1460)
Browse files Browse the repository at this point in the history
fix: sync spore udt info error

Co-authored-by: Chen Yu <[email protected]>
Co-authored-by: Miles Zhang <[email protected]>
  • Loading branch information
3 people authored Sep 22, 2023
1 parent baf0d35 commit 9bc618e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/utils/ckb_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ def self.parse_spore_cluster_data(hex_data)
description_offset = [data.slice(16, 8)].pack("H*").unpack1("l") * 2
name = [data.slice(name_offset + 8..description_offset - 1)].pack("H*")
description = [data.slice(description_offset + 8..-1)].pack("H*")
name = "#{name[0,97]}..." if name.length > 100
{ name: name, description: description }
rescue => _e
{ name: nil, description: nil }
Expand Down

0 comments on commit 9bc618e

Please sign in to comment.