From fd98399dc697b59d81ef9fb818a534ab21099d5f Mon Sep 17 00:00:00 2001 From: danielailie Date: Fri, 8 Nov 2024 14:31:58 +0200 Subject: [PATCH] Code review follow up --- src/tokens.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tokens.ts b/src/tokens.ts index 26784f40..e448e255 100644 --- a/src/tokens.ts +++ b/src/tokens.ts @@ -261,7 +261,12 @@ export class TokenComputer { return ticker + "-" + randomSequence; } - private validateExtendedIdentifier(prefix: string, randomSequence: string, ticker: string, parts: string[]): void { + private validateExtendedIdentifier( + prefix: string | null, + ticker: string, + randomSequence: string, + parts: string[], + ): void { this.checkIfExtendedIdentifierWasProvided(prefix, parts); this.ensureTokenTickerValidity(ticker); this.checkLengthOfRandomSequence(randomSequence); @@ -275,7 +280,7 @@ export class TokenComputer { return { prefix: null, ticker: parts[0], randomSequence: parts[1] }; } - private checkIfExtendedIdentifierWasProvided(prefix: string, tokenParts: string[]): void { + private checkIfExtendedIdentifierWasProvided(prefix: string | null, tokenParts: string[]): void { // this is for the identifiers of fungible tokens const MIN_EXTENDED_IDENTIFIER_LENGTH_IF_SPLITTED = 2; // this is for the identifiers of nft, sft and meta-esdt