URI: 
       tfix #1728 - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 94dbfe679158af82d53c4cd325632b1b26bda7cb
   DIR parent 753a28b452dca1023fbde548469c36a34555dc95
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Sun, 20 Mar 2016 19:05:38 +0100
       
       fix #1728
       
       Diffstat:
         M gui/qt/main_window.py               |       5 +++--
         M lib/commands.py                     |       3 +++
         M lib/transaction.py                  |       5 ++---
       
       3 files changed, 8 insertions(+), 5 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -2244,9 +2244,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
        
        
            def tx_from_text(self, txt):
       -        from electrum.transaction import tx_from_str
       +        from electrum.transaction import tx_from_str, Transaction
                try:
       -            return tx_from_str(txt)
       +            tx = tx_from_str(txt)
       +            return Transaction(tx)
                except:
                    traceback.print_exc(file=sys.stdout)
                    self.show_critical(_("Electrum was unable to parse your transaction"))
   DIR diff --git a/lib/commands.py b/lib/commands.py
       t@@ -216,6 +216,7 @@ class Commands:
            @command('wp')
            def signtransaction(self, tx, privkey=None):
                """Sign a transaction. The wallet keys will be used unless a private key is provided."""
       +        tx = Transaction(tx)
                if privkey:
                    pubkey = bitcoin.public_key_from_private_key(privkey)
                    h160 = bitcoin.hash_160(pubkey.decode('hex'))
       t@@ -228,11 +229,13 @@ class Commands:
            @command('')
            def deserialize(self, tx):
                """Deserialize a serialized transaction"""
       +        tx = Transaction(tx)
                return tx.deserialize()
        
            @command('n')
            def broadcast(self, tx, timeout=30):
                """Broadcast a transaction to the network. """
       +        tx = Transaction(tx)
                return self.network.broadcast(tx, timeout)
        
            @command('')
   DIR diff --git a/lib/transaction.py b/lib/transaction.py
       t@@ -872,8 +872,7 @@ def tx_from_str(txt):
            except:
                is_hex = False
            if is_hex:
       -        return Transaction(txt)
       +        return txt
            tx_dict = json.loads(str(txt))
            assert "hex" in tx_dict.keys()
       -    tx = Transaction(tx_dict["hex"])
       -    return tx
       +    return tx_dict["hex"]