Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant