commit 93e577e0cb01edcc22e86e081a0e383fa4c54fe1
parent 7f9b473a988fc8461750f4f8f1622c429d11e0df
Author: ThomasV <thomasv@electrum.org>
Date: Wed, 6 Sep 2017 12:47:16 +0200
Revert "segwit: add purpose to derivation"
This reverts commit f706fa07078fd01f24ded2dada7ad66eae8ff485.
Diffstat:
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/base_wizard.py b/lib/base_wizard.py
@@ -293,7 +293,7 @@ class BaseWizard(object):
self.derivation_dialog(f)
def create_keystore(self, seed, passphrase):
- k = keystore.from_seed(seed, passphrase, self.wallet_type=='multisig')
+ k = keystore.from_seed(seed, passphrase)
self.on_keystore(k)
def on_bip44(self, seed, passphrase, derivation):
diff --git a/lib/keystore.py b/lib/keystore.py
@@ -685,7 +685,7 @@ def bip44_derivation(account_id, segwit=False):
coin = 1 if bitcoin.TESTNET else 0
return "m/%d'/%d'/%d'" % (bip, coin, int(account_id))
-def from_seed(seed, passphrase, is_multisig):
+def from_seed(seed, passphrase):
t = seed_type(seed)
if t == 'old':
keystore = Old_KeyStore({})
@@ -695,9 +695,7 @@ def from_seed(seed, passphrase, is_multisig):
keystore.add_seed(seed)
keystore.passphrase = passphrase
bip32_seed = Mnemonic.mnemonic_to_seed(seed, passphrase)
- purpose = 1 if is_multisig else 0
- der = "m/" if t == 'standard' else ("m/%d'/"%purpose)
- keystore.add_xprv_from_seed(bip32_seed, t, der)
+ keystore.add_xprv_from_seed(bip32_seed, t, "m/")
else:
raise BaseException(t)
return keystore