Skip to content

Commit 93f413f

Browse files
Fixed linting errors
1 parent 0508980 commit 93f413f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/primitives/Point.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const biModPow = (base: bigint, exp: bigint): bigint => {
4848
base = biMod(base)
4949

5050
while (exp > 0n) {
51-
if (exp & 1n) {
51+
if ((exp & 1n) !== 0n) {
5252
result = biModMul(result, base)
5353
}
5454
base = biModMul(base, base)
@@ -403,7 +403,6 @@ export default class Point extends BasePoint {
403403
return res
404404
}
405405

406-
407406
/**
408407
* @constructor
409408
* @param x - The x-coordinate of the point. May be a number, a BigNumber, a string (which will be interpreted as hex), a number array, or null. If null, an "Infinity" point is constructed.
@@ -461,19 +460,19 @@ export default class Point extends BasePoint {
461460
* const isValid = aPoint.validate();
462461
*/
463462
validate (): boolean {
464-
if (this.inf || this.x == null || this.y == null) return false;
463+
if (this.inf || this.x == null || this.y == null) return false
465464

466465
try {
467-
const xBig = BigInt("0x" + this.x.fromRed().toString(16));
468-
const yBig = BigInt("0x" + this.y.fromRed().toString(16));
466+
const xBig = BigInt('0x' + this.x.fromRed().toString(16))
467+
const yBig = BigInt('0x' + this.y.fromRed().toString(16))
469468

470469
// compute y² and x³ + 7 using bigint-secure field ops
471-
const lhs = biModMul(yBig, yBig);
472-
const rhs = biModAdd(biModMul(biModMul(xBig, xBig), xBig), 7n);
470+
const lhs = biModMul(yBig, yBig)
471+
const rhs = biModAdd(biModMul(biModMul(xBig, xBig), xBig), 7n)
473472

474-
return lhs === rhs;
473+
return lhs === rhs
475474
} catch {
476-
return false;
475+
return false
477476
}
478477
}
479478

0 commit comments

Comments
 (0)