fix geth hdnode bug

This commit is contained in:
Josh Harvey 2017-05-13 12:56:46 +03:00
parent 765338885d
commit f7856c7db7

View file

@ -1,4 +1,3 @@
const _ = require('lodash/fp')
const Web3 = require('web3')
const web3 = new Web3()
const hdkey = require('hdkey')
@ -140,12 +139,12 @@ function paymentHdNode (account) {
const masterSeed = account.seed
if (!masterSeed) throw new Error('No master seed!')
const key = hdkey.fromMasterSeed(masterSeed)
return key.derivePath(paymentPrefixPath)
return key.derive(paymentPrefixPath)
}
function defaultHdNode (account) {
const masterSeed = account.seed
if (!masterSeed) throw new Error('No master seed!')
const key = hdkey.fromMasterSeed(masterSeed)
return key.derivePath(defaultPrefixPath)
return key.derive(defaultPrefixPath)
}