qml: fix assumption history item is onchain when history item has no timestamp.
This commit is contained in:
@@ -149,12 +149,13 @@ class QETransactionListModel(QAbstractListModel, QtEventListener):
|
|||||||
# newly arriving txs, or (partially/fully signed) local txs have no (block) timestamp
|
# newly arriving txs, or (partially/fully signed) local txs have no (block) timestamp
|
||||||
# FIXME just use wallet.get_tx_status, and change that as needed
|
# FIXME just use wallet.get_tx_status, and change that as needed
|
||||||
if not item['timestamp']: # onchain: local or mempool or unverified txs
|
if not item['timestamp']: # onchain: local or mempool or unverified txs
|
||||||
txid = item['txid']
|
if not item['lightning']:
|
||||||
assert txid
|
txid = item['txid']
|
||||||
tx_mined_info = self._tx_mined_info_from_tx_item(tx_item)
|
assert txid
|
||||||
item['section'] = 'local' if tx_mined_info.is_local_like() else 'mempool'
|
tx_mined_info = self._tx_mined_info_from_tx_item(tx_item)
|
||||||
status, status_str = self.wallet.get_tx_status(txid, tx_mined_info=tx_mined_info)
|
item['section'] = 'local' if tx_mined_info.is_local_like() else 'mempool'
|
||||||
item['date'] = status_str
|
status, status_str = self.wallet.get_tx_status(txid, tx_mined_info=tx_mined_info)
|
||||||
|
item['date'] = status_str
|
||||||
else: # lightning or already mined (and SPV-ed) onchain txs
|
else: # lightning or already mined (and SPV-ed) onchain txs
|
||||||
item['section'] = self.get_section_by_timestamp(item['timestamp'])
|
item['section'] = self.get_section_by_timestamp(item['timestamp'])
|
||||||
item['date'] = self.format_date_by_section(item['section'], datetime.fromtimestamp(item['timestamp']))
|
item['date'] = self.format_date_by_section(item['section'], datetime.fromtimestamp(item['timestamp']))
|
||||||
|
|||||||
Reference in New Issue
Block a user