Wallet Activity Notification Feature #1239
Replies: 1 comment
-
Well, that sounds cool :-).
That's one possibility but Bitcoin-core has a better one: ZeroMQ. We can have nearly instant notification and don't have to rely on pulling with ZMQ.
We should imho store wallet-specific stuff in the wallet-folder. Check
I'd suggest a new Manager similiar to WalletManager, UserManager and so on. Check
Looking forward to your PR. In the meantime i'll try to get the API ready :-). But maybe let's wait also on comments from @stepansnigirev and @ben-kaufman |
Beta Was this translation helpful? Give feedback.
-
@ben-kaufman @k9ert
Looking into creating a wallet activity notification feature. Wanted to get your guidance on best way to implement this. This is something I've implemented in the WARden and think could be a useful feature for Specter. Quick overview on how this could work.
When application launches, start a background job that checks for activity every [n] seconds
. Does the app already have any background jobs method that could be reused / based off?
Suggestion would be to do something along these lines:
A dictionary is saved as a pickle on default home folder (i.e. ~/specter ?):
When checking for activity, the latest hashes are checked against the pkl file. If changes detected, an icon appears by the wallet name on the menu bar: 'Activity Detected since last checkpoint'. A 'dismiss' button would save the pkl file with the latest checkpoint and stop notifying the user. Notification will keep being displayed until 'dismiss' is clicked.
Include in the
specter
class, a new dictionary:wallet_activity
so it's easily accessible across html jinja2 templates:latest_status
andpkl_status
are dictionaries in the format listed at (2). Saving both will make it easy to check which wallets have balance change and/or txs.If this is acceptable and you believe this to be a useful feature, I'm happy to work on some initial code and submit a PR.
This could also be enhanced later to send e-mail notifications, etc. But would need to consider potential risks.
Beta Was this translation helpful? Give feedback.
All reactions