Skip to content

Conversation

@ns212
Copy link
Contributor

@ns212 ns212 commented Oct 8, 2025

This pull request makes a small change to the API call in the coingecko function to ensure it always requests prices in USD, regardless of the input arguments.

  • The coingecko function in api/market_data.js now constructs the request URL using only the ids from the input arguments and sets vs_currencies to "usd" explicitly, ensuring consistent currency results.

@ns212 ns212 requested a review from Copilot October 8, 2025 11:52
@vercel
Copy link

vercel bot commented Oct 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
interbtc-ui-interlay Ready Ready Preview Comment Oct 8, 2025 0:05am
interbtc-ui-interlay-testnet Ready Ready Preview Comment Oct 8, 2025 0:05am
interbtc-ui-kintsugi Ready Ready Preview Comment Oct 8, 2025 0:05am
interbtc-ui-kintsugi-testnet Ready Ready Preview Comment Oct 8, 2025 0:05am

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the CoinGecko API call to always request prices in USD currency, ensuring consistent results regardless of input parameters.

  • Modifies URL construction to explicitly set vs_currencies to "usd"
  • Filters input arguments to only include ids parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}

const url = 'https://api.coingecko.com/api/v3/simple/price?' + new URLSearchParams(args)
const url = 'https://api.coingecko.com/api/v3/simple/price?' + new URLSearchParams({ids: args.ids, vs_currencies: "usd"} )
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

Missing closing parenthesis in URLSearchParams constructor call. The line should end with }) instead of } ).

Suggested change
const url = 'https://api.coingecko.com/api/v3/simple/price?' + new URLSearchParams({ids: args.ids, vs_currencies: "usd"} )
const url = 'https://api.coingecko.com/api/v3/simple/price?' + new URLSearchParams({ids: args.ids, vs_currencies: "usd"})

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

Running Lighthouse audit...

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.

2 participants