diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-02-09 02:25:52 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-02-13 20:00:09 +0800 |
commit | 205ea9580215cca4093dff22ec61222bc3a6ff96 (patch) | |
tree | af6c38683d64bb47c0a31ba166533701cf95ed15 /internal | |
parent | c5215fdd48231622dd56aba63a5187c6e42828d4 (diff) | |
download | dexon-205ea9580215cca4093dff22ec61222bc3a6ff96.tar dexon-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.gz dexon-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.bz2 dexon-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.lz dexon-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.xz dexon-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.zst dexon-205ea9580215cca4093dff22ec61222bc3a6ff96.zip |
accounts, cmd, internal, node: implement HD wallet self-derivation
Diffstat (limited to 'internal')
-rw-r--r-- | internal/ethapi/api.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 85bb10f17..f49434e17 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -253,10 +253,14 @@ func (s *PrivateAccountAPI) DeriveAccount(url string, path string, pin *bool) (a if err != nil { return accounts.Account{}, err } + derivPath, err := accounts.ParseDerivationPath(path) + if err != nil { + return accounts.Account{}, err + } if pin == nil { pin = new(bool) } - return wallet.Derive(path, *pin) + return wallet.Derive(derivPath, *pin) } // NewAccount will create a new account and returns the address for the new account. |