diff options
| author | Adam Soltys <[email protected]> | 2026-07-31 08:31:55 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-07-31 08:31:55 -0700 |
| commit | 49da2555e84da4a461c070c0d7bb7032c6bb52e4 (patch) | |
| tree | c2f6b801c4259069e9b209b5d39a778253d2892a /src/app.js | |
| parent | ad281e832ed9e36b777f03ed54e799df7d70ffc9 (diff) | |
| download | coinosv3-49da2555e84da4a461c070c0d7bb7032c6bb52e4.tar.gz coinosv3-49da2555e84da4a461c070c0d7bb7032c6bb52e4.zip | |
Re-render the send form when a destination annotation appears
The lightning-address zap button is computed at render time, but onInput
only re-rendered when on-chain validity flipped — an lnaddr never does, so
the button never appeared. Track sendFormNote presence like readiness and
re-render on a flip. Verified with a headless-browser check.
Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2408,6 +2408,9 @@ function recipientRow(s, r, i) { const single = s.recipients.length === 1; const maxOn = single && s.max; r._ready = destReady(r.address); // reflected each render; onInput re-renders on a flip + // same idea for destination annotations (e.g. the lightning-address zap + // button): they only exist in the rendered tree, so a flip must re-render + r._note = !!featureHook('sendFormNote', r.address); // Updated imperatively on input (and on render) so paste, typing, and scan // all reflect immediately without disrupting the input's focus/cursor. @@ -2431,8 +2434,9 @@ function recipientRow(s, r, i) { const hadError = !!ui.sendError; ui.sendError = ''; // editing the destination starts over — drop stale errors if (tryFeature(v, true)) return; // a bolt11 advances to its own confirmation - // reveal/hide amount + controls as validity flips (or an error clears) - if (hadError || destReady(v) !== r._ready) render(); + // reveal/hide amount + controls as validity flips, an annotation + // (zap button) appears/disappears, or an error clears + if (hadError || destReady(v) !== r._ready || !!featureHook('sendFormNote', v) !== r._note) render(); }, }); const row = h( |
