Skip to content

Commit

Permalink
fix: unnamed address on transaction item correctly fits (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranroneill authored Dec 23, 2023
1 parent aa9c335 commit 560f377
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/extension/components/AddressDisplay/AddressDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,24 @@ const AddressDisplay: FC<IProps> = ({
h={getIconSize()}
w={getIconSize()}
/>
<Text color={color || defaultTextColor} fontSize={fontSize}>
{account.name ||
ellipseAddress(
{account.name ? (
<Text
color={color || defaultTextColor}
fontSize={fontSize}
maxW={160}
noOfLines={1}
>
{account.name}
</Text>
) : (
<Text color={color || defaultTextColor} fontSize={fontSize}>
{ellipseAddress(
AccountService.convertPublicKeyToAlgorandAddress(
account.publicKey
),
{
end: 10,
start: 10,
}
)
)}
</Text>
</Text>
)}
</HStack>
</Tooltip>
);
Expand All @@ -98,10 +104,7 @@ const AddressDisplay: FC<IProps> = ({
return (
<Tooltip aria-label={ariaLabel} label={address}>
<Text color={color || defaultTextColor} fontSize={fontSize}>
{ellipseAddress(address, {
end: 10,
start: 10,
})}
{ellipseAddress(address)}
</Text>
</Tooltip>
);
Expand Down

0 comments on commit 560f377

Please sign in to comment.