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

wallet: fix AttributeError when getting help text

Public commit record

What the developer wrote

Authored by f321x

76/100 · Adequate
wallet: fix AttributeError when getting help text

Fixes AttributeError when trying to get `num_sats_can_receive()` in
wallets without lnworker. Fixes https://github.com/spesmilo/electrum/issues/8100#issuecomment-3294556043.

```
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/electrum/gui/qt/request_list.py", line 103, in selection_changed
self.receive_tab.update_current_request()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/electrum/gui/qt/receive_tab.py", line 237, in update_current_request
help_texts = self.wallet.get_help_texts_for_receive_request(req)
File "/usr/lib/python3.13/site-packages/electrum/wallet.py", line 3446, in get_help_texts_for_receive_request
can_receive = self.lnworker.num_sats_can_receive()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'num_sats_can_receive'
```
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This is a simple bug fix for a crash in the Electrum Bitcoin wallet. When a user without Lightning support clicked on a receive request, the wallet tried to check Lightning receive capacity on a missing component and crashed with an AttributeError. The patch adds a safety check so the code skips the Lightning check when no Lightning worker exists. There is no security vulnerability here—just a UI crash being fixed.

Recommended action

No security action needed. Treat as a normal stability bug fix. Users on affected versions can avoid the crash by not selecting receive requests in wallets without Lightning, or upgrade to the patched version.

Security signals we found

01

None - this is a null-pointer/AttributeError crash fix, not a security issue

Risk score

Why this scored 21/100

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