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: when trades for zero are requested don't throw #4522

Merged
merged 2 commits into from
Feb 10, 2022
Merged

Conversation

Chris-Hibbert
Copy link
Contributor

closes: #4114

Description

I thought no one needed to request zero prices, and so I threw in that
case. #4114 reveals a
situation where it will happen in ordinary circumstances.

Change the AMM code to respond with an empty amount when an empty
amount is offered, and vice versa.

Security Considerations

None

Documentation Considerations

None

Testing Considerations

Updated tests.

I thought no one needed to request zero prices, and so I threw in that
case.  #4114 reveals a
situation where it will happen in ordinary circumstances.

Change the AMM code to respond with an empty amount when an empty
amount is offered, and vice versa.
@Chris-Hibbert Chris-Hibbert added bug Something isn't working Small AMM labels Feb 10, 2022
@Chris-Hibbert Chris-Hibbert self-assigned this Feb 10, 2022
@Chris-Hibbert Chris-Hibbert requested a review from dckc February 10, 2022 17:19
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

looks straightforward

@Chris-Hibbert Chris-Hibbert added the automerge:no-update (expert!) Automatically merge without updates label Feb 10, 2022
@mergify mergify bot merged commit 428349e into master Feb 10, 2022
@mergify mergify bot deleted the 4114-swapForEmpty branch February 10, 2022 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMM automerge:no-update (expert!) Automatically merge without updates bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loadgen vault close causes amountGiven or amountWanted must be greater than 0
2 participants