diff --git a/tests/helpers/bn.ts b/tests/helpers/bn.ts index 2f32a87..194b81f 100644 --- a/tests/helpers/bn.ts +++ b/tests/helpers/bn.ts @@ -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); };