Skip to content

Commit

Permalink
External data from Covalent API could be null
Browse files Browse the repository at this point in the history
  • Loading branch information
MidnightLightning committed Nov 29, 2023
1 parent a07de9b commit 638c019
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/hooks/useGetSourceParsedTokenAccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,12 @@ const createNFTParsedTokenAccountFromCovalent = (
logo: covalent.logo_url,
tokenId: nft_data.token_id,
uri: nft_data.token_url,
animation_url: nft_data.external_data.animation_url,
external_url: nft_data.external_data.external_url,
image: nft_data.external_data.image,
image_256: nft_data.external_data.image_256,
nftName: nft_data.external_data.name,
description: nft_data.external_data.description,
animation_url: nft_data.external_data?.animation_url,
external_url: nft_data.external_data?.external_url,
image: nft_data.external_data?.image,
image_256: nft_data.external_data?.image_256,
nftName: nft_data.external_data?.name,
description: nft_data.external_data?.description,
};
};

Expand Down Expand Up @@ -688,7 +688,7 @@ export type CovalentNFTExternalData = {
export type CovalentNFTData = {
token_id: string;
token_balance: string | null;
external_data: CovalentNFTExternalData;
external_data: CovalentNFTExternalData | null;
token_url: string;
};

Expand Down

0 comments on commit 638c019

Please sign in to comment.