SmartTokenLabs / tokenscript-engine

A JavaScript library for embedding tokenscript functionality in applications.
Other
2 stars 1 forks source link

We should trim the id when too long. #26

Closed nicktaras closed 4 months ago

nicktaras commented 6 months ago
Screenshot 2024-05-08 at 1 20 33 pm

e.g. using a function like this.

export function previewAddr(inputString: string) {
  if (inputString.length < 10) {
    return inputString;
  } else {
    const firstChars = inputString.substring(0, 10);
    const lastChars = inputString.substring(inputString.length - 4);
    return `${firstChars}...${lastChars}`;
  }
}

so it appears like this

Screenshot 2024-05-08 at 3 21 08 pm
micwallace commented 4 months ago

Implemented