Skip to content

Conversation

@alfetopito
Copy link
Collaborator

@alfetopito alfetopito commented May 2, 2023

Summary

Sorting token list on addition/update by chainId, then address

Also sorting the current list by the above rules

Why?

Because adding always to the bottom of the list creates merge conflicts for sequential PRs.
This change is a low effort fix that makes less likely to have conflicts in the same areas of the file.
This in turn should make the review/merge process simpler.

Testing

Tested it locally by running LIST_PATH=src/public/CowSwap.json python3 src/scripts/workflow_helper.py addToken data.json

The sorted list is the result of this change, minus the new token being added which I manually removed.

The list should still work when added to CoW Swap. Use this url to try it out https://raw.githubusercontent.com/cowprotocol/token-lists/9fd4fc4b83668115d58f7622998635825289eea6/src/public/CowSwap.json

@alfetopito alfetopito self-assigned this May 2, 2023
@alfetopito alfetopito requested review from a team May 2, 2023 16:02
@alfetopito alfetopito merged commit bc67ea7 into develop May 3, 2023
@alfetopito alfetopito deleted the sort-token-list branch May 3, 2023 09:40
@github-actions github-actions bot locked and limited conversation to collaborators May 3, 2023
Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

Fine, i ended up more convince about adding them at the beginning, but this works!

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.

4 participants