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

fix: ensure 0 deltaFlow doesn't update state #550

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

philbow61
Copy link
Contributor

Description

This Pr fixes in issue in the way our trading limits handle subunit amounts. Before when :
deltaFlowUnits == 0
deltaFlowUnits was set to either 1 or -1 without checking whether the deltaFlow is 0.
This resulted in a swap with 0 amounts updating the trading limit state by -1.

Other changes

Tested

  • added new test ensuring sate is not updated on 0 deltaFlow

Related issues

Backwards compatibility

Documentation

@philbow61 philbow61 merged commit 161ec08 into develop Nov 25, 2024
5 checks passed
@philbow61 philbow61 deleted the feat/fix-deltaFlow-0-casting branch November 25, 2024 15:37
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.

3 participants