boltz-rust
boltz-rust copied to clipboard
`check_limits_within`: clarify meaning of amount arg
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.
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.
Hey @ok300 Please setup commit signing.
I think this is not necessary anymore.