Skip to content

Commit

Permalink
fix: apply spamFilter to all crypto captions and titles, ref leather-…
Browse files Browse the repository at this point in the history
…wallet/issues#5589
  • Loading branch information
pete-watters committed Jul 2, 2024
1 parent 4571ad7 commit ed284b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function CryptoAssetItemLayout({
<ItemLayout
flagImg={icon}
titleLeft={spamFilter(titleLeft)}
captionLeft={captionLeft}
captionLeft={spamFilter(captionLeft)}
titleRight={titleRight}
captionRight={captionRight}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { CryptoAssetBalance, MarketData, Sip10CryptoAssetInfo } from '@leather.io/models';
import { spamFilter } from '@leather.io/utils';

import { convertAssetBalanceToFiat } from '@app/common/asset-utils';
import { getSafeImageCanonicalUri } from '@app/common/stacks-utils';
Expand All @@ -20,23 +19,23 @@ export function Sip10TokenAssetItem({
marketData,
onSelectAsset,
}: Sip10TokenAssetItemProps) {
const name = spamFilter(info.name);
const fiatBalance = convertAssetBalanceToFiat({
balance: balance.availableBalance,
marketData,
});
const { contractId, imageCanonicalUri, name, symbol } = info;

return (
<CryptoAssetItemLayout
availableBalance={balance.availableBalance}
fiatBalance={fiatBalance}
captionLeft={info.symbol}
contractId={info.contractId}
captionLeft={symbol}
contractId={contractId}
icon={
<StacksAssetAvatar
color="white"
gradientString={info.contractId}
imageCanonicalUri={getSafeImageCanonicalUri(info.imageCanonicalUri, name)}
gradientString={contractId}
imageCanonicalUri={getSafeImageCanonicalUri(imageCanonicalUri, name)}
>
{name[0]}
</StacksAssetAvatar>
Expand Down

0 comments on commit ed284b9

Please sign in to comment.