Skip to content

Commit a0d9855

Browse files
committed
feat(suite): blur urls in transaction heading
1 parent 4fc2377 commit a0d9855

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packages/suite/src/components/wallet/TransactionItem/TransactionHeader.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { AccountTransaction } from '@trezor/connect';
33
import { Row } from '@trezor/components';
44
import { spacings } from '@trezor/theme';
55

6-
import { Translation } from 'src/components/suite';
6+
import { useTranslation } from 'src/hooks/suite';
77
import { WalletAccountTransaction } from 'src/types/wallet';
88
import { UnstakingTxAmount } from 'src/components/suite/UnstakingTxAmount';
9+
import { BlurUrls } from 'src/views/wallet/tokens/common/BlurUrls';
910

1011
type TransactionHeaderProps = {
1112
transaction: WalletAccountTransaction;
@@ -64,6 +65,8 @@ const getTransactionMessageId = ({ transaction, isPending }: GetTransactionMessa
6465
};
6566

6667
export const TransactionHeader = ({ transaction, isPending }: TransactionHeaderProps) => {
68+
const { translationString } = useTranslation();
69+
6770
if (transaction?.ethereumSpecific?.parsedData?.name) {
6871
return (
6972
<Row gap={spacings.xxs} overflow="hidden">
@@ -79,9 +82,11 @@ export const TransactionHeader = ({ transaction, isPending }: TransactionHeaderP
7982
const symbol = getTxHeaderSymbol(transaction)?.toUpperCase();
8083

8184
return (
82-
<Translation
83-
id={getTransactionMessageId({ transaction, isPending })}
84-
values={{ symbol, multiple: isMultiTokenTransaction }}
85+
<BlurUrls
86+
text={translationString(getTransactionMessageId({ transaction, isPending }), {
87+
symbol,
88+
multiple: isMultiTokenTransaction,
89+
})}
8590
/>
8691
);
8792
};

0 commit comments

Comments
 (0)