update create address for ETH

This commit is contained in:
armatusmiles 2018-02-07 00:41:55 +02:00
parent a64fd853e3
commit e2a0a9830b

View File

@ -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":