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

Searching for projects whose names begin with 0x does not work #221

Open
0xBrian opened this issue Apr 28, 2022 · 1 comment
Open

Searching for projects whose names begin with 0x does not work #221

0xBrian opened this issue Apr 28, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@0xBrian
Copy link

0xBrian commented Apr 28, 2022

Bug Description
On info.uniswap.org, the "Search pools or tokens" box cannot be used to to find projects whose names begin with 0x.

Steps to Reproduce

  1. Go to info.uniswap.org.
  2. Enter the "Search pools or tokens" box.
  3. Type "0xbtc".
  4. Confirm "No results".
  5. Clear the search box.
  6. Type "xbtc".
  7. Confirm that there are results.

Expected Behavior
Typing "0xbtc" should show results that contain references to the project whose ticker is 0xBTC.

Additional Context
https://github.com/Uniswap/v3-info/blob/master/src/data/search/index.ts#L216
Checking whether the first characters of a string are 0x seems like too imprecise of a check for whether a value is an Ethereum address. If the intent of the code is to avoid regex matches, could the isAddress check be extended to include a check of the length of the value?

@alexeygorbachevsky
Copy link
Contributor

Fixed in #222

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

2 participants