Skip to content

Commit 4019a50

Browse files
Affine coordinate are not correctly exposed from the underlying type. (#116)
1 parent 7b29b9f commit 4019a50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/starknet-types-core/src/curve/affine_point.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ impl AffinePoint {
4444

4545
/// Returns the `x` coordinate of the point.
4646
pub fn x(&self) -> Felt {
47-
Felt(*self.0.x())
47+
Felt(*self.0.to_affine().x())
4848
}
4949

5050
/// Returns the `y` coordinate of the point.
5151
pub fn y(&self) -> Felt {
52-
Felt(*self.0.y())
52+
Felt(*self.0.to_affine().y())
5353
}
5454

5555
// Returns the generator point of the StarkCurve
@@ -70,7 +70,7 @@ impl core::ops::Add<AffinePoint> for AffinePoint {
7070
type Output = AffinePoint;
7171

7272
fn add(self, rhs: Self) -> Self::Output {
73-
AffinePoint(self.0.operate_with_affine(&rhs.0))
73+
AffinePoint(self.0.operate_with(&rhs.0))
7474
}
7575
}
7676

0 commit comments

Comments
 (0)