import { Show } from "solid-js" type Bolt11Status = "idle" | "loading" | "ready" | "error" // Presentational lightning payment body: loading/error/ready states, the bolt11 // QR + input, and copy. All fetching/QR generation stays in PaymentDialog and is // surfaced via accessors/callbacks. Props are reactive only when read lazily, so // access props.* inside JSX, never destructure signal-bearing props at the top. type LightningPayBodyProps = { bolt11Status: () => Bolt11Status bolt11: () => string qrDataUrl: () => string bolt11Error: () => string onRetry: () => void onCopy: () => void } export default function LightningPayBody(props: LightningPayBodyProps) { return ( <>
Generating invoice...

Unable to generate invoice

{props.bolt11Error()}

Lightning invoice QR code

Scan this QR code with a Bitcoin Lightning wallet to pay.

) }