cardano: derive the root and then cache

pull/803/head
Tomas Susanka 4 years ago committed by Pavol Rusnak
parent c9a6ada14f
commit 7d7ffe3b67
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -47,14 +47,10 @@ async def get_keychain(ctx: wire.Context) -> Keychain:
seed = mnemonic.get_seed(passphrase)
root = bip32.from_seed(seed, "ed25519 cardano seed")
# derive the namespaced root node
for i in SEED_NAMESPACE:
root.derive_cardano(i)
storage.cache.set(cache.APP_CARDANO_ROOT, root)
# let's not modify the one in the cache
root = root.clone()
# derive the namespaced root node
for i in SEED_NAMESPACE:
root.derive_cardano(i)
keychain = Keychain(SEED_NAMESPACE, root)
return keychain

Loading…
Cancel
Save