fix: tag AMM snapshots with ingester network - #202
Merged
Miracle656 merged 1 commit intoSep 30, 2026
Merged
Conversation
|
@tobiadewola41-eng Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Miracle656
added a commit
that referenced
this pull request
Sep 30, 2026
Every function in src/aggregator/vwap.ts now takes a required network and filters price_points and pool_snapshots on it, getAMMPrice filters both legs of its pool lookup, /price/:assetA/:assetB passes req.network through to the aggregator, and the aggregate refresh worker runs once per enabled network instead of pinning itself to whichever network the instance happens to be indexing. Merged locally: src/__tests__/price.test.ts conflicted only because #184 and 1c7e200 appended test blocks to the same tail; resolved as a union. The README paragraph was corrected on merge — #195, #202 and #205 landed network scoping for /screener, /pools, /depth and /prices/history after this branch was written, so the list of still-unscoped endpoints was stale. Claude-Session: https://claude.ai/code/session_01USgemLt4Rnz4SGB1Srf3GB
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.
closes #163
Summary
pool_snapshotsrows with the network passed tosnapshotPool.STELLAR_NETWORKis unset.Verification
npx vitest run src/__tests__/ammIngester.test.tsnpx tsc --noEmitactiveNetworkbehavior.Existing data
Previously mis-tagged mainnet snapshots may need backfilling or purge and re-ingestion. This change affects future writes only; existing rows cannot reliably reveal their originating network without external pool/network history.