1
0

Reworked notification flow and combined multiple transactions into one notification

This commit is contained in:
Maran
2013-06-17 15:12:20 +02:00
parent b6ced19c1e
commit 06bfb60308
3 changed files with 29 additions and 11 deletions

View File

@@ -90,7 +90,7 @@ class Interface(threading.Thread):
self.unanswered_requests = {}
#banner
self.banner = ''
self.pending_transactions = []
self.pending_transactions_for_notifications= []
def queue_json_response(self, c):

View File

@@ -682,8 +682,7 @@ class Wallet:
with self.transaction_lock:
self.transactions[tx_hash] = tx
self.interface.pending_transactions.append(tx)
self.interface.trigger_callback("new_transaction")
self.interface.pending_transactions_for_notifications.append(tx)
self.save_transactions()
if self.verifier and tx_height>0:
@@ -1192,6 +1191,7 @@ class WalletSynchronizer(threading.Thread):
if self.was_updated and not requested_tx:
self.interface.trigger_callback('updated')
self.interface.trigger_callback("new_transaction") # Updated gets called too many times from other places as well; if we use that signal we get the notification three times
self.was_updated = False