diff --git a/pywallet/wallet.py b/pywallet/wallet.py index e8c7426..b96812e 100644 --- a/pywallet/wallet.py +++ b/pywallet/wallet.py @@ -30,13 +30,14 @@ def create_address(network='btctest', xpub=None, child=None, path=0): if network == 'ethereum' or network.upper() == 'ETH': acct_pub_key = HDKey.from_b58check(xpub) + keys = HDKey.from_path( acct_pub_key, '{change}/{index}'.format(change=path, index=child)) res = { - "path": "m/" + str(acct_pub_key.index) + "/" + str(keys[-1].index), + "path": "m/" + str(acct_pub_key.index) + "/" + str(keys[1].index), "bip32_path": "m/44'/60'/0'/" + str(acct_pub_key.index) + "/" + str(keys[-1].index), - "address": keys[-1].address() + "address": keys[1].address() } if inspect.stack()[1][3] == "create_wallet":