Skip to content

Commit

Permalink
fix: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
isoosiss7 committed Mar 29, 2021
1 parent 3c5e49b commit bcda160
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/native-utils/common/src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ impl<'de> Deserialize<'de> for RecoverableSignature {
let bytes: Bytes = Deserialize::deserialize(deserializer)?;
assert_eq!(65,bytes.0.len());
let mut a: [u8; 64] = [0; 64];
a.copy_from_slice(&bytes.0[0..65]);
a.copy_from_slice(&bytes.0[0..64]);
Ok(RecoverableSignature(
Signature::parse(&a),
RecoveryId::parse(bytes.0[64]).map_err(D::Error::custom)?
RecoveryId::parse(bytes.0[64] - 27).map_err(D::Error::custom)?
))
}
}

0 comments on commit bcda160

Please sign in to comment.