Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

fix: correct nearIntentsBaseURL#547

Merged
jobotics merged 1 commit into
betafrom
fix/base-url
Jul 17, 2025
Merged

fix: correct nearIntentsBaseURL#547
jobotics merged 1 commit into
betafrom
fix/base-url

Conversation

@jobotics

@jobotics jobotics commented Jul 17, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Updated the production environment configuration with a new base URL for improved connectivity.

@jobotics
jobotics requested a review from cawabunga-bytes July 17, 2025 18:32
@coderabbitai

coderabbitai Bot commented Jul 17, 2025

Copy link
Copy Markdown

Walkthrough

The base URL for the nearIntentsBaseURL in the production environment configuration was updated to a new domain. No other logic or configuration changes were introduced.

Changes

File(s) Change Summary
src/config.ts Updated the production nearIntentsBaseURL to a new domain endpoint.

Poem

A hop and a skip, a URL anew,
From "app" to the root, the path is true.
The code now points where it should be,
A gentle nudge for connectivity.
With every deploy, we rabbits cheer—
The right intent is finally here! 🥕

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 99956fd and 244e592.

📒 Files selected for processing (1)
  • src/config.ts (1 hunks)

Comment thread src/config.ts
solverRelayBaseURL: "https://solver-relay-v2.chaindefuser.com",
managerConsoleBaseURL: "https://api-mng-console.chaindefuser.com/api/",
nearIntentsBaseURL: "https://app.near-intents.org/api/",
nearIntentsBaseURL: "https://near-intents.org/api/",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify reachability & downstream concatenation assumptions for new base URL

The domain changed from app.near-intents.org to near-intents.org.

  1. Make sure the new endpoint is already live and does not rely on HTTP → HTTPS or sub-domain redirects, otherwise SDK calls will break in production.
  2. All call-sites that append path segments must account for the preserved trailing slash; absence/presence mismatches can silently produce URLs with double slashes or missing separators.

Run the quick grep below to surface any concatenations that may already include a leading slash (look for /${config.env.nearIntentsBaseURL}-style patterns):


🏁 Script executed:

#!/bin/bash
# List files where nearIntentsBaseURL is concatenated with a literal '/'
rg --line-number --fixed-strings "${config.env.nearIntentsBaseURL}/" || true

Length of output: 122


🏁 Script executed:

#!/bin/bash
# Search for all references to nearIntentsBaseURL to inspect how it’s used/concatenated
rg --line-number -C2 "nearIntentsBaseURL" || true

Length of output: 1197


🏁 Script executed:

#!/bin/bash
set -e

echo "Testing production endpoint (near-intents.org/api/):"
curl -Is http://near-intents.org/api/ | head -n1
curl -Is https://near-intents.org/api/ | head -n1

echo
echo "Testing stage endpoint (stage.near-intents.org/api/):"
curl -Is http://stage.near-intents.org/api/ | head -n1
curl -Is https://stage.near-intents.org/api/ | head -n1

Length of output: 555


Confirm direct HTTPS & trailing‐slash behavior for nearIntentsBaseURL

File: src/config.ts
Line: 34

nearIntentsBaseURL: "https://near-intents.org/api/",

Requests to both near-intents.org/api/ and stage.near-intents.org/api/ currently return HTTP 301/308 redirects:

  • http://…/api/ → 301 Moved Permanently (to HTTPS)
  • https://…/api/ → 308 Permanent Redirect
  1. Ensure your SDK’s HTTP client automatically follows these redirects in production, or update the base URL to point directly at the final HTTPS endpoint (e.g. https://near-intents.org/api without the trailing slash) to avoid extra round-trips or potential breakage.
  2. I searched for all nearIntentsBaseURL references and found one concatenation:
    • src/queries/solverLiquidityQuerires.ts (line 20):
    url: `${globalConfig.env.nearIntentsBaseURL}solver_liquidity`
    This is correct given the trailing slash. No other call-sites append a leading slash—please keep future concatenations consistent with the preserved slash semantics to prevent malformed URLs.
🤖 Prompt for AI Agents
In src/config.ts at line 34, the nearIntentsBaseURL includes a trailing slash
causing HTTP redirects when used. To fix this, remove the trailing slash from
the URL to directly use the final HTTPS endpoint (change to
"https://near-intents.org/api"). Also, ensure all future URL concatenations
respect this no-trailing-slash format by adding slashes explicitly in
concatenations to avoid malformed URLs, as currently done in
src/queries/solverLiquidityQuerires.ts line 20.

@jobotics
jobotics merged commit 7b15f1d into beta Jul 17, 2025
3 checks passed
@jobotics
jobotics deleted the fix/base-url branch July 17, 2025 18:38
amdefuse pushed a commit that referenced this pull request Jul 17, 2025
## [1.0.0-beta.203](v1.0.0-beta.202...v1.0.0-beta.203) (2025-07-17)

### Bug Fixes

* correct nearIntentsBaseURL ([#547](#547)) ([7b15f1d](7b15f1d))
@amdefuse

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.0-beta.203 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants