Skip to content

Commit

Permalink
fix(mobile): fix for NFTs with nullable address (tonkeeper#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
voloshinskii authored May 26, 2024
1 parent e1c06ea commit 7452e11
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const ActionListItemWithNft = memo<ActionListItemWithNftProps>((props) =>
});

const approvalStatuses = useTokenApproval((state) => state.tokens);
const approvalIdentifier = nft
const approvalIdentifier = nft?.address
? Address.parse(nft?.collection?.address ?? nft?.address).toRaw()
: '';
const nftApprovalStatus = approvalStatuses[approvalIdentifier];
Expand All @@ -40,7 +40,7 @@ export const ActionListItemWithNft = memo<ActionListItemWithNftProps>((props) =>
case ActionType.NftItemTransfer:
return (
<ActionListItem {...props} isScam={isScam}>
{nft && !isScam && (
{nft && nft?.address && !isScam && (
<NftPreviewContent
nft={nft}
disabled={props.disableNftPreview || props.disablePressable}
Expand All @@ -59,7 +59,7 @@ export const ActionListItemWithNft = memo<ActionListItemWithNftProps>((props) =>
case ActionType.NftPurchase:
return (
<ActionListItem {...props} isScam={isScam}>
{nft && !isScam && (
{nft && nft?.address && !isScam && (
<NftPreviewContent
nft={nft}
disabled={props.disableNftPreview || props.disablePressable}
Expand Down

0 comments on commit 7452e11

Please sign in to comment.