Repository navigation
Trigger a TUI alert for transactions with an output belonging to this wallet - #11016
TheButterZone wants to merge 2 commits into
Conversation
| curses.beep() | ||
|
|
||
| @event_listener | ||
| def on_event_new_transaction(self, wallet, tx): |
There was a problem hiding this comment.
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:
electrum/electrum/gui/qt/main_window.py
Line 922 in cdf9ceb
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.
There was a problem hiding this comment.
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.
| @event_listener | ||
| def on_event_wallet_updated(self, wallet): | ||
| self.need_update = True | ||
| curses.beep() |
There was a problem hiding this comment.
Can you squash the two commits? The second one reverts the changes of the first one.
There was a problem hiding this comment.
How do I do that exclusively on GitHub.com without permission to spesmilo/electrum
|
Superseded by #11019, I didn't intend for 11016 to be closed, never clicked that, & I'm blocked from reopening 11016. |
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 textfired this alert audibly & visibly (in dock) for https://mempool.space/testnet4/tx/b4ce0d6ccfc4cf79fbf4881c02adc89873190acadc8b5ce14254abc690297415Intended 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.