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

refactor(backend): assert token symbol length #1551

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

peterpeterparker
Copy link
Member

Motivation

In #1550 we will require the assertion of the token symbol length in two functions. That's why I'm extracting here the function to a utility.

Changes

  • Move assertion assert_token_symbol_length to a new module assertions.
  • Inverse order where the assertion is made - i.e. first assert and then, if everything is ok, parse the eth address.

Tests

The assertion was already covered by an existing test test_add_user_token_symbol_max_length.

@peterpeterparker peterpeterparker requested a review from a team as a code owner June 24, 2024 12:31
@peterpeterparker peterpeterparker merged commit 0200f4e into main Jun 25, 2024
5 checks passed
@peterpeterparker peterpeterparker deleted the refactor/extract-asset-token-symbol-length branch June 25, 2024 04:08
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.

1 participant