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

fix: change tv datafeed to hook for reset cache #1131

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Conversation

aforaleka
Copy link
Contributor

idk what exactly is wrong, but bug was introduced with calling onResetCacheNeededCallback in subscribeBars which in hindsight seems bad; some value is unexpectedly null and older candles aren't processed correctly. removing that fixes it, but we'll still want to reset the cache when display unit is updated and then call reset on chart

fix: make the datafeed function into a hook to save the reference to onResetCacheNeededCallback, so we can call it in the right place and not every time we subscribe bars

testing:

  • before on mainnet, observe scrolling back to older candles on SOL / 5minute will fail and stuck at the "..." loading state
  • now, this should work

@aforaleka aforaleka requested a review from a team as a code owner October 14, 2024 17:46
Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v4-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 14, 2024 8:15pm
v4-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 14, 2024 8:15pm

@aforaleka aforaleka merged commit b13c383 into main Oct 15, 2024
9 checks passed
@aforaleka aforaleka deleted the fix-tv-candles-reset branch October 15, 2024 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants