Commit e278625
feat: remove nft detection polling (#4281)
## Explanation
This PR removes polling logic from NftDetectionController.
Calling detectNfts function will be tied to UI components instead of
preference change events.
NftDetectionController will now extend `BaseController` instead of
`StaticIntervalPollingController`.
The detectNfts logic has also changed to call the NFT-API and save the
nfts in state as soon as they are available instead of waiting to fetch
all the user NFTs before saving to state.
## References
* Related to
[67890](MetaMask/metamask-extension#24547)
## Changelog
<!--
If you're making any consumer-facing changes, list those changes here as
if you were updating a changelog, using the template below as a guide.
(CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or
FIXED. For security-related issues, follow the Security Advisory
process.)
Please take care to name the exact pieces of the API you've added or
changed (e.g. types, interfaces, functions, or methods).
If there are any breaking changes, make sure to offer a solution for
consumers to follow once they upgrade to the changes.
Finally, if you're only making changes to development scripts or tests,
you may replace the template below with "None".
-->
### `@metamask/assets-controllers`
- **BREAKING**: Changed NftDetectionController to extend
`BaseController`.
- **REMOVED**: Removed `interval` from contructor in
`NftDetectionController`.
## Checklist
- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've highlighted breaking changes using the "BREAKING" category
above as appropriate1 parent 042f29b commit e278625
File tree
2 files changed
+240
-457
lines changed- packages/assets-controllers/src
2 files changed
+240
-457
lines changed
0 commit comments