Skip to content

Commit

Permalink
remove getTopPoolsForToken
Browse files Browse the repository at this point in the history
  • Loading branch information
aburkut committed Dec 9, 2024
1 parent aa7ea5a commit f72ffb7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 38 deletions.
20 changes: 0 additions & 20 deletions src/dex/stader/stader-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,25 +206,5 @@ describe('Stader', function () {
tokens[srcTokenSymbol].address,
);
});

it('ETH getTopPoolsForToken', async function () {
const poolLiquidity = await stader.getTopPoolsForToken(
tokens['ETH'].address,
10,
);
console.log(`ETH Top Pools:`, poolLiquidity);

checkPoolsLiquidity(poolLiquidity, tokens['ETH'].address, dexKey);
});

it('WETH getTopPoolsForToken', async function () {
const poolLiquidity = await stader.getTopPoolsForToken(
tokens['WETH'].address,
10,
);
console.log(`WETH Top Pools:`, poolLiquidity);

checkPoolsLiquidity(poolLiquidity, tokens['WETH'].address, dexKey);
});
});
});
19 changes: 1 addition & 18 deletions src/dex/stader/stader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,23 +203,6 @@ export class Stader
tokenAddress: string,
limit: number,
): AsyncOrSync<PoolLiquidity[]> {
if (
!(isETHAddress(tokenAddress) || this.isWETH(tokenAddress.toLowerCase()))
)
return [];

return [
{
exchange: this.dexKey,
address: this.config.ETHx,
connectorTokens: [
{
decimals: 18,
address: this.config.ETHx,
},
],
liquidityUSD: 1000000000, // Just returning a big number so this DEX will be preferred
},
];
return [];
}
}

0 comments on commit f72ffb7

Please sign in to comment.