1
0

hardware: store derivation instead of account_id

This commit is contained in:
ThomasV
2016-08-20 21:08:30 +02:00
parent 664077397e
commit 428bc539b3
5 changed files with 11 additions and 7 deletions

View File

@@ -23,10 +23,10 @@ class TrezorCompatibleKeyStore(Hardware_KeyStore):
def load(self, storage, name):
self.xpub = storage.get('master_public_keys', {}).get(name)
self.account_id = int(storage.get('account_id'))
self.derivation = storage.get('derivation')
def get_derivation(self):
return "m/44'/0'/%d'"%self.account_id
return self.derivation
def get_client(self, force_pair=True):
return self.plugin.get_client(self, force_pair)

View File

@@ -291,7 +291,7 @@ def qt_plugin_class(base_plugin_class):
# Setup device and create accounts in separate thread; wait until done
loop = QEventLoop()
exc_info = []
derivation = "m/44'/0'/%d'"%storage.get('account_id')
derivation = storage.get('derivation')
self.setup_device(derivation, thread, handler, on_done=loop.quit,
on_error=lambda info: exc_info.extend(info))
loop.exec_()