diff --git a/packages/asset-swapper/src/utils/market_operation_utils/bridge_source_utils.ts b/packages/asset-swapper/src/utils/market_operation_utils/bridge_source_utils.ts index ddc61ef3e8..c2e3fc1397 100644 --- a/packages/asset-swapper/src/utils/market_operation_utils/bridge_source_utils.ts +++ b/packages/asset-swapper/src/utils/market_operation_utils/bridge_source_utils.ts @@ -24,7 +24,6 @@ import { ELLIPSIS_BSC_INFOS, FIREBIRDONESWAP_BSC_INFOS, FIREBIRDONESWAP_POLYGON_INFOS, - GMX_ROUTER_BY_CHAIN_ID, IRONSWAP_POLYGON_INFOS, JETSWAP_ROUTER_BY_CHAIN_ID, JULSWAP_ROUTER_BY_CHAIN_ID, diff --git a/packages/asset-swapper/src/utils/market_operation_utils/constants.ts b/packages/asset-swapper/src/utils/market_operation_utils/constants.ts index e38af64b8b..0d4e27e2a3 100644 --- a/packages/asset-swapper/src/utils/market_operation_utils/constants.ts +++ b/packages/asset-swapper/src/utils/market_operation_utils/constants.ts @@ -19,7 +19,6 @@ import { FillData, FinalUniswapV3FillData, GeistFillData, - GMXFillData, GetMarketOrdersOpts, isFinalUniswapV3FillData, KyberSamplerOpts, diff --git a/packages/asset-swapper/src/utils/market_operation_utils/orders.ts b/packages/asset-swapper/src/utils/market_operation_utils/orders.ts index 5fbe2ef576..cd9c64945a 100644 --- a/packages/asset-swapper/src/utils/market_operation_utils/orders.ts +++ b/packages/asset-swapper/src/utils/market_operation_utils/orders.ts @@ -21,7 +21,6 @@ import { GeistFillData, GenericRouterFillData, GMXFillData, - GMXSwapFillData, KyberDmmFillData, KyberFillData, LidoFillData, @@ -373,7 +372,12 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder break; case ERC20BridgeSource.GMX: const gmxFillData = (order as OptimizedMarketBridgeOrder).fillData; - bridgeData = encoder.encode([gmxFillData.router,gmxFillData.reader,gmxFillData.vault, gmxFillData.tokenAddressPath]); + bridgeData = encoder.encode([ + gmxFillData.router, + gmxFillData.reader, + gmxFillData.vault, + gmxFillData.tokenAddressPath, + ]); break; default: @@ -463,7 +467,6 @@ const routerAddressPathEncoder = AbiEncoder.create('(address,address[])'); const gmxAddressPathEncoder = AbiEncoder.create('(address,address,address,address[])'); const tokenAddressEncoder = AbiEncoder.create([{ name: 'tokenAddress', type: 'address' }]); - export const BRIDGE_ENCODERS: { [key in Exclude< ERC20BridgeSource, @@ -516,7 +519,7 @@ export const BRIDGE_ENCODERS: { [ERC20BridgeSource.SpookySwap]: routerAddressPathEncoder, [ERC20BridgeSource.MorpheusSwap]: routerAddressPathEncoder, // Avalanche - [ERC20BridgeSource.GMX] : gmxAddressPathEncoder, + [ERC20BridgeSource.GMX]: gmxAddressPathEncoder, // Celo [ERC20BridgeSource.UbeSwap]: routerAddressPathEncoder, // BSC diff --git a/packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts b/packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts index dfe47e0195..3bbf7bf2d9 100644 --- a/packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts +++ b/packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts @@ -75,7 +75,6 @@ import { GeistInfo, GenericRouterFillData, GMXFillData, - GMXQuoteFillData, HopInfo, KyberDmmFillData, KyberFillData, @@ -1227,7 +1226,7 @@ export class SamplerOperations { ): SourceQuoteOperation { return new SamplerContractOperation({ source: ERC20BridgeSource.GMX, - fillData: {router, reader, vault, tokenAddressPath }, + fillData: { router, reader, vault, tokenAddressPath }, contract: this._samplerContract, function: this._samplerContract.sampleSellsFromGMX, params: [reader, vault, tokenAddressPath, takerFillAmounts], @@ -1242,7 +1241,7 @@ export class SamplerOperations { ): SourceQuoteOperation { return new SamplerContractOperation({ source: ERC20BridgeSource.GMX, - fillData: {router, reader, vault, tokenAddressPath }, + fillData: { router, reader, vault, tokenAddressPath }, contract: this._samplerContract, function: this._samplerContract.sampleBuysFromGMX, params: [reader, vault, tokenAddressPath, makerFillAmounts], @@ -1641,7 +1640,6 @@ export class SamplerOperations { ); } case ERC20BridgeSource.GMX: { - return this.getGMXSellQuotes( GMX_ROUTER_BY_CHAIN_ID[this.chainId], GMX_READER_BY_CHAIN_ID[this.chainId], @@ -1955,7 +1953,6 @@ export class SamplerOperations { return this.getCompoundBuyQuotes(cToken.tokenAddress, makerToken, takerToken, makerFillAmounts); } case ERC20BridgeSource.GMX: { - return this.getGMXBuyQuotes( GMX_ROUTER_BY_CHAIN_ID[this.chainId], GMX_READER_BY_CHAIN_ID[this.chainId], diff --git a/packages/asset-swapper/src/utils/market_operation_utils/types.ts b/packages/asset-swapper/src/utils/market_operation_utils/types.ts index ae8726f7d9..4d92e0a00e 100644 --- a/packages/asset-swapper/src/utils/market_operation_utils/types.ts +++ b/packages/asset-swapper/src/utils/market_operation_utils/types.ts @@ -94,6 +94,7 @@ export enum ERC20BridgeSource { // Avalanche Pangolin = 'Pangolin', TraderJoe = 'TraderJoe', + // tslint:disable-next-line: enum-naming GMX = 'GMX', // Celo only UbeSwap = 'UbeSwap', @@ -223,21 +224,13 @@ export interface UniswapV2FillData extends FillData { tokenAddressPath: string[]; router: string; } -export interface GMXQuoteFillData extends FillData { - tokenAddressPath: string[]; - reader: string; - vault: string; -} + export interface GMXFillData extends FillData { router: string; reader: string; vault: string; tokenAddressPath: string[]; } -export interface GMXSwapFillData extends FillData { - router: string; - tokenAddressPath: string[]; -} export interface ShellFillData extends FillData { poolAddress: string;