Skip to content

Commit

Permalink
feat: nft name out-of-length tag max 60 characters
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid committed Jul 31, 2024
1 parent f350a59 commit 55d1876
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/workers/token_collection_tag_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def invisible_char?(name)
end

def out_of_length?(name)
name.length > 255
name.length > 60
end

def first_token_collection?(name, block_timestamp, standard)
Expand Down
2 changes: 1 addition & 1 deletion test/workers/token_collection_tag_worker_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TokenCollectionTagWorkerTest < ActiveJob::TestCase
end

test "add out-of-length-range tag to token_collection" do
create(:token_collection, name: "C" * 256, cell_id: @cell.id, creator_id: @address.id)
create(:token_collection, name: "C" * 66, cell_id: @cell.id, creator_id: @address.id)
TokenCollectionTagWorker.new.perform
assert_equal ["out-of-length-range"], TokenCollection.last.tags
end
Expand Down

0 comments on commit 55d1876

Please sign in to comment.