Skip to content

Commit 5ecc142

Browse files
UPDATE. ensuring entropy value stays as a string value for consistency
1 parent 682cc9b commit 5ecc142

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pycardano/crypto/bip32.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ def from_seed(
109109
110110
Args:
111111
seed: Master key of 96 bytes from seed hex string.
112+
entropy: Entropy hex string, default to ``None``.
113+
passphrase: Mnemonic passphrase or password, default to ``None``.
114+
mnemonic: Mnemonic words, default to ``None``.
112115
113116
Returns:
114117
HDWallet -- Hierarchical Deterministic Wallet instance.
@@ -168,7 +171,7 @@ def from_mnemonic(cls, mnemonic: str, passphrase: str = "") -> HDWallet:
168171
return cls.from_seed(
169172
seed=hexlify(seed).decode(),
170173
mnemonic=mnemonic,
171-
entropy=entropy,
174+
entropy=unhexlify(entropy).decode("utf-8"),
172175
passphrase=passphrase,
173176
)
174177

0 commit comments

Comments
 (0)