Skip to content

Commit

Permalink
solve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
aburkut committed Dec 9, 2024
2 parents d3b26e9 + aa7ea5a commit 4cc4ca2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@paraswap/dex-lib",
"version": "3.11.8-stader.1",
"version": "3.11.8-stader.2",
"main": "build/index.js",
"types": "build/index.d.ts",
"repository": "https://github.com/paraswap/paraswap-dex-lib",
Expand Down
9 changes: 3 additions & 6 deletions src/dex/stader/stader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class Stader
isFirstSwap?: boolean | undefined,
): Promise<ExchangePrices<StaderData> | null> {
if (side === SwapSide.BUY) return null;
if (!this.isEligibleSwap(srcToken, destToken)) return null;

const pool = this.ethxPool;
if (!pool.getState(blockNumber)) return null;
Expand All @@ -127,11 +128,7 @@ export class Stader
];
}

isEligibleSwap(
srcToken: Token | string,
destToken: Token | string,
side: SwapSide,
): boolean {
isEligibleSwap(srcToken: Token | string, destToken: Token | string): boolean {
const srcTokenAddress = (
typeof srcToken === 'string' ? srcToken : srcToken.address
).toLowerCase();
Expand Down Expand Up @@ -189,7 +186,7 @@ export class Stader
): Promise<string[]> {
if (side === SwapSide.BUY) return [];

if (!this.isEligibleSwap(srcToken, destToken, side)) return [];
if (!this.isEligibleSwap(srcToken, destToken)) return [];

return [`${ETHER_ADDRESS}_${destToken.address}`.toLowerCase()];
}
Expand Down

0 comments on commit 4cc4ca2

Please sign in to comment.