electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit c63a0f21982ae3f83b84e2a2357884c562e2b6ee
parent ca69b20327f1219bc2bac37271b3597f5925509e
Author: ThomasV <thomasv@electrum.org>
Date:   Sun, 21 Aug 2016 21:09:00 +0200

fix #1907

Diffstat:
Mlib/keystore.py | 3++-
Mlib/storage.py | 16++++++++++++++--
2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/lib/keystore.py b/lib/keystore.py @@ -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): diff --git a/lib/storage.py b/lib/storage.py @@ -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):