feat(client): add default key name (#18101)

This commit is contained in:
Julien Robert
2023-10-16 11:08:40 +00:00
committed by GitHub
parent 3747519da0
commit bb34c42f06
13 changed files with 87 additions and 80 deletions
+4
View File
@@ -945,6 +945,10 @@ func (ks keystore) migrate(key string) (*Record, error) {
// 1. get the key.
item, err := ks.db.Get(key)
if err != nil {
if key == fmt.Sprintf(".%s", infoSuffix) {
return nil, errors.New("no key name or address provided; have you forgotten the --from flag?")
}
return nil, wrapKeyNotFound(err, key)
}