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

Price calculator: update discounts on user balance changes #3047

Merged
merged 3 commits into from
Jul 1, 2024

Conversation

0oM4R
Copy link
Contributor

@0oM4R 0oM4R commented Jun 27, 2024

Description

The issue was that if the balance is updated, it will reflect in the userBlanance normally, but the task that calculates the discount is running in some cases, and none of them balance changes.

Changes

  • Add watcher to watch UserBalance and trigger PriceTask, this will update the discounts if the balance got changed

Related Issues

Documentation PR

For UI changes, Please provide the Documetation PR on info_grid

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

zaelgohary
zaelgohary previously approved these changes Jun 27, 2024
Copy link
Contributor

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job ya @0oM4R!

@zaelgohary zaelgohary dismissed their stale review June 27, 2024 09:45

Missing a condition

Copy link
Contributor

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the price cards are being updated when the user is not selecting current balance. The watcher logic should be done only if userBalance is true.

calculator.webm

@0oM4R 0oM4R marked this pull request as draft June 27, 2024 10:28
@0oM4R 0oM4R marked this pull request as ready for review June 27, 2024 10:35
@0oM4R 0oM4R requested a review from zaelgohary June 27, 2024 10:35
@0oM4R 0oM4R merged commit 788b94e into development_2.6 Jul 1, 2024
4 checks passed
@0oM4R 0oM4R deleted the development_2.6_priceCalc branch July 1, 2024 11:17
@xmonader xmonader added this to the 2.6.0 milestone Sep 24, 2024
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.

4 participants