Skip to content

Commit

Permalink
Merge pull request #936 from Magickbase/fix/user-account-add-zero-add…
Browse files Browse the repository at this point in the history
…ress-link-jump
  • Loading branch information
Keith-CY authored Apr 27, 2023
2 parents 2932ed5 + 020f988 commit 291b2d8
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 291b2d8

Please sign in to comment.