Skip to content
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

feat(ratios): always return 24h change in GetRelative service #2783

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

onyb
Copy link
Collaborator

@onyb onyb commented Mar 11, 2025

Summary

GetRelative appears to be triggering a request to fetch market chart for single coingecko id requests, for a piece of data which doesn't seem to be that useful to Brave Wallet.

We'll now always be copying the 24H % change to <currency>_timeframe_change field, ignoring whatever duration is specified by the caller. In the future, we'll remove duration as a parameter to the corresponding controller since it doesn't make semantic sense to have it.

Related to brave/brave-browser#44557

Type of Change

  • Product feature
  • Bug fix
  • Performance improvement
  • Refactor
  • Other

Tested Environments

  • Development
  • Staging
  • Production

Before Requesting Review

  • Does your code build cleanly without any errors or warnings?
  • Have you used auto closing keywords?
  • Have you added tests for new functionality?
  • Have validated query efficiency for new database queries?
  • Have documented new functionality in README or in comments?
  • Have you squashed all intermediate commits?
  • Is there a clear title that explains what the PR does?
  • Have you used intuitive function, variable and other naming?
  • Have you requested security and/or privacy review if needed
  • Have you performed a self review of this PR?

Manual Test Plan

Ensure hitting the endpoint returns the 24h change regardless of the duration. For example, the following endpoints should have the same result for usd_timeframe_change:

@onyb onyb self-assigned this Mar 11, 2025
@onyb onyb requested review from clD11 and jen140 as code owners March 11, 2025 17:49
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