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

fix(token-list): increase token symbol validation length #4913

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

shoom3301
Copy link
Collaborator

@shoom3301 shoom3301 commented Sep 23, 2024

Summary

Context: https://cowservices.slack.com/archives/C05QVFJUX9R/p1726893122604539

We currently use Uniswap token lists validation schema and it's strct enough.
In order to support new requirements I changed the validation schema:

  • TokenInfo.symbol max length not 80 and pattern is ^[\w\d\-\+_\.\s]+$
  • TokenInfo.name max length not 100 and pattern is ^[\w\d\-\+_\.\s]+$

To Test

https://raw.githubusercontent.com/cowmarketing/cowidget-custom-token-lists/refs/heads/main/pendle_pt.json - should be added into CoW Swap with no valdiation errors

@shoom3301 shoom3301 requested review from a team September 23, 2024 14:34
@shoom3301 shoom3301 self-assigned this Sep 23, 2024
Copy link

vercel bot commented Sep 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cosmos ✅ Ready (Inspect) Visit Preview Sep 24, 2024 7:39am
cowfi ✅ Ready (Inspect) Visit Preview Sep 24, 2024 7:39am
explorer-dev 🛑 Canceled (Inspect) Sep 24, 2024 7:39am
swap-dev ✅ Ready (Inspect) Visit Preview Sep 24, 2024 7:39am
widget-configurator ✅ Ready (Inspect) Visit Preview Sep 24, 2024 7:39am

@elena-zh
Copy link

Hey @shoom3301 , that's great! However, I'd add 'Error importing list' error message to the UI when something is wrong with a source link
image
LMK please if I need to open a separate task for this.

@shoom3301
Copy link
Collaborator Author

@elena-zh thanks! This problem is out of this task scope, I would take care of it later

Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #4915 task for my comment above.

@shoom3301 shoom3301 merged commit 47b7115 into develop Sep 25, 2024
11 of 12 checks passed
@shoom3301 shoom3301 deleted the fix/token-list-validation-symbol-32 branch September 25, 2024 05:53
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants