You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MAX on USD wallet → LNURL destination fills an amount that dead-ends at confirm when the real fee > 0 #692
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:
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).
Reserve a conservative fee heuristic (e.g. the wallet's recent LNURL fee p95) and state it in the note.
Accept the dead-end but catch the confirm-time error and offer a one-tap "retry with fee deducted".
Already fixed — closing.#702 (92bb95cf7, merged 2026-08-20, six days after this was filed) implemented option 1 from the list above; the issue just never got closed.
Verified on main rather than assumed:
probeLnurlFee is now a required argument of buildMaxAmountButton (max-amount-button.ts:105) — a caller that forgets to wire it fails to compile rather than silently degrading every USD LNURL send.
The USD LNURL branch calls it instead of the plain IBEX probe (max-amount-button.ts:222-231), and the call site mints a throwaway invoice at the probe amount purely to price it (send-bitcoin-details-screen.tsx:479). That invoice is never paid — Next mints a fresh one, which matters because they expire in 60s.
The dead-end itself is gone. The premise here was that MAX "deliberately falls back to filling the full balance." It no longer does: an unpriceable destination now yields { amount: 0, reason: "fee-unavailable" } (max-send-amount.ts:300-310) and the chip explains itself instead of filling the pad with an amount that will be refused. The code comment on that branch names this exact bug as the reason.
Option 2 (a fee heuristic) was considered and explicitly rejected in that same comment — nothing in the app knows what IBEX charges, so a guessed reserve would be invention, not estimation.
Activity
bobodread876 commentedon Aug 25, 2026
Already fixed — closing. #702 (
92bb95cf7, merged 2026-08-20, six days after this was filed) implemented option 1 from the list above; the issue just never got closed.Verified on
mainrather than assumed:probeLnurlFeeis now a required argument ofbuildMaxAmountButton(max-amount-button.ts:105) — a caller that forgets to wire it fails to compile rather than silently degrading every USD LNURL send.max-amount-button.ts:222-231), and the call site mints a throwaway invoice at the probe amount purely to price it (send-bitcoin-details-screen.tsx:479). That invoice is never paid — Next mints a fresh one, which matters because they expire in 60s.{ amount: 0, reason: "fee-unavailable" }(max-send-amount.ts:300-310) and the chip explains itself instead of filling the pad with an amount that will be refused. The code comment on that branch names this exact bug as the reason.Option 2 (a fee heuristic) was considered and explicitly rejected in that same comment — nothing in the app knows what IBEX charges, so a guessed reserve would be invention, not estimation.
Related: #689, #690, ENG-554.
bobodread876 commentedon Aug 25, 2026
Fixed by #702 — see the verification above.