Skip to content

Commit

Permalink
feat: display proper image for src20 tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
RisingStarDev authored and kyranjamie committed Jan 10, 2025
1 parent 05132fe commit dbba410
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useManageTokens } from '@app/common/hooks/use-manage-tokens';
import { CryptoAssetItem } from '@app/components/crypto-asset-item/crypto-asset-item';
import type { Src20TokenAssetDetails } from '@app/components/loaders/src20-tokens-loader';
import { useIsPrivateMode } from '@app/store/settings/settings.selectors';
import { CollectibleImage } from '@app/features/collectibles/components/_collectible-types/collectible-image';

import type { AssetRightElementVariant } from '../../asset-list';

Expand Down Expand Up @@ -34,7 +35,17 @@ export function Src20TokenAssetList({
return tokens.map((token, i) => {
const key = `${token.info.id}${i}`;
const captionLeft = getAssetDisplayName(token.info).toUpperCase();
const icon = <Src20AvatarIcon />;
const icon = token.info.deploy_img ? (

Check failure on line 38 in src/app/features/asset-list/bitcoin/src20-token-asset-list/src20-token-asset-list.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Property 'deploy_img' does not exist on type 'Src20CryptoAssetInfo'.
<CollectibleImage
alt={token.info.symbol}
icon={<Src20AvatarIcon size="lg" />}
src={token.info.deploy_img}

Check failure on line 42 in src/app/features/asset-list/bitcoin/src20-token-asset-list/src20-token-asset-list.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Property 'deploy_img' does not exist on type 'Src20CryptoAssetInfo'.
title={`# ${token.info.id}`}
subtitle={`# ${token.info.symbol}`}
/>
) : (
<Src20AvatarIcon />
);
const titleLeft = token.info.symbol.toUpperCase();
const symbol = token.info.symbol;

Expand Down

0 comments on commit dbba410

Please sign in to comment.