AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 33 Bitcoin

TxEditor: move swap request to TxEditor

Public commit record

What the developer wrote

Authored by f321x

68/100 · Adequate
TxEditor: move swap request to TxEditor

Moves the logic requesting the forward swap into the TxEditor so it can
use the open transport and doesn't have to reconnect to the relays
again.

Also disables the "Preview" button in the TxEditor when the transaction will
send change to lightning.
This should prevent the user from saving the transaction to history and
broadcasting it later or exporting it and broadcasting it through some
external way.
Broadcasting needs to happen directly after the TxEditor so we can send
the second rpc call to the swapserver and await the incoming htlcs
before broadcasting the (funding-) transaction.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit moves the code that requests a 'swap invoice' from the send tab into the transaction editor dialog. It also disables the Preview button when a transaction will send leftover change into a Lightning swap. The goal is to make sure the swap is requested over the already-open connection and to stop users from saving or exporting a swap transaction and broadcasting it later, because the swap server needs to be told about the transaction right before it is broadcast. The change is a defensive hardening measure rather than a fix for an active exploit.

Recommended action

Treat as a hardening/refactoring change. Review that request_forward_swap() failures correctly block accept() and that the swap transport is always initialized before TxEditor is opened for swap transactions. No urgent user action is required unless the project tags this as a security fix.

Security signals we found

01

Refactors swap request to use already-open transport, reducing reconnection attack surface

02

Disables Preview button when transaction sends change to Lightning swap

03

Prevents saving/exporting and later broadcasting of swap funding transactions

04

Ensures swapserver RPC and on-chain broadcast happen in the correct sequence

05

Adds defensive assertions for dummy swap output state

Risk score

Why this scored 33/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.