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

Error message mislabeling in perform_swap_tokens_fixed_input #85

Open
costaarthur opened this issue Dec 20, 2024 · 0 comments
Open

Error message mislabeling in perform_swap_tokens_fixed_input #85

costaarthur opened this issue Dec 20, 2024 · 0 comments

Comments

@costaarthur
Copy link

Error message mislabeling in perform_swap_tokens_fixed_input

Problem

The error message in the require! macro inside the perform_swap_tokens_fixed_input function is incorrect. It states:
"Swap tokens fixed output: Back transfers expected 1 payment"
However, the function is named perform_swap_tokens_fixed_input, and the error message should reflect this.

Location in Code

You can find the issue in the following line of code:
perform_swap_tokens_fixed_input error message

Proposed Solution

Update the error message to:
"Swap tokens fixed input: Back transfers expected 1 payment"

Why This Matters

Clear and accurate error messages are crucial for debugging and understanding code behavior.

Steps to Reproduce

  1. Call the perform_swap_tokens_fixed_input function with an invalid number of back transfer payments.
  2. Observe the error message, which incorrectly references "Swap tokens fixed output."
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

No branches or pull requests

1 participant