1
0

save wallet label in keystore, to facilitate pairing

This commit is contained in:
ThomasV
2016-08-26 11:45:12 +02:00
parent cae635c3e4
commit 86e23d9989
6 changed files with 37 additions and 20 deletions

View File

@@ -49,6 +49,7 @@ class KeyStore(PrintError):
def can_import(self):
return False
class Software_KeyStore(KeyStore):
def __init__(self):
@@ -70,7 +71,6 @@ class Software_KeyStore(KeyStore):
return decrypted
class Imported_KeyStore(Software_KeyStore):
# keystore for imported private keys
@@ -459,9 +459,13 @@ class Hardware_KeyStore(KeyStore, Xpub):
# handler. The handler is per-window and preserved across
# device reconnects
self.xpub = d.get('xpub')
self.label = d.get('label')
self.derivation = d.get('derivation')
self.handler = None
def set_label(self, label):
self.label = label
def may_have_password(self):
return False
@@ -474,6 +478,7 @@ class Hardware_KeyStore(KeyStore, Xpub):
'hw_type': self.hw_type,
'xpub': self.xpub,
'derivation':self.derivation,
'label':self.label,
}
def unpaired(self):