@@ -5345,22 +5345,19 @@ def doTheSystemTrayThing(self):
53455345 # If coins were either received or sent from the loaded wlt/lbox
53465346 dispLines = QStringList ()
53475347 totalStr = coin2strNZS (abs (le .getValue ()))
5348+ title = None
53485349 if le .getValue () > 0 :
53495350 title = self .tr ('Bitcoins Received!' )
53505351 dispLines .append (self .tr ('Amount: %1 BTC' ).arg (totalStr ))
53515352 dispLines .append (self .tr ('From: %2' ).arg (wltName ))
53525353 elif le .getValue () < 0 :
53535354 try :
5354- # Also display the address of where they went
5355- txref = TheBDM .bdv ().getTxByHash (le .getTxHash ())
5356- nOut = txref .getNumTxOut ()
53575355 recipStr = ''
5358- for i in range (0 , nOut ):
5359- script = txref .getTxOutCopy (i ).getScript ()
5360- if pywlt .hasScrAddr (script_to_scrAddr (script )):
5356+ for addr in le .getScrAddrList ():
5357+ if pywlt .hasScrAddr (addr ):
53615358 continue
53625359 if len (recipStr )== 0 :
5363- recipStr = self . getDisplayStringForScript ( script , 45 )[ 'String' ]
5360+ recipStr = hash160_to_addrStr ( addr [ 1 :], addr [ 0 ])
53645361 else :
53655362 recipStr = self .tr ('<Multiple Recipients>' )
53665363
@@ -5371,9 +5368,10 @@ def doTheSystemTrayThing(self):
53715368 except Exception as e :
53725369 LOGERROR ('tx broadcast systray display failed with error: %s' % e )
53735370
5374- self .showTrayMsg (title , dispLines .join ("\n " ), \
5375- QSystemTrayIcon .Information , 10000 )
5376- LOGINFO (title + '\n ' + dispLines .join ("\n " ))
5371+ if title :
5372+ self .showTrayMsg (title , dispLines .join ("\n " ), \
5373+ QSystemTrayIcon .Information , 10000 )
5374+ LOGINFO (title + '\n ' + dispLines .join ("\n " ))
53775375
53785376 # Wait for 5 seconds before processing the next queue object.
53795377 self .notifyBlockedUntil = RightNow () + 5
0 commit comments