aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/keystore/key.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-08 21:53:02 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-13 20:00:08 +0800
commitc5215fdd48231622dd56aba63a5187c6e42828d4 (patch)
tree98bdb47dccb9ef3deaa571585c32db9d19166a80 /accounts/keystore/key.go
parentfad5eb0a87abfc12812647344a26de8a43830182 (diff)
downloaddexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar
dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.gz
dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.bz2
dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.lz
dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.xz
dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.tar.zst
dexon-c5215fdd48231622dd56aba63a5187c6e42828d4.zip
accounts, cmd, internal, mobile, node: canonical account URLs
Diffstat (limited to 'accounts/keystore/key.go')
-rw-r--r--accounts/keystore/key.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/accounts/keystore/key.go b/accounts/keystore/key.go
index 1cf5f9366..e2bdf09fe 100644
--- a/accounts/keystore/key.go
+++ b/accounts/keystore/key.go
@@ -181,8 +181,8 @@ func storeNewKey(ks keyStore, rand io.Reader, auth string) (*Key, accounts.Accou
if err != nil {
return nil, accounts.Account{}, err
}
- a := accounts.Account{Address: key.Address, URL: ks.JoinPath(keyFileName(key.Address))}
- if err := ks.StoreKey(a.URL, key, auth); err != nil {
+ a := accounts.Account{Address: key.Address, URL: accounts.URL{Scheme: KeyStoreScheme, Path: ks.JoinPath(keyFileName(key.Address))}}
+ if err := ks.StoreKey(a.URL.Path, key, auth); err != nil {
zeroKey(key.PrivateKey)
return nil, a, err
}