From c875e781cac75a0f5f4a65f3c10a781b7da1a537 Mon Sep 17 00:00:00 2001 From: zhangnan Date: Fri, 22 Sep 2023 11:58:16 +0800 Subject: [PATCH] fix: sync spore udt info error --- 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 }