electrum

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

commit a8a993d4904c36258205195ec7ee0a5c485b00f7
parent d7dc804b323f2db8b99dc99b0a95337c2c4eb2e2
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 15 Sep 2017 12:20:06 +0200

fix key type for bip49

Diffstat:
Mlib/base_wizard.py | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/base_wizard.py b/lib/base_wizard.py @@ -288,17 +288,18 @@ class BaseWizard(object): raise BaseException('Unknown seed type', self.seed_type) def on_restore_bip39(self, seed, passphrase): - f = lambda x: self.run('on_bip44', seed, passphrase, str(x)) + f = lambda x: self.run('on_bip43', seed, passphrase, str(x)) self.derivation_dialog(f) def create_keystore(self, seed, passphrase): k = keystore.from_seed(seed, passphrase) self.on_keystore(k) - def on_bip44(self, seed, passphrase, derivation): + def on_bip43(self, seed, passphrase, derivation): k = keystore.BIP32_KeyStore({}) bip32_seed = keystore.bip39_to_seed(seed, passphrase) - k.add_xprv_from_seed(bip32_seed, 0, derivation) + t = 'segwit_p2sh' if derivation.startswith("m/49'") else 'standard' + k.add_xprv_from_seed(bip32_seed, t, derivation) self.on_keystore(k) def on_keystore(self, k):