Skip to content

Commit

Permalink
feat: token collection suspicious tag not include chinese
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid committed Aug 6, 2024
1 parent 8d73ecc commit ba832e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/workers/token_collection_tag_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def mark_tags(token_collection)
["suspicious"]
elsif out_of_length?(token_collection.name)
["out-of-length-range"]
elsif single_use_lock?(udt.issuer_address)
elsif single_use_lock?(token_collection.issuer_address)
["supply-limited"]
elsif rgbpp_lock?(token_collection.creator.address_hash)
["rgb++", "layer-1-asset"]
Expand All @@ -35,7 +35,7 @@ def invalid_char?(name)
end

def invisible_char?(name)
(name =~ /^[\x21-\x7E]+(?:\s[\x21-\x7E]+)?$/).nil?
(name =~ /^[\x21-\x7E\u4E00-\u9FFF]+(?:\s[\x21-\x7E\u4E00-\u9FFF]+)?$/).nil?
end

def out_of_length?(name)
Expand Down

0 comments on commit ba832e5

Please sign in to comment.