tcommands: fix gettransaction - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit b34e1634b696dfec58019bb996d80305150105a7 DIR parent f85b8f349ddc8905d9137d4fd92193aefaac51b9 HTML Author: SomberNight <somber.night@protonmail.com> Date: Thu, 28 Feb 2019 20:21:53 +0100 commands: fix gettransaction Diffstat: M electrum/commands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- DIR diff --git a/electrum/commands.py b/electrum/commands.py t@@ -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)