URI: 
       tMerge pull request #3140 from SomberNight/sweep_p2pk_unknown - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 3696d38f335b666c797483f839c3adbb0d64b5a2
   DIR parent 6f3c822867bd512e276ef63ad7b8c2af2fa40927
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Sat, 28 Oct 2017 15:06:48 +0200
       
       Merge pull request #3140 from SomberNight/sweep_p2pk_unknown
       
       fix: sweep p2pk - small display bug (unknown -> pubkey)
       Diffstat:
         M lib/wallet.py                       |       5 ++---
       
       1 file changed, 2 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -871,19 +871,18 @@ class Abstract_Wallet(PrintError):
                return tx
        
            def _append_utxos_to_inputs(self, inputs, network, pubkey, txin_type, imax):
       -        address = None
                if txin_type != 'p2pk':
                    address = bitcoin.pubkey_to_address(txin_type, pubkey)
                    sh = bitcoin.address_to_scripthash(address)
                else:
                    script = bitcoin.public_key_to_p2pk_script(pubkey)
                    sh = bitcoin.script_to_scripthash(script)
       +            address = '(pubkey)'
                u = network.synchronous_get(('blockchain.scripthash.listunspent', [sh]))
                for item in u:
                    if len(inputs) >= imax:
                        break
       -            if address is not None:
       -                item['address'] = address
       +            item['address'] = address
                    item['type'] = txin_type
                    item['prevout_hash'] = item['tx_hash']
                    item['prevout_n'] = item['tx_pos']