Skip to content

Fix Cache Reference Error in feeEstimate.js#390

Merged
Sulex45 merged 2 commits into
stellarkit-lab-devtools:mainfrom
Gainer-dev:main
Jun 28, 2026
Merged

Fix Cache Reference Error in feeEstimate.js#390
Sulex45 merged 2 commits into
stellarkit-lab-devtools:mainfrom
Gainer-dev:main

Conversation

@Gainer-dev

@Gainer-dev Gainer-dev commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes a cache reference error in src/routes/feeEstimate.js where the cache service is imported as cacheService but referenced as cache within the route handler. This mismatch results in a ReferenceError whenever cached responses are accessed, preventing the caching layer from functioning correctly.

Changes

  • Replaced all cache.get(...) calls with cacheService.get(...).
  • Replaced all cache.set(...) calls with cacheService.set(...).
  • Restored proper cache access within the /fee-estimate route.
  • Ensured cached responses are served without runtime errors.

Why

The incorrect cache reference caused every request that relied on the cache to fail with a ReferenceError, effectively disabling the caching mechanism. This fix restores the intended behavior, improving reliability and performance.

Testing

  • Verified GET /fee-estimate returns a successful response without throwing a ReferenceError.
  • Confirmed cache misses populate the cache correctly.
  • Confirmed subsequent requests return cached responses with the X-Cache: HIT header.
  • Verified existing endpoint functionality remains unchanged.

Checklist

  • Code follows project standards.
  • Tested locally.
  • No breaking changes introduced.
  • Ready for review.

closes #245
closes #246
closes #247
closes #248

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@Gainer-dev 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! 🚀

Learn more about application limits

@Sulex45

Sulex45 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Kindly resolve conflicts

@Sulex45 Sulex45 merged commit e8eff22 into stellarkit-lab-devtools:main Jun 28, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants