URI: 
       tfix #1976 - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 11ba5c441ab745ddec3f0e2176817bcabae0fa17
   DIR parent 34e271594a9f306d1a850f175a041307a8bac935
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Sat, 15 Oct 2016 14:34:19 +0200
       
       fix #1976
       
       Diffstat:
         M plugins/trezor/plugin.py            |       5 ++++-
       
       1 file changed, 4 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/plugins/trezor/plugin.py b/plugins/trezor/plugin.py
       t@@ -311,6 +311,7 @@ class TrezorCompatiblePlugin(HW_PluginBase):
        
            def tx_outputs(self, derivation, tx):
                outputs = []
       +        has_change = False
                for i, (_type, address, amount) in enumerate(tx.outputs()):
                    txoutputtype = self.types.TxOutputType()
                    txoutputtype.amount = amount
       t@@ -320,10 +321,12 @@ class TrezorCompatiblePlugin(HW_PluginBase):
                        txoutputtype.op_return_data = address[2:]
                    elif _type == TYPE_ADDRESS:
                        addrtype, hash_160 = bc_address_to_hash_160(address)
       -                if addrtype == 0 and change is not None:
       +                if addrtype == 0 and change is not None and not has_change:
                            address_path = "%s/%d/%d"%(derivation, change, index)
                            address_n = self.client_class.expand_path(address_path)
                            txoutputtype.address_n.extend(address_n)
       +                    # do not show more than one change address to device
       +                    has_change = True
                        else:
                            txoutputtype.address = address
                        if addrtype == 0: