refactor: drop the SatsPay/watchonly on-chain surface
v1.6.8 sells tickets on-chain through SatsPay charges — a per-purchase watchonly address, a hosted charge page, and a webhook back into the extension. We are not adopting that: on-chain goes through the fork's native LndRestWallet support once core can mint purpose-bound receiving addresses (aiolabs/lnbits#53). This is the parity note on #41, applied as its own commit so the merge it follows stays a faithful diff of what upstream shipped. Removed: - services: the five SatsPay/watchonly HTTP clients (and with them the only uses of httpx and typing.Any in that module) - views_api: _get_watchonly_status, GET /events/onchain/status, the SatsPay charge branch of api_ticket_create, POST /tickets/{id}/satspay-webhook, PUT /tickets/{hash}/onchain-confirm - models: EventExtra.onchain_{enabled,wallet_id,zeroconf,fasttrack}, TicketExtra.satspay_charge_id, TicketPaymentRequest.satspay_charge_url - frontend: the organiser's "Onchain payments" panel and its watchonly wallet picker, the per-ticket confirm-onchain button, the SatsPay charge-page redirect, and the wallet-status fetch behind them `onchain` is no longer an accepted payment_method — there is no rail to fulfil it until #41 lands, so accepting it could only fail later. Kept as vocabulary for #41, in upstream's field names so it needs no migration: TicketExtra.onchain / onchain_address and TicketPaymentRequest.onchain_amount_sat. 35 routes register with no duplicates; ruff, black, prettier clean; 97 tests pass; mypy error set still identical to HEAD's baseline.
This commit is contained in:
parent
ae5affa44f
commit
d90a0f8322
6 changed files with 10 additions and 377 deletions
13
models.py
13
models.py
|
|
@ -98,14 +98,6 @@ class EventExtra(EventExtraBase):
|
|||
# `sync_event_ticket_waves`), which is why fork code that reads them
|
||||
# needs auditing — aiolabs/events#61.
|
||||
ticket_waves: list[TicketWave] = Field(default_factory=list)
|
||||
# Upstream's SatsPay-backed on-chain config. Removed in the commit
|
||||
# that follows this merge — we use native lnbits on-chain instead
|
||||
# (aiolabs/events#41). Kept here so the removal is a legible diff
|
||||
# against what upstream shipped rather than an invisible omission.
|
||||
onchain_enabled: bool = False
|
||||
onchain_wallet_id: str | None = None
|
||||
onchain_zeroconf: bool = False
|
||||
onchain_fasttrack: bool = False
|
||||
|
||||
|
||||
PublicEventExtra = EventExtraBase
|
||||
|
|
@ -256,9 +248,11 @@ class TicketExtra(BaseModel):
|
|||
email_notification_sent: bool = False
|
||||
nostr_notification_sent: bool = False
|
||||
refunded: bool = False
|
||||
# On-chain vocabulary, populated once native lnbits on-chain lands
|
||||
# (aiolabs/events#41). Upstream's field names, minus the SatsPay charge
|
||||
# id — SatsPay is the implementation we are not adopting.
|
||||
onchain: bool = False
|
||||
onchain_address: str | None = None
|
||||
satspay_charge_id: str | None = None
|
||||
|
||||
|
||||
class CreateTicket(BaseModel):
|
||||
|
|
@ -368,7 +362,6 @@ class TicketPaymentRequest(BaseModel):
|
|||
# My Tickets.
|
||||
ticket_ids: list[str] = Field(default_factory=list)
|
||||
onchain_amount_sat: int | None = None
|
||||
satspay_charge_url: str | None = None
|
||||
|
||||
|
||||
class TicketFilters(FilterModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue