fix #3964
This commit is contained in:
@@ -29,8 +29,7 @@ import datetime
|
|||||||
from electrum.wallet import AddTransactionException, TX_HEIGHT_LOCAL
|
from electrum.wallet import AddTransactionException, TX_HEIGHT_LOCAL
|
||||||
from .util import *
|
from .util import *
|
||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
from electrum.util import block_explorer_URL
|
from electrum.util import block_explorer_URL, profiler
|
||||||
from electrum.util import timestamp_to_datetime, profiler
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from electrum.plot import plot_history, NothingToPlotException
|
from electrum.plot import plot_history, NothingToPlotException
|
||||||
@@ -234,7 +233,6 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
|
|||||||
entry = ['', tx_hash, status_str, label, v_str, balance_str]
|
entry = ['', tx_hash, status_str, label, v_str, balance_str]
|
||||||
fiat_value = None
|
fiat_value = None
|
||||||
if value is not None and fx and fx.show_history():
|
if value is not None and fx and fx.show_history():
|
||||||
date = timestamp_to_datetime(time.time() if conf <= 0 else timestamp)
|
|
||||||
fiat_value = tx_item['fiat_value'].value
|
fiat_value = tx_item['fiat_value'].value
|
||||||
value_str = fx.format_fiat(fiat_value)
|
value_str = fx.format_fiat(fiat_value)
|
||||||
entry.append(value_str)
|
entry.append(value_str)
|
||||||
|
|||||||
@@ -419,6 +419,8 @@ def format_satoshis(x, is_diff=False, num_zeros = 0, decimal_point = 8, whitespa
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def timestamp_to_datetime(timestamp):
|
def timestamp_to_datetime(timestamp):
|
||||||
|
if timestamp is None:
|
||||||
|
return None
|
||||||
return datetime.fromtimestamp(timestamp)
|
return datetime.fromtimestamp(timestamp)
|
||||||
|
|
||||||
def format_time(timestamp):
|
def format_time(timestamp):
|
||||||
|
|||||||
@@ -1000,7 +1000,7 @@ class Abstract_Wallet(PrintError):
|
|||||||
'value': Satoshis(value),
|
'value': Satoshis(value),
|
||||||
'balance': Satoshis(balance)
|
'balance': Satoshis(balance)
|
||||||
}
|
}
|
||||||
item['date'] = timestamp_to_datetime(timestamp) if timestamp is not None else None
|
item['date'] = timestamp_to_datetime(timestamp)
|
||||||
item['label'] = self.get_label(tx_hash)
|
item['label'] = self.get_label(tx_hash)
|
||||||
if show_addresses:
|
if show_addresses:
|
||||||
tx = self.transactions.get(tx_hash)
|
tx = self.transactions.get(tx_hash)
|
||||||
|
|||||||
Reference in New Issue
Block a user