File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,30 @@ def type_script
4343 }
4444 end
4545
46+ def icon_file
47+ raw = read_attribute ( :icon_file )
48+ if raw . nil?
49+ nil
50+ else
51+ domain1 = "oss.jinse.cc"
52+ domain2 = "goldenlegend.oss-cn-hangzhou.aliyuncs.com"
53+ regex = Regexp . new ( "#{ Regexp . escape ( domain1 ) } |#{ Regexp . escape ( domain2 ) } " )
54+
55+ raw . gsub ( regex , "https://images.nftbox.me/" )
56+ end
57+ end
58+
59+ # def icon_file
60+ # self[:icon_url]
61+ # # return self[:icon_url] if self[:icon_url].nil?
62+
63+ # # domain1 = "oss.jinse.cc"
64+ # # domain2 = "goldenlegend.oss-cn-hangzhou.aliyuncs.com"
65+ # # regex = Regexp.new("#{Regexp.escape(domain1)}|#{Regexp.escape(domain2)}")
66+
67+ # # self[:icon_url].gsub(regex, "https://images.nftbox.me/")
68+ # end
69+
4670 def holders_count
4771 udt_holder_allocations . sum ( "ckb_holder_count + btc_holder_count" )
4872 end
You can’t perform that action at this time.
0 commit comments