SatoshiPortal / boltz-rust

Boltz client rust crate
https://docs.boltz.exchange
30 stars 19 forks source link

fix: invalid unit comparison in `lnurl` tests #77

Closed claddyy closed 1 month ago

claddyy commented 1 month ago

https://github.com/SatoshiPortal/boltz-rust/blob/348a88136a5b5706a8964c44a2de2239ee0e7e31/src/util/lnurl.rs#L139

Here we were converting the amount from milli_satoshi to satoshi, but max_withdrawable returns us amount in satoshi. So it was fundamentally a wrong comparison. https://github.com/SatoshiPortal/boltz-rust/blob/348a88136a5b5706a8964c44a2de2239ee0e7e31/src/util/lnurl.rs#L147

nit: Also includes minor change in error message.