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

chore(tests): integration test for swapping in #378

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jfbloom22
Copy link

@jfbloom22 jfbloom22 commented Aug 19, 2024

  • Increases integration test coverage
  • Serves as an example to others looking to implement swap in as well as a good integration test

What else should I improve?

  • Considered adding a test swapping DAI for WETH.

@@ -242,7 +242,7 @@ describe('UniversalRouter', () => {

const wethAmount = ethers.utils.parseEther('1')

planner.addCommand(CommandType.WRAP_ETH, [alice.address, wethAmount])
planner.addCommand(CommandType.WRAP_ETH, [router.address, wethAmount])
Copy link
Author

Choose a reason for hiding this comment

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

I originally had
planner.addCommand(CommandType.WRAP_ETH, [alice.address, wethAmount])
but I believe it is ideal to send the wrapped ETH to the router before using it to swap for DAI. Can anyone confirm?

@jfbloom22
Copy link
Author

@marktoda anything I can improve in my PR? Thanks!

@jfbloom22 jfbloom22 changed the title added integration test for swapping in chore(public): integration test for swapping in Oct 2, 2024
@jfbloom22 jfbloom22 changed the title chore(public): integration test for swapping in chore(tests): integration test for swapping in Oct 2, 2024
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.

1 participant