URI: 
       tfix add_keypairs: support old wallets - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 785b54f8f49e49051418d1ac95b9863fb781904a
   DIR parent f410225dc2396dcdeb1402c62853728275c80554
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Sat, 21 Jun 2014 21:39:57 +0200
       
       fix add_keypairs: support old wallets
       
       Diffstat:
         M lib/wallet.py                       |      12 +++++-------
       
       1 file changed, 5 insertions(+), 7 deletions(-)
       ---
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -409,15 +409,15 @@ class Abstract_Wallet:
        
                    else:
        
       -                from account import BIP32_Account
       -                print "scanning", x_pubkeys
       -
       +                from account import BIP32_Account, OldAccount
                        for x_pubkey in x_pubkeys:
                            if not is_extended_pubkey(x_pubkey):
                                continue
        
       -                    xpub, sequence = BIP32_Account.parse_xpubkey(x_pubkey)
       -                    print "xpub", xpub
       +                    if x_pubkey[0:2] == 'ff':
       +                        xpub, sequence = BIP32_Account.parse_xpubkey(x_pubkey)
       +                    elif x_pubkey[0:2] == 'fe':
       +                        xpub, sequence = OldAccount.parse_xpubkey(x_pubkey)
        
                            # look for account that can sign
                            for k, account in self.accounts.items():
       t@@ -425,10 +425,8 @@ class Abstract_Wallet:
                                    break
                            else:
                                continue
       -                    print "found xpub", xpub, sequence
        
                            addr = account.get_address(*sequence)
       -                    print addr, txin['address']
                            assert txin['address'] == addr
                            pk = self.get_private_key(addr, password)
                            for sec in pk: