Skip to content

Commit

Permalink
use strict equality
Browse files Browse the repository at this point in the history
  • Loading branch information
aburkut committed Nov 21, 2024
1 parent c478fa0 commit d70b077
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dex/fluid-dex/fluid-dex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export class FluidDex extends SimpleExchange implements IDex<FluidDexData> {
return null;
}
const prices = amounts.map(amount => {
if (side == SwapSide.SELL) {
if (side === SwapSide.SELL) {
return this.swapIn(
srcToken.address.toLowerCase() === pool.token0.toLowerCase(),
amount,
Expand Down Expand Up @@ -304,17 +304,17 @@ export class FluidDex extends SimpleExchange implements IDex<FluidDexData> {
let args: any;
let returnAmountPos: number | undefined;

const method = side == SwapSide.SELL ? 'swapIn' : 'swapOut';
const method = side === SwapSide.SELL ? 'swapIn' : 'swapOut';

returnAmountPos = extractReturnAmountPosition(
this.fluidDexPoolIface,
method,
side == SwapSide.SELL ? 'amountOut_' : 'amountIn_',
side === SwapSide.SELL ? 'amountOut_' : 'amountIn_',
);

const pool = this.getPoolByTokenPair(srcToken, destToken);

if (side == SwapSide.SELL) {
if (side === SwapSide.SELL) {
if (pool!.token0.toLowerCase() !== srcToken.toLowerCase()) {
args = [false, BigInt(srcAmount), BigInt(destAmount), recipient];
} else {
Expand Down

0 comments on commit d70b077

Please sign in to comment.