fix: fiat invoice to Lightning msat conversion by applying real-time BTC FX quotes #7
Reference in New Issue
Block a user
Delete Branch "userAdityaa/caravel:fiat-to-msat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Stripe invoice amount_due is fiat minor units, not sats/msats. The previous billing logic incorrectly converted amount_due to msats via amount_due * 1000, which implicitly assumed a fixed fiat/BTC rate and caused over/underpayment risk. This change introduces explicit FX-based conversion and propagates invoice currency through both auto-pay and manual bolt11 flows.
Changes
get_invoice_bolt11path to pass currency to bolt11 generation.Closes #6
How to verify
LGTM
Thanks, was testing everything end-to-end on my side and removed the WIP label.