mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-03 12:30:07 +00:00
commands: fix gettransaction
This commit is contained in:
parent
f85b8f349d
commit
b34e1634b6
1 changed files with 4 additions and 3 deletions
|
@ -567,9 +567,10 @@ class Commands:
|
|||
@command('n')
|
||||
def gettransaction(self, txid):
|
||||
"""Retrieve a transaction. """
|
||||
if self.wallet and txid in self.wallet.transactions:
|
||||
tx = self.wallet.transactions[txid]
|
||||
else:
|
||||
tx = None
|
||||
if self.wallet:
|
||||
tx = self.wallet.db.get_transaction(txid)
|
||||
if tx is None:
|
||||
raw = self.network.run_from_another_thread(self.network.get_transaction(txid))
|
||||
if raw:
|
||||
tx = Transaction(raw)
|
||||
|
|
Loading…
Add table
Reference in a new issue