Skip to content

Commit

Permalink
fix: user account add zero address link jump
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsupa597 committed Apr 26, 2023
1 parent 2932ed5 commit 020f988
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions components/TruncatedAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,7 @@ const TruncatedAddress = ({
domain?: string
placement?: 'top' | 'bottom'
}) => {
if (address === ZERO_ADDRESS) {
return (
<Tooltip title={address} placement={placement} sx={sx}>
<Box sx={sx}>
<span className="mono-font" style={{ color: 'var(--primary-text-color)', userSelect: 'none' }}>
zero address
</span>
</Box>
</Tooltip>
)
}

const isZeroAddress = address === ZERO_ADDRESS
const addrDisplay = getAddressDisplay({
eth_address: address,
script_hash: address,
Expand Down Expand Up @@ -67,7 +56,7 @@ const TruncatedAddress = ({
) : (
<Tooltip title={address} placement={placement} sx={sx}>
<Box sx={sx}>
<HashLink label={label} href={`/account/${address}`} monoFont={monoFont} />
<HashLink label={isZeroAddress ? 'zero address' : label} href={`/account/${address}`} monoFont={monoFont} />
</Box>
</Tooltip>
)}
Expand Down

0 comments on commit 020f988

Please sign in to comment.