Skip to content

fix(flashcard): stop showing the raw lnurlw payload in the unsupported-card toast - #723

Merged
islandbitcoin merged 2 commits into
mainfrom
fix/flashcard-toast-payload
Sep 23, 2026
Merged

islandbitcoin merged 2 commits into
mainfrom
fix/flashcard-toast-payload

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

Why

Follow-up from #721. In getPayDetails, when the tapped card is not a withdrawRequest, the error toast interpolated the full lnurlw payload and the LNURL server's reason string on screen. The payload carries the card's p/c parameters.

What

Fixed text only: "This card is not set up as a Flashcard. Please tap a Flashcard." Neither the payload nor the server reason is rendered. The catch-path toast was already fixed text.

Two tests added to the Flashcard spec, both with synthetic parameter-bearing input (a payRequest tag and an {status: "ERROR", reason} object whose strings contain the card URL, k1 and callback): they assert the toast message and that no secret appears in any toast argument or console output. No card or payment behaviour changes.

Stacked on #721 (base branch fix/flashcard-log-withdraw-params); retarget to main once #721 merges.

Validation

  • yarn check-code green.
  • yarn test full suite green (see PR checks / Buzz issue for counts).

Buzz issue: 92194f3413c76c4d410136c2e53a01f57ca9005c7c09048dccf172be7f742155

🤖 Generated with Claude Code

@islandbitcoin
islandbitcoin force-pushed the fix/flashcard-log-withdraw-params branch from a27982a to eb81819 Compare September 22, 2026 23:12
@islandbitcoin
islandbitcoin force-pushed the fix/flashcard-toast-payload branch from d508a0b to 773d366 Compare September 22, 2026 23:12
@islandbitcoin
islandbitcoin changed the base branch from fix/flashcard-log-withdraw-params to main September 23, 2026 18:16
…d-card toast

When a tapped card resolves to something other than a withdrawRequest,
the toast interpolated the full lnurlw payload (which carries the card's
p/c parameters) and the LNURL server's reason string into the message.
Replace both with fixed, actionable text. Tests cover the non-withdraw
tag and the error-object response with synthetic parameter-bearing input
and assert nothing sensitive reaches the toast or the console.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@islandbitcoin
islandbitcoin force-pushed the fix/flashcard-toast-payload branch from 773d366 to e3d097a Compare September 23, 2026 18:17
Review fix: the error-object test only asserted a toast fired. It now
pins the fixed Flashcard message via objectContaining, scans console
output for card secrets like the sibling tests, and asserts k1 stays
unset.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@islandbitcoin
islandbitcoin merged commit 408d206 into main Sep 23, 2026
9 checks 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