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

fix: psbt_nostr: don't allow to save tx without txid

Public commit record

What the developer wrote

Authored by f321x

85/100 · Strong
fix: psbt_nostr: don't allow to save tx without txid

Stops the psbt nostr plugin from trying to save transactions without
txid to the wallet history and doesn't give the user the option to do
so.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's PSBT-over-Nostr plugin. Previously, the plugin could try to save a Bitcoin transaction to the wallet history even when the transaction didn't yet have a transaction ID (txid). Such transactions are incomplete (for example, unsigned legacy transactions). Saving them could cause errors, confusion, or corrupt wallet state. The fix adds a check that prevents saving unless a txid exists, and hides or disables the 'Save to Wallet' button in the user interface when saving isn't allowed.

Recommended action

Reviewers should verify that all code paths which call add_transaction_to_wallet() in the psbt_nostr plugin now guarantee a txid, and that the UI no longer offers save actions for txid-less transactions. Consider whether the new assertion could raise unexpectedly in legitimate edge cases and whether downstream wallet recovery handles skipped saves gracefully.

Security signals we found

01

Prevents saving incomplete transactions without txid to wallet history

02

Adds assertion enforcing txid presence before wallet persistence

03

UI now conditionally hides 'Save to Wallet' when txid is absent

04

Improves error logging by passing error message to on_add_fail

05

Avoids potential wallet state corruption or crashes from invalid transaction records

Risk score

Why this scored 34/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/10
Evidence quality 4/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.