Skip to content

Commit

Permalink
chore: simplify BigInt(0) to 0n
Browse files Browse the repository at this point in the history
  • Loading branch information
KanievskyiDanylo committed Nov 28, 2024
1 parent 0f74f81 commit 840f1e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/dex/fluid-dex/fluid-dex-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,22 +201,22 @@ const limitsWide: DexLimits = {
withdrawableToken0: {
available: BigInt(34242332879776515083099999),
expandsTo: BigInt(34242332879776515083099999),
expandsDuration: BigInt(0),
expandsDuration: 0n,
},
withdrawableToken1: {
available: BigInt(34242332879776515083099999),
expandsTo: BigInt(34242332879776515083099999),
expandsDuration: BigInt(22),
expandsDuration: 22n,
},
borrowableToken0: {
available: BigInt(34242332879776515083099999),
expandsTo: BigInt(34242332879776515083099999),
expandsDuration: BigInt(0),
expandsDuration: 0n,
},
borrowableToken1: {
available: BigInt(34242332879776515083099999),
expandsTo: BigInt(34242332879776515083099999),
expandsDuration: BigInt(308),
expandsDuration: 308n,
},
};

Expand Down
16 changes: 8 additions & 8 deletions src/dex/fluid-dex/fluid-dex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,17 +810,17 @@ export class FluidDex extends SimpleExchange implements IDex<FluidDexData> {

// Check if all reserves of collateral pool are greater than 0
const colPoolEnabled =
token0RealReserves > BigInt(0) &&
token1RealReserves > BigInt(0) &&
token0ImaginaryReserves > BigInt(0) &&
token1ImaginaryReserves > BigInt(0);
token0RealReserves > 0n &&
token1RealReserves > 0n &&
token0ImaginaryReserves > 0n &&
token1ImaginaryReserves > 0n;

// Check if all reserves of debt pool are greater than 0
const debtPoolEnabled =
debtToken0RealReserves > BigInt(0) &&
debtToken1RealReserves > BigInt(0) &&
debtToken0ImaginaryReserves > BigInt(0) &&
debtToken1ImaginaryReserves > BigInt(0);
debtToken0RealReserves > 0n &&
debtToken1RealReserves > 0n &&
debtToken0ImaginaryReserves > 0n &&
debtToken1ImaginaryReserves > 0n;

let colReserveIn: bigint,
colReserveOut: bigint,
Expand Down

0 comments on commit 840f1e6

Please sign in to comment.