Skip to content

Commit

Permalink
Enable displaying the names at more locations
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed Jan 14, 2025
1 parent fed63ce commit c3b900b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/components/Account/ContractCreatorInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const TxSender: FC<{ scope: SearchScope; txHash: string; alwaysTrim?: boolean }>
}}
/>
) : senderAddress ? (
<AccountLink scope={scope} address={senderAddress} alwaysTrim={alwaysTrim} />
<AccountLink scope={scope} address={senderAddress} alwaysTrim={alwaysTrim} showAddressAsName />
) : (
t('common.missing')
)
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/AccountList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const AccountList: FC<AccountListProps> = ({ isLoading, limit, pagination
key: 'size',
},
{
content: <AccountLink scope={account} address={account.address} alwaysTrim />,
content: <AccountLink scope={account} address={account.address} alwaysTrim showAddressAsName />,
key: 'address',
},
{
Expand Down
1 change: 1 addition & 0 deletions src/app/components/Tokens/TokenHolders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const TokenHolders: FC<TokenHoldersProps> = ({
scope={holder}
address={holder.eth_holder_address || holder.holder_address}
alwaysTrim
showAddressAsName
/>
),
},
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/Tokens/TokenTransfers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const TokenTransfers: FC<TokenTransfersProps> = ({
{trimLongString(fromAddress)}
</Typography>
) : (
<AccountLink scope={transfer} address={fromAddress} alwaysTrim />
<AccountLink scope={transfer} address={fromAddress} alwaysTrim showAddressAsName />
)}

<TransferIcon />
Expand All @@ -187,7 +187,7 @@ export const TokenTransfers: FC<TokenTransfersProps> = ({
{trimLongString(toAddress)}
</Typography>
) : (
<AccountLink scope={transfer} address={toAddress} alwaysTrim />
<AccountLink scope={transfer} address={toAddress} alwaysTrim showAddressAsName />
),
},
...(differentTokens
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/Transactions/RuntimeTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export const RuntimeTransactions: FC<TransactionsProps> = ({
scope={transaction}
address={transaction.sender_0_eth || transaction.sender_0}
alwaysTrim
showAddressAsName
/>
{targetAddress && <TransferIcon />}
</Box>
Expand All @@ -142,6 +143,7 @@ export const RuntimeTransactions: FC<TransactionsProps> = ({
scope={transaction}
address={targetAddress}
alwaysTrim
showAddressAsName
/>
) : null,
key: 'to',
Expand Down
16 changes: 14 additions & 2 deletions src/app/components/Transactions/TransactionDetailsElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ export const From: FC<FromProps> = ({ address, ownAddress, scope }) => {
return (
<Box sx={{ display: 'inline-flex' }}>
<Label>{t('common.from')}</Label>
<AccountLink labelOnly={address === ownAddress} scope={scope} address={address} alwaysTrim />
<AccountLink
labelOnly={address === ownAddress}
scope={scope}
address={address}
alwaysTrim
showAddressAsName
/>
</Box>
)
}
Expand All @@ -60,7 +66,13 @@ export const To: FC<ToProps> = ({ address, label, ownAddress, scope, type = 'acc
<Box sx={{ display: 'inline-flex' }}>
<Label>{label || t('common.to')}</Label>
{type === 'account' && (
<AccountLink labelOnly={address === ownAddress} scope={scope} address={address} alwaysTrim />
<AccountLink
labelOnly={address === ownAddress}
scope={scope}
address={address}
alwaysTrim
showAddressAsName
/>
)}
{type === 'validator' && <ValidatorLink network={scope.network} address={address} alwaysTrim />}
</Box>
Expand Down
2 changes: 2 additions & 0 deletions src/app/pages/RuntimeTransactionDetailPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export const RuntimeTransactionDetailView: FC<{
<AccountLink
scope={transaction}
address={(transaction?.sender_0_eth ?? transaction?.sender_0) as string}
showAddressAsName
/>
<CopyToClipboard value={transaction?.sender_0_eth ?? transaction?.sender_0} />
</dd>
Expand All @@ -180,6 +181,7 @@ export const RuntimeTransactionDetailView: FC<{
<AccountLink
scope={transaction}
address={(transaction?.to_eth || transaction?.to) as string}
showAddressAsName
/>
<CopyToClipboard value={(transaction?.to_eth || transaction?.to) as string} />
</dd>
Expand Down

0 comments on commit c3b900b

Please sign in to comment.