psbt_nostr: add EventListener comment to CosignerWallet
What changed, and why it matters
This commit only adds two explanatory comments to the code. It does not change any behavior, fix any bug, or alter any security mechanism. One comment clarifies that child classes of CosignerWallet must inherit from EventListener and register callbacks; the other notes that callbacks are registered in child classes. It is a documentation-only change.
No action needed. This is a non-functional documentation change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies electrum/plugins/psbt_nostr/psbt_nostr.py by adding a class-level comment to CosignerWallet and an inline comment inside on_event_proxy_set. No logic, inheritance, method signatures, or control flow changed. The @event_listener decorator remains in place and no runtime behavior is affected.
Changed components
electrum/plugins/psbt_nostr/psbt_nostr.pyInspect captured patch +2 / −1
diff --git a/electrum/plugins/psbt_nostr/psbt_nostr.py b/electrum/plugins/psbt_nostr/psbt_nostr.py
index 6d45349..9299844 100644
--- a/electrum/plugins/psbt_nostr/psbt_nostr.py
+++ b/electrum/plugins/psbt_nostr/psbt_nostr.py
@@ -74,7 +74,7 @@ class PsbtNostrPlugin(BasePlugin):
self.cosigner_wallets.pop(wallet)
-class CosignerWallet(Logger):
+class CosignerWallet(Logger): # children have to inherit EventListener and register callbacks
# one for each open window (Qt) / open wallet (QML)
# if user signs a tx, we have the password
# if user receives a dm? needs to enter password first
@@ -124,6 +124,7 @@ class CosignerWallet(Logger):
@event_listener
async def on_event_proxy_set(self, *args):
+ # note: the callbacks get registered in the child classes of CosignerWallet
if not (self.network and self.nostr_pubkey):
return
await self.stop()
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.