Browse Source

Qt: unify calls to get_transaction (follow-up 121d8732f1)

ThomasV 3 years ago
parent
commit
599ac065fb
  1. 5
      electrum/gui/qt/history_list.py
  2. 2
      electrum/gui/qt/utxo_list.py

5
electrum/gui/qt/history_list.py

@ -672,7 +672,7 @@ class HistoryList(MyTreeView, AcceptFileDragDrop):
self.parent.show_lightning_transaction(tx_item)
return
tx_hash = tx_item['txid']
tx = self.wallet.db.get_transaction(tx_hash)
tx = self.wallet.adb.get_transaction(tx_hash)
if not tx:
return
self.show_transaction(tx_item, tx)
@ -716,10 +716,7 @@ class HistoryList(MyTreeView, AcceptFileDragDrop):
menu.exec_(self.viewport().mapToGlobal(position))
return
tx_hash = tx_item['txid']
if tx_item.get('lightning'):
tx = self.wallet.adb.get_transaction(tx_hash)
else:
tx = self.wallet.db.get_transaction(tx_hash)
if not tx:
return
tx_URL = block_explorer_URL(self.config, 'tx', tx_hash)

2
electrum/gui/qt/utxo_list.py

@ -206,7 +206,7 @@ class UTXOList(MyTreeView):
addr = utxo.address
txid = utxo.prevout.txid.hex()
# "Details"
tx = self.wallet.db.get_transaction(txid)
tx = self.wallet.adb.get_transaction(txid)
if tx:
label = self.wallet.get_label_for_txid(txid)
menu.addAction(_("Details"), lambda: self.parent.show_transaction(tx, tx_desc=label))

Loading…
Cancel
Save