diff --git a/packages/assets-controllers/src/NftController.ts b/packages/assets-controllers/src/NftController.ts index 993c1a87b2..292611dc0d 100644 --- a/packages/assets-controllers/src/NftController.ts +++ b/packages/assets-controllers/src/NftController.ts @@ -25,7 +25,6 @@ import { ApprovalType, NFT_API_BASE_URL, NFT_API_VERSION, - NFT_UPDATE_THRESHOLD, } from '@metamask/controller-utils'; import { type InternalAccount } from '@metamask/keyring-internal-api'; import type { @@ -101,12 +100,11 @@ type SuggestedNftMeta = { * @property isCurrentlyOwned - Boolean indicating whether the address/chainId combination where it's currently stored currently owns this NFT * @property transactionId - Transaction Id associated with the NFT */ -export type Nft = - | { - tokenId: string; - address: string; - isCurrentlyOwned?: boolean; - } & NftMetadata; +export type Nft = { + tokenId: string; + address: string; + isCurrentlyOwned?: boolean; +} & NftMetadata; type NftUpdate = { nft: Nft; @@ -275,6 +273,8 @@ export const getDefaultNftControllerState = (): NftControllerState => ({ ignoredNfts: [], }); +const NFT_UPDATE_THRESHOLD = 500; + /** * Controller that stores assets and exposes convenience methods */ diff --git a/packages/controller-utils/src/constants.ts b/packages/controller-utils/src/constants.ts index 3fad08de33..3b9add7756 100644 --- a/packages/controller-utils/src/constants.ts +++ b/packages/controller-utils/src/constants.ts @@ -8,7 +8,6 @@ import { export const RPC = 'rpc'; export const FALL_BACK_VS_CURRENCY = 'ETH'; export const IPFS_DEFAULT_GATEWAY_URL = 'https://cloudflare-ipfs.com/ipfs/'; -export const NFT_UPDATE_THRESHOLD = 500; // NETWORKS ID // `toHex` not invoked to avoid cyclic dependency diff --git a/packages/controller-utils/src/index.test.ts b/packages/controller-utils/src/index.test.ts index 2ada33726a..61ef841826 100644 --- a/packages/controller-utils/src/index.test.ts +++ b/packages/controller-utils/src/index.test.ts @@ -35,7 +35,6 @@ describe('@metamask/controller-utils', () => { "RPC", "FALL_BACK_VS_CURRENCY", "IPFS_DEFAULT_GATEWAY_URL", - "NFT_UPDATE_THRESHOLD", "GANACHE_CHAIN_ID", "MAX_SAFE_CHAIN_ID", "ERC721",