v3-info icon indicating copy to clipboard operation
v3-info copied to clipboard

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

Open 0xBrian opened this issue 2 years ago • 1 comments

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?

0xBrian avatar Apr 28 '22 03:04 0xBrian

Fixed in https://github.com/Uniswap/v3-info/pull/222

alexeygorbachevsky avatar May 02 '22 13:05 alexeygorbachevsky