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

docs: fix comments for swap functions #7951

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tien
Copy link

@tien tien commented Mar 18, 2025

The comments imply that all paths besides the first 2 will be ignored.

The comments imply that all paths besides the first 2 will be ignored.
@tien tien requested a review from a team as a code owner March 18, 2025 09:58
@@ -725,14 +725,14 @@ pub mod pallet {
}

impl<T: Config> Pallet<T> {
/// Swap exactly `amount_in` of asset `path[0]` for asset `path[1]`.
/// Swap exactly `amount_in` of asset `path[0]` for asset `path[last]`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should precise that it swaps 0 with 1 then 1 with 2 until last no?

but I don't know how to phrase it.

Copy link
Author

@tien tien Mar 18, 2025

Choose a reason for hiding this comment

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

This is consistent with the comment for do_swap_exact_credit_tokens_for_tokens, I can change both if you think that's better of course.

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.

2 participants