Skip to content

Commit

Permalink
small refactoring from the previous PR
Browse files Browse the repository at this point in the history
  • Loading branch information
popenta committed Nov 13, 2024
1 parent f47dc5a commit 2e6dbb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion multiversx_sdk/core/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def _split_identifier_into_components(self, token_parts: list[str]) -> tuple[Uni
The second element is the ticker.
The third element is the random sequence.
"""
if token_parts[0].isalnum() and token_parts[0].islower():
has_prefix = token_parts[0].isalnum() and token_parts[0].islower()

if has_prefix:
return token_parts[0], token_parts[1], token_parts[2]
return None, token_parts[0], token_parts[1]

Expand Down

0 comments on commit 2e6dbb5

Please sign in to comment.