1
0

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

This commit is contained in:
ThomasV
2023-01-25 15:53:55 +01:00
parent 23adb53572
commit 599ac065fb
2 changed files with 3 additions and 6 deletions

View File

@@ -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)
tx = self.wallet.adb.get_transaction(tx_hash)
if not tx:
return
tx_URL = block_explorer_URL(self.config, 'tx', tx_hash)

View File

@@ -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))