Skip to content

MAX on USD wallet → LNURL destination fills an amount that dead-ends at confirm when the real fee > 0 #692

Description

@islandbitcoin

Found during the #689 review. The USD wallet has no fee probe for LNURL destinations before an invoice exists, so MAX deliberately falls back to filling the full balance (documented in buildMaxAmountButton). Whenever the real fee is > 0, that amount then fails at confirm with the amount-exceeds-balance error — the same wall a user hits typing their full balance manually, but the MAX chip now actively invites it.

Options, roughly in order of preference:

  1. Request a throwaway invoice at the cap-clamped balance during the MAX computation and run the normal fee probe against it (cost: one extra invoice round-trip on tap).
  2. Reserve a conservative fee heuristic (e.g. the wallet's recent LNURL fee p95) and state it in the note.
  3. Accept the dead-end but catch the confirm-time error and offer a one-tap "retry with fee deducted".

Related: #690 (displayed vs spendable balance), #689 (MAX button), flash#480 (fractional balance serving).

🤖 Generated with Claude Code

https://claude.ai/code/session_015fAxSGEsL2LsMx1uCjAzHH

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions