-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: rwa nuxt cache #87
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe modifications update the API endpoint used in the Changes
Sequence Diagram(s)sequenceDiagram
participant PS as PythService
participant RC as HttpRestClient
participant API as New API Endpoint
PS->>RC: Instantiate using NUXT_CACHE_PYTH_SERVICE_URL
RC->>API: Send HTTP request
API-->>RC: Return response
RC-->>PS: Deliver fetched data
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
layer/services/pythClient.ts (2)
4-4
: Consider using block comment for documentation.For better readability and maintainability, consider using a block comment to document the old URL.
-// const PYTH_SERVICE_URL = 'https://benchmarks.pyth.network/v1/' +/* Previous direct Pyth Network endpoint + * const PYTH_SERVICE_URL = 'https://benchmarks.pyth.network/v1/' + */
13-13
: Consider documenting caching implications.The switch to a caching layer could affect data freshness. Consider:
- Documenting the caching behavior and TTL
- Adding cache headers in responses
- Implementing cache invalidation strategy if needed
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
layer/services/pythClient.ts
(1 hunks)
🔇 Additional comments (1)
layer/services/pythClient.ts (1)
4-7
:❓ Verification inconclusive
Verify staging URL usage in production.
The new endpoint points to a staging environment (
staging.vercel.app
). Please confirm if this is intentional or if we should be using a production URL instead.
🏁 Script executed:
#!/bin/bash # Check if the staging URL is referenced elsewhere in the codebase rg "injective-nuxt-api-staging" -lLength of output: 63
Action Required: Confirm Staging URL Intent
- The updated constant
NUXT_CACHE_PYTH_SERVICE_URL
now points to a staging endpoint (https://injective-nuxt-api-staging.vercel.app/api/v1/
).- Since the staging URL appears only in this file and no production endpoint is referenced elsewhere, please confirm that using this staging endpoint is intentional for this caching layer, or update it to a production URL if needed.
NOTE:
Currently it uses the STAGING nuxt api, we need to deploy the new api to the master branch on vercel and change the pyth url before deploying this.