Skip to content

Commit

Permalink
fix: update display name with hash in ContractOverview
Browse files Browse the repository at this point in the history
  • Loading branch information
tiendn committed Apr 3, 2023
1 parent 75957d0 commit ec43430
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion views/accounts/AddressOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ const AddressOverview = ({ validator, address, addressData }: Props) => {
/>
</div>
) : isContract ? (
`${addressData.contractName} (${address})`
addressData.contractName ? (
`${addressData.contractName} (${address})`
) : (
address
)
) : (
<div>
{displayMode === DisplayMode.EVM ? address : ethToAstra(address)}
Expand Down
4 changes: 3 additions & 1 deletion views/accounts/components/ContractOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const ContractOverview = ({ addressData, address }: Props) => {
<div className={clsx(styles.borderBottom, 'row padding-bottom-sm padding-top-sm')}>
<span className="col-2 text text-base contrast-color-50">Token</span>
<LinkText classes="col-10" href={LinkMaker.token(address)}>
{addressData.tokenName} ({addressData.tokenSymbol})
{addressData.tokenName
? `${addressData.tokenName} (${addressData.tokenSymbol})`
: addressData.tokenSymbol}
</LinkText>
</div>
)}
Expand Down

0 comments on commit ec43430

Please sign in to comment.