Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-latin character tokens #598

Open
mastbmawstaken opened this issue Jun 22, 2023 · 0 comments
Open

Non-latin character tokens #598

mastbmawstaken opened this issue Jun 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mastbmawstaken
Copy link

Bug Description
When you try to search for non-latin tokens the response we get is the following error

Error: Tokens failed validation: /tokens/0/name must match pattern "^[ \w.'+-%/À-ÖØ-öø-ÿ:&[]()]+$"

Steps to Reproduce

  1. Create a Next.JS app with react and install Uniswap widgets with their dependencies. Create a simple page with the Swap widget.
  2. Create a custom list with a non-latin name/symbol. Example:

const MY_TOKEN_LIST = [
{
"name": "Dumplings",
"address": "0x1da74e8beceaa94d4dc6020e4f2ffe3c6ea7176d",
"symbol": "饺子",
"decimals": 18,
"chainId": 1,
"logoURI": "/logo.png"
}]

  1. Run the app and try to swap ETH/BNB... for the token above (or any token that doesn't use latin characters).

Expected Behavior
I expected to be able to swap for these tokens but I'm prompted with the error above.

Additional Context
Same token, different response:

image

Widget

image

Official App

@mastbmawstaken mastbmawstaken added the bug Something isn't working label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant