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

Use deltas to show amount history #506

Open
tdroxler opened this issue Jan 18, 2024 · 0 comments
Open

Use deltas to show amount history #506

tdroxler opened this issue Jan 18, 2024 · 0 comments

Comments

@tdroxler
Copy link
Member

tdroxler commented Jan 18, 2024

We made good progress in this PR to improve the amount history charts.

But to do even better we need to change the format and use deltas instead of actual amount for a given timestamp.

It will implies some changes on the FE side.

Instead of having a fix amount per timestamp, we will work with deltas.
If a user request from January 7 to January 9, we will show and compute ONLY:
Jan 7: +4 ALPH
Jan 8: -6 ALPH
Jan 9: +1 ALPH
If the user want to have it's full history balance, as the FE team will do for wallets, they will need first to fetch and cache the deltas from the beginning, then we re-opening the wallet, only the missing data will be fethched.

In the example above we see that if we do the math it's : -1 ALPH, but because we could have Jan 1: +100 ALPH.

I made a POC here The perfromance are much better

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 a pull request may close this issue.

1 participant