Skip to content

Trigger a TUI alert for transactions with an output belonging to this wallet - #11016

Closed
TheButterZone wants to merge 2 commits into
spesmilo:masterfrom
TheButterZone:master
Closed

TheButterZone wants to merge 2 commits into
spesmilo:masterfrom
TheButterZone:master

Conversation

@TheButterZone

@TheButterZone TheButterZone commented Oct 6, 2026 •

Copy link
Copy Markdown

If the user has enabled audible and/or visible terminal bell, this triggers a TUI alert for transactions with an output belonging to this wallet.

Verified: an unfocused terminal tab of 4.8.2 (in venv Electrum-4.8.2 % ./run_electrum -D ~/.electrum_testnet4 --testnet4 -g text fired this alert audibly & visibly (in dock) for https://mempool.space/testnet4/tx/b4ce0d6ccfc4cf79fbf4881c02adc89873190acadc8b5ce14254abc690297415

Screen Shot 2026-10-06 at 03 09 35

Intended behavior: this triggers even when the output is a change output from/to this same wallet, so the user can hear that their TX was broadcast & their returning change is pending confirmation. This resembles the ring of a cash register drawer being opened, which, with taxes & the ".99" pricing scheme, usually has change dispensed instead of just the exact amount due deposited. A non-change-returning transaction does not need such an alert on its sender's side.

@TheButterZone TheButterZone changed the title Add beep on TUI wallet update Trigger a TUI alert for transactions with an output belonging to this wallet Oct 6, 2026
@TheButterZone
TheButterZone marked this pull request as ready for review October 6, 2026 03:20
Comment thread electrum/gui/text.py
curses.beep()

@event_listener
def on_event_new_transaction(self, wallet, tx):

@f321x f321x Oct 6, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could become annoying as it will beep while the wallet is detecting transactions during sync.
You could duplicate the pattern the other UIs are using, see Qt:

def notify_transactions(self):

then maybe trigger the notification from the getch() loop?

If you can find a way to deduplicate some of the notification logic between the three UIs this might be even better.

@TheButterZone TheButterZone Oct 6, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt I can, it took too long with the increasingly-dumb/mislabeled LLMs & eventually having them fight each other just to get to this tiny bit of code.

Comment thread electrum/gui/text.py Outdated
@event_listener
def on_event_wallet_updated(self, wallet):
self.need_update = True
curses.beep()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you squash the two commits? The second one reverts the changes of the first one.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I do that exclusively on GitHub.com without permission to spesmilo/electrum

@TheButterZone
TheButterZone marked this pull request as draft October 6, 2026 13:08
@TheButterZone
TheButterZone marked this pull request as ready for review October 6, 2026 13:09
@TheButterZone
TheButterZone marked this pull request as draft October 6, 2026 19:11
@TheButterZone
TheButterZone deleted the branch spesmilo:master October 6, 2026 19:12
@TheButterZone
TheButterZone deleted the master branch October 6, 2026 19:12
@TheButterZone

Copy link
Copy Markdown
Author

Superseded by #11019, I didn't intend for 11016 to be closed, never clicked that, & I'm blocked from reopening 11016.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants