From 2e6dbb5b960a997edbb378d721c1074534354aa1 Mon Sep 17 00:00:00 2001 From: Alexandru Popenta Date: Wed, 13 Nov 2024 09:24:25 +0200 Subject: [PATCH] small refactoring from the previous PR --- multiversx_sdk/core/tokens.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/multiversx_sdk/core/tokens.py b/multiversx_sdk/core/tokens.py index 7bcf3451..6458df7b 100644 --- a/multiversx_sdk/core/tokens.py +++ b/multiversx_sdk/core/tokens.py @@ -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]