mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
Verify the invoice returned when creating a swap out before storing and paying it: - the invoice payment hash must match the payment hash of the locally generated preimage - the invoice amount must not exceed the requested amount plus the quoted service and miner fees (with a small rounding tolerance) - the lockup address is checked against the swap tree, matching the checks already performed for swap in and refunds - the invoice is verified again directly before it is paid Also renames AlbySwapServiceFee to AlbySwapServiceFeePercentage for clarity. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| swaps_service.go | ||
| swaps_service_test.go | ||