URI: 
       tLedger: get new wallet creation working again - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 1ec3ad59cc91241045482c063b180d561d1acff0
   DIR parent 45f518e1916a1432a614fe1306feefe5092d0e7e
  HTML Author: Neil Booth <kyuupichan@gmail.com>
       Date:   Mon, 11 Jan 2016 14:23:35 +0900
       
       Ledger: get new wallet creation working again
       
       This is enough to get new wallet creation working in the
       absence of errors.
       
       Diffstat:
         M lib/plugins.py                      |       3 +++
         M plugins/ledger/ledger.py            |       9 +++++++--
         M plugins/ledger/qt.py                |       4 +++-
       
       3 files changed, 13 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/lib/plugins.py b/lib/plugins.py
       t@@ -187,6 +187,9 @@ class BasePlugin(PrintError):
            def diagnostic_name(self):
                return self.name
        
       +    def __str__(self):
       +        return self.name
       +
            def close(self):
                # remove self from hooks
                for k in dir(self):
   DIR diff --git a/plugins/ledger/ledger.py b/plugins/ledger/ledger.py
       t@@ -53,6 +53,9 @@ class BTChipWallet(BIP44_Wallet):
                    self.device_checked = False
                raise Exception(message)
        
       +    def get_action(self):
       +        pass
       +
            def can_create_accounts(self):
                return False
        
       t@@ -140,12 +143,14 @@ class BTChipWallet(BIP44_Wallet):
                return self.client
        
            def derive_xkeys(self, root, derivation, password):
       -        derivation = derivation.replace(self.root_name,"44'/0'/")
       +        derivation = '/'.join(derivation.split('/')[1:])
                xpub = self.get_public_key(derivation)
                return xpub, None
        
            def get_public_key(self, bip32_path):
       -        # S-L-O-W - we don't handle the fingerprint directly, so compute it manually from the previous node
       +        # bip32_path is of the form 44'/0'/1'
       +        # S-L-O-W - we don't handle the fingerprint directly, so compute
       +        # it manually from the previous node
                # This only happens once so it's bearable
                self.get_client() # prompt for the PIN before displaying the dialog if necessary
                self.plugin.handler.show_message("Computing master public key")
   DIR diff --git a/plugins/ledger/qt.py b/plugins/ledger/qt.py
       t@@ -23,8 +23,10 @@ class Plugin(LedgerPlugin):
                    wallet.force_watching_only = True
        
            def on_create_wallet(self, wallet, wizard):
       +        assert type(wallet) == self.wallet_class
                self.handler = BTChipQTHandler(wizard)
       -        wallet.create_main_account()
       +#        self.select_device(wallet)
       +        wallet.create_hd_account(None)
        
        class BTChipQTHandler: