test(assets-controller): add record snapshots to v6 integration suites - #10490
Merged
Merged
Conversation
Resolve conflicts by adopting main's implementation changes from #9651 and #10469 (constructor-injected state/visibility, removal of the unprocessedCustomAssets mechanism, full-chain RPC recovery on v6) while keeping the PR's integration test coverage: the v5 suites keep their existing structure, and the two new v6 suites are adapted to main's data-source/pipeline API. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Prithpal-Sooriya
added this pull request to stack #10491
September 25, 2026 15:47
…s' into test-v6-integration-snapshots-jqag49ts
salimtb
previously approved these changes
Sep 28, 2026
Prithpal-Sooriya
dismissed
salimtb’s stale review
September 28, 2026 14:28
The base branch was changed.
…napshots-jqag49ts # Conflicts: # packages/assets-controller/src/AssetsController.bsc-spam-token-filtering.accounts-api-v6.integration.test.ts # packages/assets-controller/src/pipeline/buildFastFetchSources.bsc-spam-token-filtering.accounts-api-v6.integration.test.ts
salimtb
approved these changes
Sep 28, 2026
1 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Added pipeline/assets-state snapshots for our integration tests to ensure that we can have a "catch-all" for any future regressions 😄
With how complex our controller architecture is, I think snapshots will be a great way to ensure we capture changes.
This does mean that as Assets COs we should review snapshot changes to ensure we aren't introducing legit regressions.
Code Walkthrough:
https://www.loom.com/share/6587d42f75504b18967137a0968cb4fd
References
no-changeloglabel is applied per test-only convention.Checklist
Note
Low Risk
Test-only changes (fixture helper, integration tests, and snapshots); no production assets-controller logic is modified.
Overview
Adds Jest snapshot tests as a regression baseline for Accounts API v6 BSC spam-token (CDOGE) integration coverage.
A new test helper
withZeroedTimestampsdeep-clones state/response objects and sets every numericlastUpdatedfield to0so snapshots stay stable across runs. Both theAssetsControllerintegration suite and thebuildFastFetchSourcespipeline suite now include a "generates snapshot (source of truth)" case that asserts the full wallet outcome (balances, metadata, prices—and for the pipeline,detectedAssetsandupdateMode: 'full') after normalization. Committed.snapfiles record that expected shape; future changes to the v6 fast lane will show up as snapshot diffs for review.Reviewed by Cursor Bugbot for commit 95bbf00. Bugbot is set up for automated code reviews on this repo. Configure here.