Skip to content

Commit

Permalink
feat(suite): blur urls in transaction heading
Browse files Browse the repository at this point in the history
  • Loading branch information
enjojoy committed Nov 27, 2024
1 parent 1434631 commit ee47ee0
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { AccountTransaction } from '@trezor/connect';
import { Row } from '@trezor/components';
import { spacings } from '@trezor/theme';

import { Translation } from 'src/components/suite';
import { useTranslation } from 'src/hooks/suite';
import { WalletAccountTransaction } from 'src/types/wallet';
import { UnstakingTxAmount } from 'src/components/suite/UnstakingTxAmount';
import { BlurUrls } from 'src/views/wallet/tokens/common/BlurUrls';

type TransactionHeaderProps = {
transaction: WalletAccountTransaction;
Expand Down Expand Up @@ -64,6 +65,8 @@ const getTransactionMessageId = ({ transaction, isPending }: GetTransactionMessa
};

export const TransactionHeader = ({ transaction, isPending }: TransactionHeaderProps) => {
const { translationString } = useTranslation();

if (transaction?.ethereumSpecific?.parsedData?.name) {
return (
<Row gap={spacings.xxs} overflow="hidden">
Expand All @@ -79,9 +82,11 @@ export const TransactionHeader = ({ transaction, isPending }: TransactionHeaderP
const symbol = getTxHeaderSymbol(transaction)?.toUpperCase();

return (
<Translation
id={getTransactionMessageId({ transaction, isPending })}
values={{ symbol, multiple: isMultiTokenTransaction }}
<BlurUrls
text={translationString(getTransactionMessageId({ transaction, isPending }), {
symbol,
multiple: isMultiTokenTransaction,
})}
/>
);
};

0 comments on commit ee47ee0

Please sign in to comment.