Skip to content

Commit aaf5fee

Browse files
committed
fix: Invalid secret key
The constructor of a secret key should return InvalidSecretKey in case of error. I guess there was a typo / copy-and-paste error that was never tested.
1 parent d1d4ff9 commit aaf5fee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/key.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ impl Keypair {
891891
match from_hex(s, &mut res) {
892892
Ok(constants::SECRET_KEY_SIZE) =>
893893
Keypair::from_seckey_slice(secp, &res[0..constants::SECRET_KEY_SIZE]),
894-
_ => Err(Error::InvalidPublicKey),
894+
_ => Err(Error::InvalidSecretKey),
895895
}
896896
}
897897

0 commit comments

Comments
 (0)