I assume it it an issue with the derivation path... and possibly also related to this "gem" in mnemonic.py:
class Mnemonic(object):
# Seed derivation no longer follows BIP39
# Mnemonic phrase uses a hash based checksum, instead of a wordlist-dependent checksum
looking at the code in keystore.py and bitcoin.py, electrum figures out seed_type(x) as 'old' or 'standard' and then you get
def from_seed(seed, passphrase):
t = seed_type(seed)
if t == 'old':
keystore = Old_KeyStore({})
keystore.add_seed(seed)
elif t in ['standard', 'segwit']:
keystore = BIP32_KeyStore({})
keystore.add_seed(seed)
keystore.passphrase = passphrase
bip32_seed = Mnemonic.mnemonic_to_seed(seed, passphrase)
xtype = 0 if t == 'standard' else 1
keystore.add_xprv_from_seed(bip32_seed, xtype, "m/")
return keystore
So my guess would be that your issue is likely in the part where it generates the actual seed from the Mnemonic (Mnemonic.mnemonic_to_seed), or during the creation of the xprv (keystore.add_xprv_from_seed)
During some recent efforts to help others with moving from one wallet to another and/or rescuing funds from 'broken' wallets, I've been struggling with the lack of consistency across all the HD wallets... they all seem to be doing different things