Browse Source

commands: fix gettransaction

sqlite_db
SomberNight 6 years ago
parent
commit
b34e1634b6
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 7
      electrum/commands.py

7
electrum/commands.py

@ -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…
Cancel
Save