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

It's possible to go negative with Tap #193

Open
redfast00 opened this issue Oct 26, 2022 · 0 comments
Open

It's possible to go negative with Tap #193

redfast00 opened this issue Oct 26, 2022 · 0 comments
Labels
bug Something isn't working first-good-issue Good for newcomers level: medium

Comments

@redfast00
Copy link
Member

redfast00 commented Oct 26, 2022

Steps to reproduce:

  1. have 0.60 euro balance on Tab
  2. Order 1 Ice-tea (costs 60 cents)
  3. Within 5 minutes, order another Ice-tea
  4. After 5 minutes, your balance will now be -0.60 euro

This is because pending orders don't get factored in when getting the users balance. A way to fix this would be to update the balance method (https://github.com/ZeusWPI/Tap/blob/master/app/models/user.rb#L73) to also factor in pending orders.

@redfast00 redfast00 added bug Something isn't working level: medium first-good-issue Good for newcomers labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working first-good-issue Good for newcomers level: medium
Projects
None yet
Development

No branches or pull requests

1 participant