Skip to content

Commit

Permalink
fix: Prefer token symbol to token name
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronfigueiredo committed Oct 8, 2024
1 parent 8dedd3c commit 68974d9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
6 changes: 5 additions & 1 deletion ui/components/app/confirm/info/row/address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export const ConfirmInfoRowAddress = memo(
// component can support variations. See this comment for context: //
// https://github.com/MetaMask/metamask-extension/pull/23487#discussion_r1525055546
isPetNamesEnabled && !isSnapUsingThis ? (
<Name value={hexAddress} type={NameType.ETHEREUM_ADDRESS} />
<Name
value={hexAddress}
type={NameType.ETHEREUM_ADDRESS}
preferContractSymbol
/>
) : (
<>
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const ApproveStaticSimulation = () => {
<Name
value={transactionMeta.txParams.to as string}
type={NameType.ETHEREUM_ADDRESS}
preferContractSymbol
/>
</Box>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const RevokeStaticSimulation = () => {
<Name
value={transactionMeta.txParams.to as string}
type={NameType.ETHEREUM_ADDRESS}
preferContractSymbol
/>
</Box>
</Box>
Expand All @@ -36,6 +37,7 @@ export const RevokeStaticSimulation = () => {
<Name
value={transactionMeta.txParams.from as string}
type={NameType.ETHEREUM_ADDRESS}
preferContractSymbol
/>
</Box>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const RevokeSetApprovalForAllStaticSimulation = ({
<Name
value={transactionMeta.txParams.to as string}
type={NameType.ETHEREUM_ADDRESS}
preferContractSymbol
/>
</Box>
</Box>
Expand All @@ -39,7 +40,11 @@ export const RevokeSetApprovalForAllStaticSimulation = ({
<ConfirmInfoRow label={t('permissionFrom')}>
<Box style={{ marginLeft: 'auto', maxWidth: '100%' }}>
<Box display={Display.Flex} alignItems={AlignItems.center}>
<Name value={spender} type={NameType.ETHEREUM_ADDRESS} />
<Name
value={spender}
type={NameType.ETHEREUM_ADDRESS}
preferContractSymbol
/>
</Box>
</Box>
</ConfirmInfoRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const SetApprovalForAllStaticSimulation = () => {
<Name
value={transactionMeta.txParams.to as string}
type={NameType.ETHEREUM_ADDRESS}
preferContractSymbol
/>
</Box>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ const PermitSimulationValueDisplay: React.FC<
</Text>
</Tooltip>
</Box>
<Name value={tokenContract} type={NameType.ETHEREUM_ADDRESS} />
<Name
value={tokenContract}
type={NameType.ETHEREUM_ADDRESS}
preferContractSymbol
/>
</Box>
<Box>
{fiatValue && <IndividualFiatDisplay fiatAmount={fiatValue} shorten />}
Expand Down

0 comments on commit 68974d9

Please sign in to comment.