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

check_limits_within: clarify meaning of amount arg #69

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

ok300
Copy link
Contributor

@ok300 ok300 commented Aug 27, 2024

Before, limits.within() and check_limits_within() checked if the output_amount was within the limits min / max.

However, interacting with the Boltz Web UI shows that the limits validation actually applies to the input amount, i.e. the amount that will be swapped.

This PR renames the output_amount to swap_amount for clarity.

@michael1011 michael1011 requested a review from i5hi August 27, 2024 10:59
@ok300
Copy link
Contributor Author

ok300 commented Aug 27, 2024

I checked all swap types in the Boltz UI and it's a bit more complicated:

Swap Type Checked to fit within pair limits Notes
LN -> BTC input invoice amount
BTC -> LN output invoice amount
LN -> LBTC input invoice amount
LBTC -> LN output invoice amount
BTC <-> LBTC input

I'll mark this as a draft until I figure out a simple way to cover all these cases.

@ok300 ok300 marked this pull request as draft August 27, 2024 12:30
@i5hi
Copy link
Collaborator

i5hi commented Sep 4, 2024

Hey @ok300 Please setup commit signing.

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