1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 11:28:51 +01:00

fix issue where non-standard NFT watchAsset requests result in notification with home screen view (#19788)

This commit is contained in:
Alex Donesky 2023-06-28 13:01:38 -05:00 committed by GitHub
parent d271b28ede
commit 230c0c6fa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
///: BEGIN:ONLY_INCLUDE_IN(snaps)
import { SubjectType } from '@metamask/subject-metadata-controller';
///: END:ONLY_INCLUDE_IN
import { ApprovalType, ERC1155, ERC721 } from '@metamask/controller-utils';
import { ApprovalType } from '@metamask/controller-utils';
import {
createSelector,
createSelectorCreator,
@ -574,7 +574,7 @@ export function getSuggestedNfts(state) {
getUnapprovedConfirmations(state)?.filter(({ requestData, type }) => {
return (
type === ApprovalType.WatchAsset &&
[ERC721, ERC1155].includes(requestData?.asset?.standard)
requestData?.asset?.tokenId !== undefined
);
}) || []
);