Skip to content

fix: auto-remove NFTs from state when backend reclassifies them as spam#8237

Open
juanmigdr wants to merge 2 commits intomainfrom
fix/remove-spam-nfts
Open

fix: auto-remove NFTs from state when backend reclassifies them as spam#8237
juanmigdr wants to merge 2 commits intomainfrom
fix/remove-spam-nfts

Conversation

@juanmigdr
Copy link
Member

@juanmigdr juanmigdr commented Mar 18, 2026

Explanation

References

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 communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Introduces a breaking constructor change and new state-mutation behavior (automatic NFT removals) during detection, which could affect integrators and unexpectedly prune user-visible assets if inputs/network resolution are wrong.

Overview
NftDetectionController.detectNfts() now actively removes NFTs already in local state when the NFT API returns them with isSpam: true, using NetworkController:findNetworkClientIdByChainId to resolve the target network and skipping removals when the network can’t be resolved.

This is a breaking change: the NftDetectionController constructor now requires a removeNft callback (wired to NftController.removeNft). Tests and the package changelog were updated to cover/announce the new spam-removal behavior and edge cases.

Written by Cursor Bugbot for commit 707ea93. This will update automatically on new commits. Configure here.

@juanmigdr juanmigdr requested review from a team as code owners March 18, 2026 17:48
@juanmigdr juanmigdr changed the title fix: remove SPAM NFTs fix: auto-remove NFTs from state when backend reclassifies them as spam Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant