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

imp(transfer): allow unwinding of multiple tokens #6841

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

DimitrisJim
Copy link
Contributor

@DimitrisJim DimitrisJim commented Jul 16, 2024

Description

closes: #6838


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

- Add getUnwindHops helper that iterates over all coins, ensures hop is equal for all and returns the full hops.
- Tweak unwind hops to call getUnwindHops, and assign values to hops, source port, source channel.
- Remove validation condition that forbids multiple coins when unwind is true.
@DimitrisJim DimitrisJim force-pushed the jim/6838-unwind-multiple-tokens branch from 33cbd72 to 47f5081 Compare July 17, 2024 08:22
@DimitrisJim DimitrisJim changed the title Allow unwinding of multiple tokens imp(transfer): allow unwinding of multiple tokens Jul 17, 2024
Copy link

sonarcloud bot commented Jul 17, 2024

Quality Gate Failed Quality Gate failed for 'ibc-go'

Failed conditions
59.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

Fantastic work, @DimitrisJim! Thank you also for updating the docs.

@crodriguezvega crodriguezvega added the priority PRs that need prompt reviews label Jul 17, 2024
Copy link
Contributor

@gjermundgaraba gjermundgaraba left a comment

Choose a reason for hiding this comment

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

Changes look good. I would feel slightly more comfortable if the getUnwindHops was united tested as the logic is important. I imagine we do unit test it elsewhere, but it seems like an easy one to actually unit test :) But happy to have it tested more indirectly also.

@DimitrisJim
Copy link
Contributor Author

the getUnwindHops was united tested as the logic is important

Made it into a function so as to not clutter unwindHops, could've inlined it there. Perfectly fine if we want to add tests for both individually.

@DimitrisJim DimitrisJim added this pull request to the merge queue Jul 17, 2024
Merged via the queue into main with commit 8d1cd7c Jul 17, 2024
70 of 72 checks passed
@DimitrisJim DimitrisJim deleted the jim/6838-unwind-multiple-tokens branch July 17, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority PRs that need prompt reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unwind multiple tokens if they all have exactly the same trace
4 participants