Repository navigation
fix(backend): resolve EscrowService, RateLimitGuard, and EscrowAnalytics issues (#742, #743, #744, #748) - #771
Merged
meshackyaro merged 3 commits intoOct 18, 2026
Conversation
…ime bugs (trustflow-protocol#742, trustflow-protocol#743, trustflow-protocol#744, trustflow-protocol#748) - Fix trustflow-protocol#743: declare missing helper methods and constants in EscrowService - Fix trustflow-protocol#744: add ioredis module augmentation for custom rateLimitCheck command - Fix trustflow-protocol#742: fix setRateLimitHeaders arguments and calculate advertised headers from pipeline decisions - Fix trustflow-protocol#748: remove invalid item.s fallback shape in EscrowAnalyticsService
|
@Prudentdev-xyz 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! 🚀 |
7 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.
Summary
This pull request resolves compilation errors and runtime issues across
EscrowService,RateLimitGuard, andEscrowAnalyticsService:EscrowService missing helpers and metrics (EscrowService calls private helper methods and constants that don't exist, so the file fails to compile #743)
AuditServiceimport.ESCROWS_INDEX_KEY,ESCROW_PERSISTENCE_FALLBACK_METRIC, andESCROW_TRANSACTION_INCONSISTENT_METRIC.escrowKey,depositorKey,contractKey) and implementedfetchManywith RedisMGETand JSON parsing.logFallbackandrethrowIfInconsistentwith proper metric increments and transaction integrity checks.ioredis type augmentation for custom
rateLimitCheckcommand (Missing ioredis type augmentation for the custom rateLimitCheck Lua command #744)RedisandChainableCommanderinterfaces inioredisto declarerateLimitCheck.RateLimitGuard advertised headers calculation (RateLimitGuard.setRateLimitHeaders is called with the tier config object instead of the pipeline decisions, so advertised rate-limit headers are always wrong #742)
canActivate()to pass real pipelinedecisionsalong withtierConfigtosetRateLimitHeaders().setRateLimitHeaders()to select the tighter (lower-remaining) decision across multiple identities (e.g., IP and wallet) to protect clients from exhaustion.RateLimit-RemainingandRateLimit-Resetreflect bucket state and decrease across consecutive calls.EscrowAnalyticsService invalid fallback shape (EscrowAnalyticsService crashes on a non-existent item.s.* fallback shape when escrowService is unavailable #748)
item.s.*fallback property access ingetPaginatedEscrowAnalytics().item?.amountXLM ?? '0',item?.createdAt ?? new Date().toISOString()).escrowServiceis not injected.Related Issues