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

Add usage of swap(-x) in test #194

Merged
merged 4 commits into from
Dec 11, 2023
Merged

Add usage of swap(-x) in test #194

merged 4 commits into from
Dec 11, 2023

Conversation

uri-99
Copy link
Collaborator

@uri-99 uri-99 commented Dec 4, 2023

This PR makes use of swap(-x) in the test.
swap(-x) means swap(amount_out = x),
while swap(x) means swap(amount_in = x)

This new way of defining amount_to_swap avoids bug of unintended panic when swap(amount=0)

@rcatalan98
Copy link
Collaborator

I'm not sure if this is desirable. We need to test this cases because the protocol is used this way right?

@uri-99 uri-99 merged commit 022d096 into test/swap Dec 11, 2023
3 checks passed
@uri-99 uri-99 deleted the test/fix-swap-out branch December 11, 2023 15:15
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.

None yet

4 participants