From 6eb5da0ec651ebeee662438dbe6ae4217006cc1c Mon Sep 17 00:00:00 2001 From: msoltani-m <92777018+msoltani-m@users.noreply.github.com> Date: Sun, 5 Dec 2021 16:02:36 +0330 Subject: [PATCH] Fix pycoin exception when create from mnemonic Pycoin returns invalid int for format parameter without resolve `{id}`. This fix the issue --- binance_chain/wallet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binance_chain/wallet.py b/binance_chain/wallet.py index 93955a6..03a09f7 100644 --- a/binance_chain/wallet.py +++ b/binance_chain/wallet.py @@ -150,7 +150,7 @@ def create_wallet_from_mnemonic(cls, mnemonic: str, seed = Mnemonic.to_seed(mnemonic, passphrase) new_wallet = network.keys.bip32_seed(seed) - child_wallet = new_wallet.subkey_for_path(Wallet.HD_PATH) + child_wallet = new_wallet.subkey_for_path(Wallet.HD_PATH.format(id=child)) # convert secret exponent (private key) int to hex key_hex = format(child_wallet.secret_exponent(), 'x') return cls(key_hex, env=env)