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

Display time remaining once voted and place bet async in backend to reduce loader time shown to users #373

Open
Tracked by #369
Natasha-GB opened this issue Aug 29, 2024 · 3 comments · May be fixed by #403
Open
Tracked by #369

Comments

@Natasha-GB
Copy link
Contributor

Natasha-GB commented Aug 29, 2024

Currently once you vote, you see the loader for 5-6 seconds - this is because the bet is being placed then. And post that, the “You have staked x tokens..” screen comes

What we want is once they vote, the staked token messaging screen comes right away and the bet placement takes place in backend asynchronously

@Natasha-GB Natasha-GB mentioned this issue Aug 29, 2024
4 tasks
@harshita-srivastava-yral
Copy link
Contributor

  • @Veercodeprog Study the optimistic UI and try to get the time remaining from client side instead of sending it to backend and displaying the loading.
  • Similarly, do the same for Wallet balance, keep the balance stored at client side, keep calculating and sending to backend. Once backend has insufficient balance it will send error to client which we can display.
  • User Current time - Created at = Time left for slot to end

@harshita-srivastava-yral
Copy link
Contributor

To be started today

@harshita-srivastava-yral
Copy link
Contributor

  • @harshitasrivastav28 to look into the preview link and give go ahead for the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants