Skip to content

Commit

Permalink
Fix from_address bug
Browse files Browse the repository at this point in the history
  • Loading branch information
volhovm committed Aug 22, 2024
1 parent bd21d47 commit 2086837
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions signer/src/pubkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl PubKey {
let mut pt =
CurvePoint::get_point_from_x_unchecked(x, y_parity).ok_or(PubKeyError::XCoordinate)?;

if pt.y.0.is_even() == y_parity {
if pt.y.into_bigint().is_even() == y_parity {
pt.y = pt.y.neg();
}

Expand Down Expand Up @@ -200,7 +200,7 @@ impl PubKey {
/// Serialize public key into corresponding Mina address
pub fn into_address(&self) -> String {
let point = self.point();
into_address(&point.x, point.y.0.is_odd())
into_address(&point.x, point.y.into_bigint().is_odd())
}

/// Deserialize public key into bytes
Expand Down

0 comments on commit 2086837

Please sign in to comment.