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

Add case insensitive checks for token addresses in collectibles and tokens controllers #537

Merged
merged 2 commits into from
Jul 26, 2021

Conversation

adonesky1
Copy link
Contributor

This seeks to resolve a host of issues that can arise when token addresses with different casing slip through.

@adonesky1 adonesky1 requested a review from a team as a code owner July 23, 2021 22:14
@adonesky1 adonesky1 force-pushed the add-case-insensitive-checks branch from 353d8d9 to d23cdf7 Compare July 23, 2021 22:15
@adonesky1 adonesky1 requested review from Gudahtt and Cal-L July 23, 2021 22:53
Copy link
Contributor

@ryanml ryanml left a comment

Choose a reason for hiding this comment

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

++ - we have this pattern (one of comparing two addresses by lower casing them both) in a lot of places throughout the codebase, it may be nice as a followup to write a helper for this (ex addressesAreEqual(a1, a2)) just for general DRY purposes. May be overkill, just a thought!

@adonesky1 adonesky1 merged commit 5d3ddf3 into main Jul 26, 2021
@adonesky1 adonesky1 deleted the add-case-insensitive-checks branch July 26, 2021 18:27
@adonesky1 adonesky1 mentioned this pull request Jul 27, 2021
@Gudahtt
Copy link
Member

Gudahtt commented Jul 27, 2021

Even better would be to perform input validation to guarantee they're always cased predictably (with accompanying state migrations on each product)! Probably best to use check-summed addresses, as per EIP-55. But that's a huge task.

@adonesky1
Copy link
Contributor Author

Even better would be to perform input validation to guarantee they're always cased predictably (with accompanying state >migrations on each product)! Probably best to use check-summed addresses, as per EIP-55. But that's a huge task.

Agreed. This was a short term patch that affords us some guarantees until we can do that bigger chunk of work.

MajorLift pushed a commit that referenced this pull request Oct 11, 2023
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants