address_synchronizer.get_history now returns HistoryItem(NamedTuple)s
This commit is contained in:
@@ -94,9 +94,9 @@ class ElectrumGui:
|
||||
+ "%d"%(width[2]+delta)+"s"+"%"+"%d"%(width[3]+delta)+"s"
|
||||
messages = []
|
||||
|
||||
for tx_hash, tx_mined_status, delta, balance in reversed(self.wallet.get_history()):
|
||||
if tx_mined_status.conf:
|
||||
timestamp = tx_mined_status.timestamp
|
||||
for hist_item in reversed(self.wallet.get_history()):
|
||||
if hist_item.tx_mined_status.conf:
|
||||
timestamp = hist_item.tx_mined_status.timestamp
|
||||
try:
|
||||
time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
|
||||
except Exception:
|
||||
@@ -104,8 +104,9 @@ class ElectrumGui:
|
||||
else:
|
||||
time_str = 'unconfirmed'
|
||||
|
||||
label = self.wallet.get_label(tx_hash)
|
||||
messages.append( format_str%( time_str, label, format_satoshis(delta, whitespaces=True), format_satoshis(balance, whitespaces=True) ) )
|
||||
label = self.wallet.get_label(hist_item.txid)
|
||||
messages.append(format_str % (time_str, label, format_satoshis(delta, whitespaces=True),
|
||||
format_satoshis(hist_item.balance, whitespaces=True)))
|
||||
|
||||
self.print_list(messages[::-1], format_str%( _("Date"), _("Description"), _("Amount"), _("Balance")))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user