Wire FX conversion + deposit invoice creation into the booking hold #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The money path is stubbed, so the happy path can't complete end-to-end (even over HTTP).
Work
views_api.py:_to_sats()— replaceNotImplementedErrorwithlnbits.utils.exchange_rates.fiat_amount_as_satoshis(amount, currency); pass through unchanged forsat/sats. This is the single place FX happens; the result becomes the canonicalamount_satand must not be recomputed downstream.api_request_booking(and the Nostr equivalent) — after writing theheldbooking,create_invoice(wallet_id=room.wallet, amount=deposit_sat, extra={"tag": "chatelet", "booking_id": booking.id}), storepayment_hash, set statusawaiting_payment.Notes
tasks.py:on_invoice_paidalready keys offextra["tag"] == "chatelet"andget_booking_by_payment_hash, so once the invoice carries those, settle works.settings.deposit_percent(already computed intodeposit_sat).Acceptance
On FakeWallet: request a booking → receive a bolt11 → pay it → booking flips to
confirmed, dates hard-blocked.Shipped in PR #7 (FX conversion + deposit invoice into the booking hold) and released in catalog v0.1.0. Closing (auto-close phrasing never fired).