diff --git a/src/dex/dexalot/config.ts b/src/dex/dexalot/config.ts index 658792a20..ec1830c99 100644 --- a/src/dex/dexalot/config.ts +++ b/src/dex/dexalot/config.ts @@ -11,8 +11,8 @@ export const DexalotConfig: DexConfigMap = { }; export const Adapters: Record = { - [Network.AVALANCHE]: { - [SwapSide.SELL]: [{ name: 'AvalancheAdapter02', index: 6 }], - [SwapSide.BUY]: [{ name: 'AvalancheBuyAdapter', index: 8 }], - }, + // [Network.AVALANCHE]: { + // [SwapSide.SELL]: [{ name: 'AvalancheAdapter02', index: 6 }], + // [SwapSide.BUY]: [{ name: 'AvalancheBuyAdapter', index: 8 }], + // }, }; diff --git a/src/dex/dexalot/dexalot-e2e.test.ts b/src/dex/dexalot/dexalot-e2e.test.ts index 731ad637a..b9b9c04b3 100644 --- a/src/dex/dexalot/dexalot-e2e.test.ts +++ b/src/dex/dexalot/dexalot-e2e.test.ts @@ -34,12 +34,12 @@ function testForNetwork( const sideToContractMethods = new Map([ [SwapSide.SELL, [ ContractMethod.simpleSwap, - ContractMethod.megaSwap, - ContractMethod.multiSwap + // ContractMethod.megaSwap, + // ContractMethod.multiSwap ]], [SwapSide.BUY, [ ContractMethod.simpleBuy, - ContractMethod.buy + // ContractMethod.buy ]], ]); diff --git a/src/dex/dexalot/dexalot.ts b/src/dex/dexalot/dexalot.ts index 2388f7e05..cdd79694c 100644 --- a/src/dex/dexalot/dexalot.ts +++ b/src/dex/dexalot/dexalot.ts @@ -16,6 +16,7 @@ import { Network, ETHER_ADDRESS, CACHE_PREFIX, + NULL_ADDRESS, } from '../../constants'; import * as CALLDATA_GAS_COST from '../../calldata-gas-cost'; import { getDexKeysWithNetwork, isAxiosError } from '../../utils'; @@ -60,8 +61,6 @@ import { import { BI_MAX_UINT256 } from '../../bigint-constants'; import { ethers } from 'ethers'; import BigNumber from 'bignumber.js'; -import { TokensMap } from '../swaap-v2/types'; -import { normalizeTokenAddress } from '../swaap-v2/utils'; export class Dexalot extends SimpleExchange implements IDex { readonly isStatePollingDex = true; @@ -77,7 +76,7 @@ export class Dexalot extends SimpleExchange implements IDex { private tokensAddrCacheKey: string; private tokensCacheKey: string; private blacklistCacheKey: string; - private tokensMap: TokensMap = {}; + private tokensMap: TokenDataMap = {}; public static dexKeysWithNetwork: { key: string; networks: Network[] }[] = getDexKeysWithNetwork(DexalotConfig); @@ -217,7 +216,9 @@ export class Dexalot extends SimpleExchange implements IDex { } getIdentifier(baseSymbol: string, quoteSymbol: string) { - return `${this.dexKey}_${baseSymbol}_${quoteSymbol}`.toLowerCase(); + // return `${this.dexKey}_${baseSymbol}_${quoteSymbol}`.toLowerCase(); + // To disable Dexalot in multi/mega routes + return this.dexKey; } async getPoolIdentifiers( @@ -294,7 +295,7 @@ export class Dexalot extends SimpleExchange implements IDex { normalizeAddress(address: string): string { return address.toLowerCase() === ETHER_ADDRESS - ? ethers.constants.AddressZero.toLowerCase() + ? NULL_ADDRESS : address.toLowerCase(); } @@ -672,8 +673,7 @@ export class Dexalot extends SimpleExchange implements IDex { } getTokenFromAddress(address: Address): Token { - return this.tokensMap[normalizeTokenAddress(address)]; - + return this.tokensMap[this.normalizeAddress(address)]; } getAdapterParam(