Skip to content

Commit

Permalink
Code review follow up
Browse files Browse the repository at this point in the history
  • Loading branch information
danielailie committed Nov 8, 2024
1 parent 59d91af commit fd98399
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit fd98399

Please sign in to comment.