Skip to content

Add manual Lightning invoice top-up to budget modal#26

Merged
tomsmith8 merged 1 commit intomainfrom
feat/manual-invoice-topup
Apr 9, 2026
Merged

Add manual Lightning invoice top-up to budget modal#26
tomsmith8 merged 1 commit intomainfrom
feat/manual-invoice-topup

Conversation

@tomsmith8
Copy link
Copy Markdown
Contributor

Users with an existing L402 can now top up by generating a Lightning invoice, copying it, and paying from any wallet. Polls /balance every 3s until payment is detected, then confirms via /top_up_confirm.

Only shown when an L402 already exists in localStorage — users without one still need Sphinx or WebLN for the initial token.

@tomsmith8 tomsmith8 force-pushed the feat/manual-invoice-topup branch from 898646c to 63cfb67 Compare April 9, 2026 12:00
Redesign budget modal from single screen to multi-step flow:
- Step 1: Balance display with single Top Up button
- Step 2: Preset amount tiles (50/100/500/1000) + custom input
- Step 3: QR code invoice with copy button and balance polling

Sphinx users skip to payment directly. WebLN users pick amount
then pay via extension. Manual users (L402 but no wallet) get
QR invoice flow via /top_up_lsat with 5-minute polling timeout.

Adds qrcode.react, topUpLsat/topUpConfirm API functions, and
plan doc for future no-wallet invoice flow via /buy_lsat.
@tomsmith8 tomsmith8 force-pushed the feat/manual-invoice-topup branch from 63cfb67 to be24760 Compare April 9, 2026 12:17
@tomsmith8 tomsmith8 merged commit a73ccae into main Apr 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant