Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mobile): fix for NFTs with nullable address #885

Merged
merged 1 commit into from
May 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 && (
Copy link

@ahmed1106666 ahmed1106666 Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

01117917133

Copy link

@ahmed1106666 ahmed1106666 Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[email protected]

01117917133

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<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