Skip to content

Commit

Permalink
Reduce max pet name length
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronfigueiredo committed Nov 25, 2024
1 parent 1124dae commit 96bf838
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/components/app/name/__snapshots__/name.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ exports[`Name renders address with long saved name 1`] = `
<p
class="mm-box mm-text name__name mm-text--body-md mm-box--color-text-default"
>
Very long and l...
Very long an...
</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ exports[`NameDetails renders with recognized name 1`] = `
<p
class="mm-box mm-text name__name mm-text--body-md mm-box--color-text-default"
>
iZUMi Bond USD
iZUMi Bond U...
</p>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions ui/components/app/name/name.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ const Name = memo(
}, [setModalOpen]);

const formattedValue = formatValue(value, type);
const MAX_PET_NAME_LENGTH = 12;
const formattedName = shortenString(name || undefined, {
truncatedCharLimit: 15,
truncatedStartChars: 15,
truncatedCharLimit: MAX_PET_NAME_LENGTH,
truncatedStartChars: MAX_PET_NAME_LENGTH,
truncatedEndChars: 0,
skipCharacterInEnd: true,
});
Expand Down

0 comments on commit 96bf838

Please sign in to comment.