mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
internal, signer: add info when new account is created via rpc
This commit is contained in:
parent
e3f18d475a
commit
8c4002c655
2 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue