From 205ea9580215cca4093dff22ec61222bc3a6ff96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 8 Feb 2017 20:25:52 +0200 Subject: accounts, cmd, internal, node: implement HD wallet self-derivation --- internal/ethapi/api.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'internal') 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. -- cgit v1.2.3