aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-09 02:25:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-13 20:00:09 +0800
commit205ea9580215cca4093dff22ec61222bc3a6ff96 (patch)
treeaf6c38683d64bb47c0a31ba166533701cf95ed15 /internal/ethapi
parentc5215fdd48231622dd56aba63a5187c6e42828d4 (diff)
downloadgo-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.gz
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.bz2
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.lz
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.xz
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.zst
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.zip
accounts, cmd, internal, node: implement HD wallet self-derivation
Diffstat (limited to 'internal/ethapi')
-rw-r--r--internal/ethapi/api.go6
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.