Skip to content

Commit

Permalink
fix requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aburkut committed Dec 13, 2024
1 parent 87977e6 commit f3a18a5
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions src/dex/cables/cables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,25 +500,15 @@ export class Cables extends SimpleExchange implements IDex<any> {

await this.setTokensMap();

for (const symbol of Object.keys(this.tokensMap)) {
const normalizedTokenAddress =
this.tokensMap[symbol].address.toLowerCase();

if (normalizedSrcToken.address === normalizedTokenAddress) {
normalizedSrcToken.symbol = this.tokensMap[symbol].symbol;
}
if (normalizedDestToken.address === normalizedTokenAddress) {
normalizedDestToken.symbol = this.tokensMap[symbol].symbol;
}
}
normalizedSrcToken.symbol =
this.tokensMap[normalizedSrcToken.address].symbol;
normalizedDestToken.symbol =
this.tokensMap[normalizedDestToken.address!].symbol;

// ---------- Pools ----------
let pools = await this.getPoolIdentifiers(
srcToken,
destToken,
side,
blockNumber,
);
let pools =
limitPools ||
(await this.getPoolIdentifiers(srcToken, destToken, side, blockNumber));
if (pools.length === 0) return null;

// ---------- Prices ----------
Expand Down

0 comments on commit f3a18a5

Please sign in to comment.