boltz-rust icon indicating copy to clipboard operation
boltz-rust copied to clipboard

`check_limits_within`: clarify meaning of amount arg

Open ok300 opened this issue 1 year ago • 2 comments

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.

ok300 avatar Aug 27 '24 09:08 ok300

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 avatar Aug 27 '24 12:08 ok300

Hey @ok300 Please setup commit signing.

i5hi avatar Sep 04 '24 08:09 i5hi

I think this is not necessary anymore.

ok300 avatar Dec 15 '24 13:12 ok300