Feature/issue 167 pool timestamp#200
Open
Agencybuilds wants to merge 2 commits into
Open
Conversation
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 #167
Description: This PR adds the ability for clients to determine how recently the underlying entries of an aggregated liquidity pool were updated, without requiring them to fetch all /entries separately.
Changes Made:
Core Interface: Added lastUpdated?: string to the Pool interface.
Aggregation Logic: Updated LiquidityRepository.pools() to compute the maximum updatedAt from the contributing LiquidityEntry records on the fly, with no extra full-table pass required.
Documentation: Updated the static OpenAPI specification (src/openapi.ts) for /api/v1/liquidity and /api/v1/liquidity/{asset} responses to describe the new lastUpdated field.
Tests: Expanded repository, service, and routing tests to assert that lastUpdated accurately propagates. Existing endpoint functionality and test assumptions remain unbroken.
Security Notes: No security implications. This acts strictly as read-only freshness metadata appended over already-exposed aggregate data.