Skip to content

fix(wallet/price): URL-encode mintAddress query parameter - #1466

Open
rajanpanth wants to merge 1 commit into
SuperteamDAO:mainfrom
rajanpanth:pr2-encode-mint
Open

fix(wallet/price): URL-encode mintAddress query parameter#1466
rajanpanth wants to merge 1 commit into
SuperteamDAO:mainfrom
rajanpanth:pr2-encode-mint

Conversation

@rajanpanth

@rajanpanth rajanpanth commented Aug 12, 2026

Copy link
Copy Markdown

mintAddress comes from the request query string and was interpolated into the upstream Jupiter price URL unescaped. Wrapped in encodeURIComponent so reserved characters can't alter the outgoing request.

Behaviour for valid mint addresses is unchanged. Formatting follows oxfmt.

pnpm check-types and pnpm lint pass.

Summary by CodeRabbit

  • Bug Fixes
    • Improved wallet token price lookups by safely encoding token addresses in API requests.
    • Preserved existing request headers and 60-second price refresh behavior.

mintAddress comes from the request query string and was interpolated
into the upstream price API URL unescaped. Wrap it in encodeURIComponent
so reserved characters can't alter the outgoing request.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@rajanpanth is attempting to deploy a commit to the Superteam Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 77f8f1d2-205b-4d8f-b5f8-233593cf5434

📥 Commits

Reviewing files that changed from the base of the PR and between af39bd1 and daca298.

📒 Files selected for processing (1)
  • src/app/api/wallet/price/route.ts

Walkthrough

The wallet price route now URL-encodes the token mint address in the Jupiter API request. Existing request headers and 60-second revalidation remain unchanged.

Changes

Wallet price API

Layer / File(s) Summary
Encode mint address
src/app/api/wallet/price/route.ts
The Jupiter API URL applies encodeURIComponent to mintAddress. The API key header and 60-second revalidation remain unchanged.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: a20hek

Poem

A rabbit hops through encoded trails,
Mint addresses ride safely in query sails.
Headers stay steady, refresh clocks shine,
Jupiter receives each value in line.
Flopsy approves the tidy design.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: URL-encoding the mintAddress query parameter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant