fix: prevent satoshis_now overwrite in OrderView#2414
Open
FedericoLuque wants to merge 2 commits intoRoboSats:mainfrom
Open
fix: prevent satoshis_now overwrite in OrderView#2414FedericoLuque wants to merge 2 commits intoRoboSats:mainfrom
FedericoLuque wants to merge 2 commits intoRoboSats:mainfrom
Conversation
Member
|
@FedericoLuque Can you add some test cases to |
KoalaSat
reviewed
Feb 5, 2026
| take_order.exists() | ||
| and order.status >= Order.Status.PUB | ||
| and order.status < Order.Status.WF2 | ||
| ): |
Member
There was a problem hiding this comment.
Adding not(...) with and inside is always confusing, better to just negate take_order.exists() and add regular ands for status
Contributor
Author
|
@KoalaSat I haven't been able to deploy the application locally to visually verify the change; I've had a lot of trouble trying. But the tests I've created are passing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #2412
This PR fixes a bug in
api/views.pywhere the satoshis_now value was being unconditionally overwritten by order.last_satoshis at the end of the OrderView processing.Checklist before merging
pip install pre-commit, thenpre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.