internal, signer: add info when new account is created via rpc

This commit is contained in:
Kurkó Mihály 2019-04-15 15:04:55 +03:00
parent e3f18d475a
commit 8c4002c655
2 changed files with 2 additions and 0 deletions

View file

@ -295,6 +295,7 @@ func (s *PrivateAccountAPI) DeriveAccount(url string, path string, pin *bool) (a
func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error) { func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error) {
acc, err := fetchKeystore(s.am).NewAccount(password) acc, err := fetchKeystore(s.am).NewAccount(password)
if err == nil { if err == nil {
log.Info("Your new key is generated. Please backup the key file", "path", acc.URL.Path)
return acc.Address, nil return acc.Address, nil
} }
return common.Address{}, err return common.Address{}, err

View file

@ -392,6 +392,7 @@ func (api *SignerAPI) New(ctx context.Context) (common.Address, error) {
} else { } else {
// No error // No error
acc, err := be[0].(*keystore.KeyStore).NewAccount(resp.Text) acc, err := be[0].(*keystore.KeyStore).NewAccount(resp.Text)
log.Info("Your new key is generated. Please backup the key file", "path", acc.URL.Path)
return acc.Address, err return acc.Address, err
} }
} }