Skip to content

Commit

Permalink
fix(BN): refactor parameters name
Browse files Browse the repository at this point in the history
  • Loading branch information
ghivert committed Aug 8, 2023
1 parent b7ccd89 commit b1b280f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/helpers/bn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { BigNumber, BigNumberish } from "ethers";

const APPROX_EQUAL_THRESHOLD = 10;

export const approxEqual = (value: BigNumberish, equality: BigNumberish) => {
const a = BigNumber.from(value);
const b = BigNumber.from(equality);
export const approxEqual = (a: BigNumberish, b: BigNumberish) => {
a = BigNumber.from(a);
b = BigNumber.from(b);
return a.sub(b).abs().lte(APPROX_EQUAL_THRESHOLD);
};

0 comments on commit b1b280f

Please sign in to comment.