token-lists icon indicating copy to clipboard operation
token-lists copied to clipboard

Support for international chars

Open alexandrebini opened this issue 2 years ago • 1 comments

Hi there,

The pattern for validating the token's symbol does not support special chars today: https://github.com/Uniswap/token-lists/blob/245d0ab8daa157bc350dd9e47ee9550c457b5d80/src/tokenlist.schema.json#L241-L250

If you try to use 天津神 you will get a Token list failed validation: .tokens[1].symbol should match pattern "^[a-zA-Z0-9+\-%/$.]+$", but that's actually a valid symbol.

Thx

alexandrebini avatar Sep 01 '22 16:09 alexandrebini

Changing it to ^[\\p{L}+\\-%/$.]+$" or ^[\\S+\\-%/$.]+$" should work. I will try to find time to test it.

ref

alexandrebini avatar Sep 01 '22 16:09 alexandrebini