From 9bc618ec957b536a6ac23668f940af3d5fd2b750 Mon Sep 17 00:00:00 2001 From: NanZhang Date: Fri, 22 Sep 2023 12:26:39 +0800 Subject: [PATCH] Fix/sync spore udt info (#1460) fix: sync spore udt info error Co-authored-by: Chen Yu Co-authored-by: Miles Zhang --- app/utils/ckb_utils.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/utils/ckb_utils.rb b/app/utils/ckb_utils.rb index 2423c75e5..f0d63ad4d 100644 --- a/app/utils/ckb_utils.rb +++ b/app/utils/ckb_utils.rb @@ -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 }