Skip to content

Conversation

@nimcon
Copy link
Contributor

@nimcon nimcon commented Aug 23, 2021

Fix for Uniswap v3 behaviour when ETH is the input or output token, resolving issues #154 and #155. There has also been some general tidying-up of parts of the code. Basic tests for all v3 scenarios have been run, but it would be good to check edge cases and verify that v1 and v2 still work as expected.

@romanbsd
Copy link
Contributor

Cool! I didn't get to do it, and it's pretty much what I had in mind!

slippage = self.default_slippage

if input_token == output_token:
raise ValueError
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe assert input_token != output_token is better?

Copy link
Member

@ErikBjare ErikBjare left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. Ran tests locally and works well!

A couple of unrelated tests failed, but that's my bad, and they're not testing anything important.

@ErikBjare ErikBjare merged commit c177a87 into uniswap-python:master Sep 17, 2021
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