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

Move the most recent value in sats of an order calculation to the backend #235

Merged

Conversation

KoalaSat
Copy link
Member

@KoalaSat KoalaSat commented Sep 9, 2022

Fixes: #224

The value calculated by

https://github.com/Reckless-Satoshi/robosats/blob/main/frontend/src/components/Charts/DepthChart/index.tsx#L84

Was already being calculated on the back-end, this PR exposes that value so it can be used for the depth chart generation.

Looks like updating the fork removed the original PR #226

@KoalaSat KoalaSat force-pushed the move-chart-satoshis-now-tp-api branch from 69279b8 to 2dcd1d4 Compare September 9, 2022 19:14
@KoalaSat KoalaSat changed the title Move chart satoshis now tp api Move the most recent value in sats of an order calculation to the backend Sep 9, 2022
@Reckless-Satoshi
Copy link
Collaborator

Just tested it locally and created 4 orders. The API calls works, each book order has satoshis_now. However the DepthChart does not appear (the spinner stays there). I cannot say whether this is an issue with this PR or of having too few orders since it is the first time I test the DepthChart on a local environment.

It might be best if you manage to run the stack locally as well, unfortunately this feature cannot be tested with the production backend. Another possible route is to split the PR in two. We first add satoshis_now to the backend, it will be safe to update the mainnet platform, then the frontend depthchart can be tested by itself.

@KoalaSat
Copy link
Member Author

Just tested it locally and created 4 orders. The API calls works, each book order has satoshis_now. However the DepthChart does not appear (the spinner stays there). I cannot say whether this is an issue with this PR or of having too few orders since it is the first time I test the DepthChart on a local environment.

It might be best if you manage to run the stack locally as well, unfortunately this feature cannot be tested with the production backend. Another possible route is to split the PR in two. We first add satoshis_now to the backend, it will be safe to update the mainnet platform, then the frontend depthchart can be tested by itself.

Let's go for the 2nd option, I'll create the PR

@KoalaSat
Copy link
Member Author

#236

@KoalaSat KoalaSat force-pushed the move-chart-satoshis-now-tp-api branch from 2dcd1d4 to fa045c9 Compare September 11, 2022 11:02
@KoalaSat
Copy link
Member Author

Found the problem with tesnet, it was caused by a very specific bug caused when the lastDayPremium was zero. Fixed now.
image

@Reckless-Satoshi Reckless-Satoshi merged commit 7fac926 into RoboSats:main Sep 11, 2022
@KoalaSat KoalaSat deleted the move-chart-satoshis-now-tp-api branch September 25, 2022 12:41
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.

Move the most recent value in sats of an order calculation to the backend
2 participants