This commit is contained in:
ThomasV 2016-08-21 21:09:00 +02:00
parent ca69b20327
commit c63a0f2198
2 changed files with 16 additions and 3 deletions

View File

@ -137,7 +137,8 @@ class Imported_KeyStore(Software_KeyStore):
for k, v in self.keypairs.items():
b = pw_decode(v, old_password)
c = pw_encode(b, new_password)
self.keypairs[k] = b
self.keypairs[k] = c
print self.keypairs
class Deterministic_KeyStore(Software_KeyStore):

View File

@ -231,6 +231,8 @@ class WalletStorage(PrintError):
xpubs = self.get('master_public_keys')
xprvs = self.get('master_private_keys')
mpk = self.get('master_public_key')
keypairs = self.get('keypairs')
key_type = self.get('key_type')
if seed_version == OLD_SEED_VERSION or wallet_type == 'old':
d = {
'type': 'old',
@ -240,9 +242,17 @@ class WalletStorage(PrintError):
self.put('wallet_type', 'standard')
self.put('keystore', d)
elif key_type == 'imported':
d = {
'type': 'imported',
'keypairs': keypairs,
}
self.put('wallet_type', 'standard')
self.put('keystore', d)
elif wallet_type == 'standard':
xpub = self.get('master_public_keys')["x/"]
xprv = self.get('master_private_keys')["x/"]
xpub = xpubs["x/"]
xprv = xprvs["x/"]
d = {
'type': 'bip32',
'xpub': xpub,
@ -278,6 +288,8 @@ class WalletStorage(PrintError):
self.put('master_public_keys', None)
self.put('master_private_keys', None)
self.put('seed', None)
self.put('keypairs', None)
self.put('key_type', None)
def convert_imported(self, test):