sc-keystore: Improve weird error message (#10584)

The keystore would print "Invalid password" when a key was stored using an incorrect public key.
This pr improves the error message to communicate better to the user on what is wrong.
This commit is contained in:
Bastian Köcher
2022-01-05 13:09:01 +01:00
committed by GitHub
parent e444877d4b
commit 48444ffdc0
2 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -503,7 +503,7 @@ impl KeystoreInner {
if &pair.public() == public {
Ok(Some(pair))
} else {
Err(Error::InvalidPassword)
Err(Error::PublicKeyMismatch)
}
}